Overview
Test executions can sometimes fail if the system selects the wrong element, even when the correct one is available. This issue can be caused by incorrect Previous Successful Run (PSR) data, which the machine learning (ML) model uses to identify elements. Over time, the model may drift towards a similar but incorrect element, leading to test failures.
How It Works
To resolve this, you can refresh the ML model's data by forcing it to relearn from the original test creation data.
- Enable Relearning: For the failed test, enable the “Not Approved for Learning” option. This setting instructs the system to ignore the existing PSR data and instead use the “Architect data” that was captured when the test was first created.
- Run the Test: Execute the test with this option enabled. The system will use the original data to correctly identify the element, and a successful run will update the PSR with this correct information.
- Confirm the Fix: Disable the “Not Approved for Learning” option and run the test again. The test should now execute successfully using the newly updated and corrected ML data.
- Validate Stability: To ensure the issue is fully resolved, run the test multiple times. Consistent successful executions confirm that the ML model has been stabilized.
Limitations
This solution is specifically designed for failures caused by incorrect element selection due to outdated PSR data. It may not resolve other types of failures, such as those related to page load times, timing issues, or environment-specific behaviors. The effectiveness of this method relies on the original Architect data being accurate.
Related Information
- Strictness Settings: Adjusting a step's strictness value can help prevent future issues. A higher value makes element selection more restrictive, reducing the chance of the system drifting to an incorrect element.