Scope of integration tests

Hey, I'm programming a .NET WebApi application from services and I have a question about integration tests. I'm actually trying to get a handle on it and it seems like everyone writes it a little differently. What is the scopem of an integration test within the following schema? Real scenario: order creation. Order is created -> stored in db -> sends message to service bus PaymentService responds -> creates payment -> stores in db Does the integration test for OrderService check for storing in database and sending message to service bus? Or should it test all the way to PaymentService? Because then it changes the scope and actually the saving of the tests considerably. For option 1, I would expect the tests to be at the OrderService project (.NET project). However, for option 2 I would expect the tests to be in a standalone .NET project (or JMeter?) somewhere. So how would I check the data in each service? Using the API? Or would I connect directly to the db of both services and check that it is correct? Because if it's using the API, it's more like E2E testing to me. My question is: So what is the scopem of the integration tests? Thanks a lot

Jun 24, 2025 - 08:40
 0
Scope of integration tests

Hey,

I'm programming a .NET WebApi application from services and I have a question about integration tests. I'm actually trying to get a handle on it and it seems like everyone writes it a little differently. What is the scopem of an integration test within the following schema?

enter image description here

Real scenario: order creation. Order is created -> stored in db -> sends message to service bus PaymentService responds -> creates payment -> stores in db Does the integration test for OrderService check for storing in database and sending message to service bus? Or should it test all the way to PaymentService? Because then it changes the scope and actually the saving of the tests considerably.

For option 1, I would expect the tests to be at the OrderService project (.NET project). However, for option 2 I would expect the tests to be in a standalone .NET project (or JMeter?) somewhere. So how would I check the data in each service? Using the API? Or would I connect directly to the db of both services and check that it is correct? Because if it's using the API, it's more like E2E testing to me.

My question is: So what is the scopem of the integration tests? Thanks a lot