You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In one of my previous PRs where I added new tests, it was not apparent that 1 of my tests was not working, until a reviewer found out from manual testing (thankfully). I was wondering if adding negative test cases to verify that a test is indeed working, is a good idea. Any thoughts? @leeyh20@alexfjw@junkiattan
The text was updated successfully, but these errors were encountered:
It's a good idea to have negative test cases 👍 Although, it may not necessarily catch that another test is passing no matter what. A negative test case doesn't mean the test case is expected to fail. It's a test case where we expect the SUT to react negatively e.g., throws an exception. The test case passes if the SUT reacts negatively.
Testing
Add negative test cases for most tests
Justification
In one of my previous PRs where I added new tests, it was not apparent that 1 of my tests was not working, until a reviewer found out from manual testing (thankfully). I was wondering if adding negative test cases to verify that a test is indeed working, is a good idea. Any thoughts? @leeyh20 @alexfjw @junkiattan
The text was updated successfully, but these errors were encountered: