Choosing the correct test type

When you write tests, it's often a good idea to ask yourself what kind of test you're writing. The kind of test you want to write will typically guide you toward the way your test should be structured and scoped. Having tests that are well-scoped, structured, and focused will ensure that you're building a stable test suite that properly tests your code without unintended side-effects that influence the quality of your tests.