MAROS KUTSCHY - Senior QA Automation Engineer, Ness
VISUAL UI TESTING WITH PERCY
Main Message: Along with Functional testing of the UI with Selenium and Layout testing of the UI with the Galen framework, it is essential to perform also Visual UI testing. Among the tools on the market, I chose Percy https://percy.io/. Even with the free plan, you have 5000 screenshots per month. These days full of challenges related to the Covid crisis when companies try to automate everything that is possible, I think performing automated visual checks instead of the time-consuming manual check is a very good strategy for companies to be more effective and productive.
A brief introduction about the topic: On our project we had to decide how to automate the specific applications, which have many visual elements. We are using the Java Cucumber automation framework for UI and API testing. For UI testing we are using Selenium, but this tool is not very suitable for Visual testing. Therefore, we decided to do POC for Visual testing of this specific application with Percy https://percy.io/
What problems we were facing: We didn’t have many experiences with visual testing, we played in the past with Percy’s main competitor – Applitools Eyes, but we didn’t invest much time into this. The biggest challenge was to find out how to integrate running Percy tests into CI Jenkins build, how to get Slack notifications to be notified about Percy validations results, and how to stabilize the tests. Another problem was related to a big refactor of the framework, after which Percy integration stopped working.
How we solved the problems: The problem with CI Jenkins integration: we are using the Java Cucumber framework, but Percy requires Node Js installed. We solved the problem with communication between Jenkins slave and Jenkins master by the special setup of Jenkins job and also one-time setup on Jenkins slave.
As you do not see results of Percy validations in the framework reports, we integrated Slack notification after each Percy job build.
We regularly improve tests to be more stable Problems after the big refactor of the framework: we created a temporary git branch without refactoring from which we run the tests
Lessons learned from this experience: Integration of Percy into our automation framework was a good decision. POC was successful and we have now already around 180 scenarios testing this specific application. We learned that this tool serves good to our needs but it is necessary to invest time to properly understand how it works and to integrate it into the framework. This time investment paid off.
What will I share with the attendees: I will share my experience with Percy including a live demo about how to integrate it in any framework, how to run the tests, how to check the results, and how to integrate it in the CI process.