cancel
Showing results for 
Search instead for 
Did you mean: 

Integration Testing Cases

Say we have two functions:

  1. Update Table

  2. Import Data

where the second function calls the first function based on some rules/logic.

Would an integration test be written for each function? Or does it make sense to only have one integration test?

BremdanJohnso
Member
2 REPLIES 2

Oh , so sorry but i m not sure about that. 

McDaniel
Contributor

Using a database (or an external connection to a service you are using) in an integration test is not only valid, but should be done. However, do not rely on integration tests heavily. Unit test every logic element you have and set up integration tests for certain flows.

Integration tests can be written in the same way, except (as you mentioned) they include more methods etc. In fact, the code snippet you've shown above is a common start write-up of an integration test.

You can read up more on tests here: https://softwareengineering.stackexchange.com/questions/301479/are-database-integration-tests-bad /ehatomeglz

JamesHimmerla
Member