Visual Testing | Bondar Academy
Course: AI-based testing with testRigor
Module: Advanced Tricks and Techniques
Instructor: Artem Bondar
Lesson Summary
In this lesson, we explore how to use Test Trigger for visual testing . This powerful tool simplifies the process of comparing application screenshots to identify changes. Main Commands There are four primary commands used for visual testing: compare screen compare screenshots These commands allow you to create a baseline screenshot and compare it with future screenshots to detect changes. Example Workflow We demonstrate the process using a login flow: Create a base screenshot of the application. Make modifications (e.g., add a new article). Run the test to compare the new screenshot with the baseline. If changes are detected, the test will fail, allowing you to see the differences. Adjusting Sensitivity Test Trigger is sensitive to minor changes, detecting differences as small as 0.03% . You can adjust the sensitivity threshold to avoid flaky tests: Set a threshold for acceptable differences (e.g., 0.002 ). Configure the severity of failures (e.g., minor, major). Resetting Baseline Screenshots To update the baseline screenshot: Comment out the existing baseline command. Run the test to create a new baseline. Uncomment the command to use the new baseline. Conclusion In summary, use compare screen or compare screenshots commands to establish baselines and detect changes. Adjust sensitivity settings to manage test failures effectively. This approach ensures reliable visual testing without unnecessary flakiness.