QA Fundamentals · Senior · Question 7 of 76

When does it make sense to have fewer unit tests and more integration tests?

Show the answer

Correct answer: When most risk lies in the interaction between components

Explanation

In a thin service that mostly glues a database and APIs together, unit tests mock everything and check little. Integration tests with real dependencies (containers) give more confidence.

Further reading

Problem with a question

QA Fundamentals · Senior · question 7

Test yourself

Take the QA Fundamentals · Senior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz