Self healing helps the user save countless hours fixing broken test cases. However, in certain circumstances this may result in a false negative or a test case that passed, when it should have been considered a failed test case. False negatives should be corrected so that the machine learning model can learn and ensure that tests are passed or failed correctly when executed again in the future. This corrective action is called Force Fail, which gives the user the ability to manually fail a test that has passed.
Causes of Failed Test Cases
The most common reason for false negatives is incorrect verifications on a test case.
How to Force Fail a Test Case
Whether a missing verification is the culprit for your false negative or some other reason, a user has the ability to “force fail” a test case and intentionally mark a test as failed.
1. Navigate to the slider view for the action
2. Click on the gear icon for the specific step to fail.
3. Click the Fail button.
4. Click Confirm.
Once the Fail has been confirmed, the overall test is marked failed as well.
Now, when clicking back into step details, an indication that the test was manually failed displays. See below:
For further instructions, please see a video example of Force Fail.
When Force Fail is performed in certain situations, a SmartFix suggestion may be provided to recommend how the test can be optimized for future executions. As an example, alternate suggestions or elements may be offered to select on the page. Should that SmartFix suggestion be accepted (e.g. selecting a different element on the page), then in future executions, the test will check for that element to run instead. These SmartFix suggestions offer another peak into our machine learning capabilities that are continually looking for ways to optimize tests.
Using the Force Fail feature and modifying the test case with proper verifications will allow the user to better run tests in the future.