One mistake I see many people make is relying on internal details in their tests. For example, assume that you wrote a stack class and that you use an array to store the data. This should be an internal matter for your class. You should not write a test case that verifies the order of […]
As you design and maintain tests for your system, keep the following points in your mind: Ease of use and debugging are the highest priority. Everyone on the team should be able to run and debug the tests. Use your creativity to make the tests easy to run and debug instead of focusing on the most […]
We can categorize the types of tests we can create based on the target of the test: Unit Testing: The test target is a function or a class. The goal is to test that unit independently. Usually, we rely on an API interface in Unit Tests. Integration or System Testing: The test target is a […]
All tests run through the following stages: Test Setup: The goal of this stage is to create an environment for your test. It could be as simple as instantiating an object or as complex as installing all the dependencies for your web application. Text Execution: The goal of this stage is to run through a […]