Isolating Tests

Learn about the importance of isolating tests from one another.

The meaning of test isolation

When we talk about test isolation, we are referring to the practice of creating boundaries between tests and test suites. We are isolating our tests and test suites from each other. Tests that are properly isolated from one another know nothing about the other's arguments, expectations, values, or mocks. Any changes to one test or test suite does not affect the outcome of any other test or test suite. Likewise, a test should perform in the exact same way regardless of location in a test file ...