Auto-apply Rules | Bondar Academy
Course: AI-based testing with testRigor
Module: Reusability and Optimization
Instructor: Artem Bondar
Lesson Summary
In this lesson, we explore how to apply AutoApplyRules in testing scenarios, particularly when dealing with unpredictable user flows, such as a Random Dialog feature. Key Concepts Random Dialog: A feature where users can enter names, but may encounter a friendly reminder that requires names to start with a capital letter. Automation Challenges: The random nature of reminders makes it difficult to predict user flow, complicating automation efforts. If-Else Conditions: A traditional method to handle such situations, but not always efficient. AutoApplyRules: A more effective solution provided by Test Trigger to manage unpredictable user interactions. Creating an AutoApplyRule Navigate to the Model and Overlays section and open the Dialog page. Set up a test case to enter names and observe the friendly reminder. When the reminder appears, create an AutoApplyRule to automatically click the OK button. Define the trigger condition: when the page contains the friendly reminder. Enable the auto apply on every step option for the rule. Testing the Rule After creating the rule, rerun the test case. The rule should automatically apply when the friendly reminder appears, allowing the test to pass successfully. Summary: Use AutoApplyRules to handle random situations in user flows by defining conditions for automatic actions, ensuring smoother test automation.