Integration and Testing

Authorize.Net API questions and help with your payment integration.

Posts: 1
Registered: ‎02-21-2020

How much is too much integration testing???


I'm writing an API, and trying to learn all the testing best practices.

I'm current unit testing and and mocking all my components, which is great.

I now want to start integration testing. Should I have per-component integration tests, or just tests for the entire API, treating it as a black box?

For example, I have a queue package that wraps RabbitMQ. Should I put an integration test on this?

Or should I simply have "input requests" and "output requests", and run these against the API itself, ignoring all the inner components?

I'm using Go, and I'm trying to learn by examining the Docker git repo. It seems they do the second sort of testing, but maybe I misinterpreting their code.

By integration testing, I mean testing code that interacts with other live (not mocked!) services, like a queuing service or a database.