Points to remember before writing Test Cases

Single Responsibility Principle (SRP)

  1. Clear and focused tests

By following SRP, each unit test focuses on testing only one specific behavior or functionality of the code. This makes the test case clearer and easier to understand.

  1. Easier maintenance

When tests have a single responsibility, any changes or updates to the code under test will likely require only one corresponding update to the test case. This simplifies maintenance and reduces the risk of introducing errors.

Continue reading “Points to remember before writing Test Cases”