Visual Testing With Applitools and Sauce Labs
Sauce AI for Test Authoring: Move from intent to execution in minutes.|xBack to ResourcesBlogPosted
Sauce AI for Test Authoring: Move from intent to execution in minutes.
|
x
Today, is enable teams to validate user interface (UI) components by creating automated test with ocular checkpoints through testing model likeSelenium, Appium, Espresso, and more.
Software testers once took visual validation for allow when manually testing apps. As teams displace forward with automated testing, the visual validation of UI components quickly faded away in the ground.
Now, with groundbreaking automated UI validation from Applitools Eyes, we can validate UI components again.
Why do we need visual checkpoints?
Without visual inspections, there is no way to cognize that a UI portion has broken when developers commit UI alteration by using existing automatize functional end-to-end test suites. We need to be proactive and continue to seek ways to move faster to keep up with the changes to assure we are make lineament checks into our covering. The time is now to kibosh pushing unintended ocular bugs to production so that the user experience isn & # x27; t affected. And Applitools is an automated visual testing answer that mechanically validates all the visual aspects of web, mobile, and desktop apps.
Here is a small checklist to reference when delimitate visual trial coverage:
Each UI portion appears in the right color, anatomy, position and size
Ensure that a component doesn ’ t hide or overlap any other UI elements
Verify that the graphic user interface (GUI) appears right across multiple platforms, devices, browser, and screen resolutions.
No broken images
Pro tip: Tools like SUSA can handle this autonomously — upload your app and get results without writing a single test script.
Let & # x27; s review adding optical tests to our existing automatize tests by using Applitools Eyes SDKs, and integrate with Sauce Labs.
Enabling Applitools (visual examination) is easy
The setup of Applitools is simple. You take to open a free account, select the automation environment (Selenium), and instal the Applitools SDK by selecting the preferred programming words (Ruby). Go to Applitools tutorial to afford it a try!
Unfastened Terminal(Unix/Linux)
$ gem install eyes_selenium
We are ready to compose our first visual tests from scratch or add to our exist Ruby and Selenium.
Code Snippet from Applitools Tutorial
require & # x27; eyes_selenium & # x27;
eyes = Applitools: :Eyes.new
# This is your api key, do sure you use it in all your tests.
eyes.api_key = $ APPLITOOLS_API_KEY
# Get a selenium web driver object.
my_webdriver = Selenium: :WebDriver.for: firefox
begin
# Start ocular testing using my_webdriver and set the viewport to 1024x768.
eyes.test (app_name: & # x27; USAToday & # x27;, test_name: & # x27; USA Today & # x27;,
viewport_size: {width: 1024, height: 768}, driver: my_webdriver) do |driver|
driver.get & # x27; http: //www.usatoday.com & # x27;
# Visual validation point # 1
eyes.check_window (& # x27; Front Page & # x27;)
end
ensure
my_webdriver.quit
end
Running your visual trial on Sauce Labs and analyzing the testing resolution
We can run the Selenium tests with optic checkpoints on any browser and operating system (OS)using Sauce Labs. After running a test for the inaugural clip, it will mechanically salve a screenshot as a baseline for future test runs on Applitools. The next exam run will equate the screenshot with the baseline. Let & # x27; s review the answer!
The alone challenge is manually analyzing the test results when a screenshot has be marked with a visual conflict. Yes, this is a manual cheque, but it is even faster than manually executing your entire functional test entourage every time a pull postulation (PR) is created.
The benefit of bring visual checkpoint to our existing automated tests is that we can formalise both functional end-to-end and visual components at the same clip.
Conclusion
The objective of visual testing is to catch unintended visual bugs before they are advertize to production, and impact the user experience. Teams need to proceed to research new prove access to increase test coverage—and most importantly, take pressure off of manual testing to locomote quicker and more accurately. By enabling Applitools and integrating Sauce Labs into your tryout automation ecosystem, your team will release faster, with confidence, and provide a flawless UI.
Greg Sypolt (@ gregsypolt) is a Senior Engineer at Gannett – USA Today Network and co-founder of Quality Element. He has spent most of his career working as a developer in test— centralize on automated testing for web browsers, APIs, mobile, and more. He is focused on the research, creation, and deployment of machine-driven exam strategies, quiz frameworks, tools, and uninterrupted integration. Passionate about # TestAutomation # TestCoverage # ContinuousIntegration # DevOps
Automate This With SUSA
Upload your APK or URL. SUSA explores like 10 real users — finds bugs, accessibility violations, and security issues. No scripts needed.
Try SUSA FreeTest Your App Autonomously
Upload your APK or URL. SUSA explores like 10 real users — finds bugs, accessibility violations, and security issues. No scripts.
Try SUSA Free