Automation Testing

Using Selenium and Maven with Applitools

By Test Guild
  • Share:
Join the Guild for FREE

I recently interviewed Adam Carmi from Applitools on my TestTalks Podcast, and also created a blog post about visual validation testing, so I thought since we're talking about something that is a very visual activity, it would make sense to create a video as well.

In this video, I'll show you how easy it is to get started using Applitools, and add some` visual verifications to an existing test script. Applitools supports a bunch of frameworks and languages, but for demonstration purposes I'll be using Selenium script using Java and Maven. This is my first time ever using Applitools, so it should give you an idea of how easy it is to use and get started with.


  • Select your automation environment
    • Selenium (including Protractor & Capybara)
    • Appium
    • HP UFT / QTP
    • Microsoft CodedUI
    • Other


  • Select your development language:
    • Java
    • Ruby
    • Python
    • .Net
    • JS
    • PHP

     

  • Install SDK:


 

I chose Java so I have two options, Maven of download the Applitools Eyes Java Selenium SDK Jar file.

I'm using Maven, so I'll add the following dependency to my pom.xml file:

<dependency>

<groupId>com.applitools</groupId>

<artifactId>eyes-selenium-java</artifactId>

<version>RELEASE</version>

</dependency>

 

  • Build your first test

 


 


  • Analyze Test Results

The first time you run the test, Applitools will create a baseline image and store it on their cloud based server.

If you run the test again, another image will be captured and compared to the baseline. If any differences are found they will be highlighted as conflicts.

To see this, rerun our sample test script. Notice that an error occurred. If you look at the assertion error there is a URL to the Applitools image that contains the conflict. Let's navigate to it.


The image check will show any conflicts found.


At that point you have a few options:

  • Accept the change
  • Reject the change
  • Report a bug
  • Add some ignore regions over any dynamic data that your application might have


{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}

9 Ways AI Improves Software Testing

Posted on 07/02/2024

I recently co-hosted a webinar, with Blinq.io to delve into the impact of ...

Strategic Test Environment Setup For Automation Success

Posted on 06/18/2024

Understanding the importance of test environment setup Test environment setup is crucial for ...

Top 18 Visual Testing Tools for Testers (2024 Guide)

Posted on 06/10/2024

When you're a web developer, making sure that your site looks great – ...