SlideShare a Scribd company logo
1 of 31
Visual Automation
Framework via
Screenshot Comparison
Mek Srunyu Stittri
Apr 15 2015
Powered by Applitools
Visual Automation Testing
What is Visual Test?
“A quality assurance activity aimed to
verify that a Graphical User Interface
appears correctly to users”
This
Credit : image from Adam Carmi, co-founder Applitools
A Visual Bug
Or this
A Visual Bug
Data Layer
Backend
Front end
Top of the stack checkpointing.
Requires the least amount of investment but
huge returns. Visually Perfect
Why Automate Visual Testing
Credit : image from Adam Carmi, co-founder Applitools
Why Automate Visual Testing
THE TEST MATRIX IS HUGE..
■ Web browsers
■ Operating systems
■ Screen resolutions
■ Responsive designs
■ L10n
Why Automate Visual Testing
Many are already doing it (and sharing)…
Credit : image from Adam Carmi, co-founder Applitools
Why Automate Visual Testing
Well, what are we waiting for..
Credit : image from Adam Carmi, co-founder Applitools
Challenges
If it’s so important.
How come it’s not
widely implemented ?
Its not that simple..
Credit : image from Adam Carmi, co-founder Applitools
Challenges
Credit : image from Adam Carmi, co-founder Applitools
Anti Aliasing
Credit : image from Adam Carmi, co-founder Applitools
Anti Aliasing
Credit : image from Adam Carmi, co-founder Applitools
Brightness
Credit : image from Adam Carmi, co-founder Applitools
Brightness
Credit : image from Adam Carmi, co-founder Applitools
Sub pixel shifts
Credit : image from Adam Carmi, co-founder Applitools
Sub pixel shifts
■ Dynamic content
■ 1 pixel offsets in element
positioning
■ Moving elements
■ Images of different size
QE
Credit : image from Adam Carmi, co-founder Applitools
And more...
Introducing - APPLITOOLS, A specialized image processing stack designed
to compare computer generated UI images
Handles..
1. Anti-aliasing
2. Partial and full pixel offsets
3. Images of different size
4. Dynamic content
5. Moving elements
6. Layout matching
How did we do this
● Exact - Only windows that are exact, pixel based, replicas of each other will be considered a success.
● Strict - Taking into consideration both layout and content changes while using Applitools Eyes
smart image analysis tools to ignore minor changes that might fail a test when using pixel based
comparison.
● Content - Only identify content differences while ignoring layout based
● Layout - Applitools Eyes will only identify layout differences while ignoring content differences.
Flexible Verification settings built-in
STRICT - Same image : Passed
CONTENT - Inverted color : Passed
STRICT - Inverted color : Failed
CONTENT - Actual Bug
Testdata (BaseLine) Creation Flow
1. Identify a Panel and create a new Applitools UI testcase to navigate to the Panel under test, do UI
interactions and add Visual Checkpoints
2. Run the test once to generate the BaseLine
3. Go to Applitools to approve the BaseLine and add customizations as necessary
Test Execution Flow
1. Run the test
2. Analyze the test result on differences reported
Workflow
Demo
Jersey dependency conflicts
■ http://support.applitools.com/customer/portal/questions/9866576-nosuchmethod-error
Integration into existing Framework with our own Implementation of
WebDriver
Applitools API requires passing in the actual Selenium WebDriver instance
■ http://support.applitools.com/customer/portal/questions/9866542-using-own-implementation-of-webdriver
■ A new testbase ApplitoolsTestBase.java is also created for all new validation tests. More in wiki
More Groovy dependency conflicts with the latest RELEASE version
■ http://support.applitools.com/customer/portal/questions/11629509-dependency-conflict-in-the-latest-release-version-getting-
error-when-initgremlingroovyscriptengine-
Challenges
public class ApplitoolsTestBase extends TestBase {
protected Eyes eyes;
/**
* Instantiates new {@link Eyes} object and sets Applitools Key and Testname from TestNG injection
*/
@BeforeMethod
public void setupTestMethod(Method method) {
super.setupTestMethod(method);
this.eyes = new Eyes();
eyes.setApiKey(APPLITOOLS_API_KEY);
String testPreFix = method.getDeclaringClass().getCanonicalName();
// shorten down com.mekdev.qe to c.m.q
testPreFix = testPreFix.replace("com.mekdev.qe", "c.m.q");
// Instantiate new driver and set application name and testname
WebDriver driver = eyes.open(getWebDriver(), "Visual Test", testPreFix + "::"+ method.getName());
setWebDriver(driver);
}
}
New Applitools specific TestBase
Test Example
@Test
public void testApplitools() throws Exception {
eyes.setMatchLevel(MatchLevel.CONTENT);
// Start the UI portion of the test
Navigation navigator = new Navigation.Builder()
.username(Constants.ADMIN).password(Constants.PASSWORD)
.build();
navigator.run();
LoginPage loginPage = WebDriver.update(navigator, LoginPage.class);
// Click Run
loginPage.clickSignup();
// Check screen #1
loginPage.fillInformation("John doe","password");
eyes.checkWindow("Signup Page");
// Check screen #2
loginPage.clickCancel();
eyes.checkWindow("Back to Login selection");
// finish the test
eyes.close();
loginPage.close();
}
Cross Browser / OS tests using the same BaseLine Data
■ Use - eyes.setBaselineName("baselineName");
Evaluate feasibility and stability of Screen Regioning Capture vs whole screen
■ Via - eyes.checkRegion(selector, matchTimeout, "windowName");
Expand to Different Screen Resolutions
■ Requires some tweaking to the framework to specify viewport resolution at the test level -
driver = eyes.open(driver, appName, testName, viewportSize);
Next Phases
Q & A
Special Thanks
Adam Carmi - VP Engineering, Co-Founder at Applitools
Adam Carmi: Automated Visual Testing that Doesn't Suck!
http://www.meetup.com/SeleniumSanJose/events/209029032/ - November 17, 2014
http://www.slideshare.net/adamcarmi/visual-test-automation-that-does-not-suck - Adam’s original
slide deck from Selenium Meetup
Moshe Milman - VP Operations, Co-Founder at Applitools
24x7 Continuous Support, late night Join.me sessions from Tel Aviv

More Related Content

What's hot

What's hot (20)

Front-End Testing: Demystified
Front-End Testing: DemystifiedFront-End Testing: Demystified
Front-End Testing: Demystified
 
Colorful world-of-visual-automation-testing-latest
Colorful world-of-visual-automation-testing-latestColorful world-of-visual-automation-testing-latest
Colorful world-of-visual-automation-testing-latest
 
Nightwatch JS for End to End Tests
Nightwatch JS for End to End TestsNightwatch JS for End to End Tests
Nightwatch JS for End to End Tests
 
The wild wild west of Selenium Capabilities
The wild wild west of Selenium CapabilitiesThe wild wild west of Selenium Capabilities
The wild wild west of Selenium Capabilities
 
Better Page Object Handling with Loadable Component Pattern
Better Page Object Handling with Loadable Component PatternBetter Page Object Handling with Loadable Component Pattern
Better Page Object Handling with Loadable Component Pattern
 
Multiplication and division of calabash tests
Multiplication and division of calabash testsMultiplication and division of calabash tests
Multiplication and division of calabash tests
 
Advanced Appium
Advanced AppiumAdvanced Appium
Advanced Appium
 
Testing Web Applications
Testing Web ApplicationsTesting Web Applications
Testing Web Applications
 
Automate testing with behat, selenium, phantom js and nightwatch.js (5)
Automate testing with behat, selenium, phantom js and nightwatch.js (5)Automate testing with behat, selenium, phantom js and nightwatch.js (5)
Automate testing with behat, selenium, phantom js and nightwatch.js (5)
 
Perils of Page-Object Pattern
Perils of Page-Object PatternPerils of Page-Object Pattern
Perils of Page-Object Pattern
 
Selenium Testing on Chrome - Google DevFest Armenia 2015
Selenium Testing on Chrome - Google DevFest Armenia 2015Selenium Testing on Chrome - Google DevFest Armenia 2015
Selenium Testing on Chrome - Google DevFest Armenia 2015
 
Sauce Labs+Applitools - Automated Visual Testing in the Cloud
Sauce Labs+Applitools - Automated Visual Testing in the CloudSauce Labs+Applitools - Automated Visual Testing in the Cloud
Sauce Labs+Applitools - Automated Visual Testing in the Cloud
 
Protractor for angularJS
Protractor for angularJSProtractor for angularJS
Protractor for angularJS
 
Browser Automated Testing Frameworks - Nightwatch.js
Browser Automated Testing Frameworks - Nightwatch.jsBrowser Automated Testing Frameworks - Nightwatch.js
Browser Automated Testing Frameworks - Nightwatch.js
 
Advanced Automated Visual Testing for Mobile Apps
Advanced Automated Visual Testing for Mobile AppsAdvanced Automated Visual Testing for Mobile Apps
Advanced Automated Visual Testing for Mobile Apps
 
Testing nightwatch, by David Torroija
Testing nightwatch, by David TorroijaTesting nightwatch, by David Torroija
Testing nightwatch, by David Torroija
 
Selenium for Jobseekers
Selenium for JobseekersSelenium for Jobseekers
Selenium for Jobseekers
 
Automated Testing in Angular Slides
Automated Testing in Angular SlidesAutomated Testing in Angular Slides
Automated Testing in Angular Slides
 
10 practices that every developer needs to start right now
10 practices that every developer needs to start right now10 practices that every developer needs to start right now
10 practices that every developer needs to start right now
 
Front-end Automated Testing
Front-end Automated TestingFront-end Automated Testing
Front-end Automated Testing
 

Viewers also liked

ARCHITECTURAL STANDARDS
ARCHITECTURAL STANDARDSARCHITECTURAL STANDARDS
ARCHITECTURAL STANDARDS
stuti31
 

Viewers also liked (11)

Metric import framework
Metric import frameworkMetric import framework
Metric import framework
 
Coded UI: Hand Coding based on Page Object Model
Coded UI: Hand Coding based on Page Object ModelCoded UI: Hand Coding based on Page Object Model
Coded UI: Hand Coding based on Page Object Model
 
Advanced Visual Test Automation With Selenium
Advanced Visual Test Automation With SeleniumAdvanced Visual Test Automation With Selenium
Advanced Visual Test Automation With Selenium
 
Visual Studio Automation
Visual Studio AutomationVisual Studio Automation
Visual Studio Automation
 
The journey to Native Cloud Architecture & Microservices, tracing the footste...
The journey to Native Cloud Architecture & Microservices, tracing the footste...The journey to Native Cloud Architecture & Microservices, tracing the footste...
The journey to Native Cloud Architecture & Microservices, tracing the footste...
 
Fullstack End-to-end test automation with Node.js, one year later
Fullstack End-to-end test automation with Node.js, one year laterFullstack End-to-end test automation with Node.js, one year later
Fullstack End-to-end test automation with Node.js, one year later
 
Node.js and Selenium Webdriver, a journey from the Java side
Node.js and Selenium Webdriver, a journey from the Java sideNode.js and Selenium Webdriver, a journey from the Java side
Node.js and Selenium Webdriver, a journey from the Java side
 
Intro to Visual Test Automation with Applitools Eyes
Intro to Visual Test Automation with Applitools Eyes Intro to Visual Test Automation with Applitools Eyes
Intro to Visual Test Automation with Applitools Eyes
 
Selenium-based Visual Test Automation
Selenium-based Visual Test AutomationSelenium-based Visual Test Automation
Selenium-based Visual Test Automation
 
Architectural standards
Architectural standardsArchitectural standards
Architectural standards
 
ARCHITECTURAL STANDARDS
ARCHITECTURAL STANDARDSARCHITECTURAL STANDARDS
ARCHITECTURAL STANDARDS
 

Similar to Visual Automation Framework via Screenshot Comparison

Visual Testing: Quality and Speed -- by GIl Tayar, Applitools
Visual Testing: Quality and Speed -- by GIl Tayar, Applitools Visual Testing: Quality and Speed -- by GIl Tayar, Applitools
Visual Testing: Quality and Speed -- by GIl Tayar, Applitools
Applitools
 

Similar to Visual Automation Framework via Screenshot Comparison (20)

Dive into Angular, part 5: Experience
Dive into Angular, part 5: ExperienceDive into Angular, part 5: Experience
Dive into Angular, part 5: Experience
 
Dependency Injection in .NET applications
Dependency Injection in .NET applicationsDependency Injection in .NET applications
Dependency Injection in .NET applications
 
Selenium C# - The Essential Test Automation Guide
Selenium C# - The Essential Test Automation GuideSelenium C# - The Essential Test Automation Guide
Selenium C# - The Essential Test Automation Guide
 
Leveraging Visual Testing with Your Functional Tests
Leveraging Visual Testing with Your Functional TestsLeveraging Visual Testing with Your Functional Tests
Leveraging Visual Testing with Your Functional Tests
 
Justin Ison
Justin IsonJustin Ison
Justin Ison
 
The 2014 Decision Makers Guide to Java Web Frameworks
The 2014 Decision Makers Guide to Java Web FrameworksThe 2014 Decision Makers Guide to Java Web Frameworks
The 2014 Decision Makers Guide to Java Web Frameworks
 
Lessons-Learned-SwiftUI.pptx
Lessons-Learned-SwiftUI.pptxLessons-Learned-SwiftUI.pptx
Lessons-Learned-SwiftUI.pptx
 
Automated Exploratory Testing
Automated Exploratory TestingAutomated Exploratory Testing
Automated Exploratory Testing
 
Appium Interview Questions and Answers | Edureka
Appium Interview Questions and Answers | EdurekaAppium Interview Questions and Answers | Edureka
Appium Interview Questions and Answers | Edureka
 
Testing Big in JavaScript
Testing Big in JavaScriptTesting Big in JavaScript
Testing Big in JavaScript
 
Getting started with appium
Getting started with appiumGetting started with appium
Getting started with appium
 
Тестирование мобильных приложений используя облачные сервисы. TestDroid, Test...
Тестирование мобильных приложений используя облачные сервисы. TestDroid, Test...Тестирование мобильных приложений используя облачные сервисы. TestDroid, Test...
Тестирование мобильных приложений используя облачные сервисы. TestDroid, Test...
 
Building And Executing Test Cases with Appium and Various Test Frameworks.pdf
Building And Executing Test Cases with Appium and Various Test Frameworks.pdfBuilding And Executing Test Cases with Appium and Various Test Frameworks.pdf
Building And Executing Test Cases with Appium and Various Test Frameworks.pdf
 
Automated Acceptance Testing Example
Automated Acceptance Testing ExampleAutomated Acceptance Testing Example
Automated Acceptance Testing Example
 
Ashish Baraiya
Ashish BaraiyaAshish Baraiya
Ashish Baraiya
 
Visual Testing: Quality and Speed -- by GIl Tayar, Applitools
Visual Testing: Quality and Speed -- by GIl Tayar, Applitools Visual Testing: Quality and Speed -- by GIl Tayar, Applitools
Visual Testing: Quality and Speed -- by GIl Tayar, Applitools
 
Installation of Silk Test Framework
Installation of Silk Test FrameworkInstallation of Silk Test Framework
Installation of Silk Test Framework
 
Qa process
Qa processQa process
Qa process
 
Visual regression with applitools eyes
Visual regression with applitools eyesVisual regression with applitools eyes
Visual regression with applitools eyes
 
Selenium Testing Training in Bangalore
Selenium Testing Training in BangaloreSelenium Testing Training in Bangalore
Selenium Testing Training in Bangalore
 

Recently uploaded

Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoorTop Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
dharasingh5698
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
ssuser89054b
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
amitlee9823
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
dollysharma2066
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
MsecMca
 

Recently uploaded (20)

Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
NFPA 5000 2024 standard .
NFPA 5000 2024 standard                                  .NFPA 5000 2024 standard                                  .
NFPA 5000 2024 standard .
 
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
 
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
 
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoorTop Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
 
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced LoadsFEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdf
 
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
 
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineering
 
Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 

Visual Automation Framework via Screenshot Comparison

  • 1. Visual Automation Framework via Screenshot Comparison Mek Srunyu Stittri Apr 15 2015 Powered by Applitools
  • 2. Visual Automation Testing What is Visual Test? “A quality assurance activity aimed to verify that a Graphical User Interface appears correctly to users”
  • 3. This Credit : image from Adam Carmi, co-founder Applitools A Visual Bug
  • 5. Data Layer Backend Front end Top of the stack checkpointing. Requires the least amount of investment but huge returns. Visually Perfect Why Automate Visual Testing
  • 6. Credit : image from Adam Carmi, co-founder Applitools Why Automate Visual Testing
  • 7. THE TEST MATRIX IS HUGE.. ■ Web browsers ■ Operating systems ■ Screen resolutions ■ Responsive designs ■ L10n Why Automate Visual Testing
  • 8. Many are already doing it (and sharing)… Credit : image from Adam Carmi, co-founder Applitools Why Automate Visual Testing
  • 9. Well, what are we waiting for..
  • 10. Credit : image from Adam Carmi, co-founder Applitools Challenges
  • 11. If it’s so important. How come it’s not widely implemented ? Its not that simple.. Credit : image from Adam Carmi, co-founder Applitools Challenges
  • 12. Credit : image from Adam Carmi, co-founder Applitools Anti Aliasing
  • 13. Credit : image from Adam Carmi, co-founder Applitools Anti Aliasing
  • 14. Credit : image from Adam Carmi, co-founder Applitools Brightness
  • 15. Credit : image from Adam Carmi, co-founder Applitools Brightness
  • 16. Credit : image from Adam Carmi, co-founder Applitools Sub pixel shifts
  • 17. Credit : image from Adam Carmi, co-founder Applitools Sub pixel shifts
  • 18. ■ Dynamic content ■ 1 pixel offsets in element positioning ■ Moving elements ■ Images of different size QE Credit : image from Adam Carmi, co-founder Applitools And more...
  • 19. Introducing - APPLITOOLS, A specialized image processing stack designed to compare computer generated UI images Handles.. 1. Anti-aliasing 2. Partial and full pixel offsets 3. Images of different size 4. Dynamic content 5. Moving elements 6. Layout matching How did we do this
  • 20. ● Exact - Only windows that are exact, pixel based, replicas of each other will be considered a success. ● Strict - Taking into consideration both layout and content changes while using Applitools Eyes smart image analysis tools to ignore minor changes that might fail a test when using pixel based comparison. ● Content - Only identify content differences while ignoring layout based ● Layout - Applitools Eyes will only identify layout differences while ignoring content differences. Flexible Verification settings built-in
  • 21. STRICT - Same image : Passed
  • 22. CONTENT - Inverted color : Passed
  • 23. STRICT - Inverted color : Failed
  • 25. Testdata (BaseLine) Creation Flow 1. Identify a Panel and create a new Applitools UI testcase to navigate to the Panel under test, do UI interactions and add Visual Checkpoints 2. Run the test once to generate the BaseLine 3. Go to Applitools to approve the BaseLine and add customizations as necessary Test Execution Flow 1. Run the test 2. Analyze the test result on differences reported Workflow
  • 26. Demo
  • 27. Jersey dependency conflicts ■ http://support.applitools.com/customer/portal/questions/9866576-nosuchmethod-error Integration into existing Framework with our own Implementation of WebDriver Applitools API requires passing in the actual Selenium WebDriver instance ■ http://support.applitools.com/customer/portal/questions/9866542-using-own-implementation-of-webdriver ■ A new testbase ApplitoolsTestBase.java is also created for all new validation tests. More in wiki More Groovy dependency conflicts with the latest RELEASE version ■ http://support.applitools.com/customer/portal/questions/11629509-dependency-conflict-in-the-latest-release-version-getting- error-when-initgremlingroovyscriptengine- Challenges
  • 28. public class ApplitoolsTestBase extends TestBase { protected Eyes eyes; /** * Instantiates new {@link Eyes} object and sets Applitools Key and Testname from TestNG injection */ @BeforeMethod public void setupTestMethod(Method method) { super.setupTestMethod(method); this.eyes = new Eyes(); eyes.setApiKey(APPLITOOLS_API_KEY); String testPreFix = method.getDeclaringClass().getCanonicalName(); // shorten down com.mekdev.qe to c.m.q testPreFix = testPreFix.replace("com.mekdev.qe", "c.m.q"); // Instantiate new driver and set application name and testname WebDriver driver = eyes.open(getWebDriver(), "Visual Test", testPreFix + "::"+ method.getName()); setWebDriver(driver); } } New Applitools specific TestBase
  • 29. Test Example @Test public void testApplitools() throws Exception { eyes.setMatchLevel(MatchLevel.CONTENT); // Start the UI portion of the test Navigation navigator = new Navigation.Builder() .username(Constants.ADMIN).password(Constants.PASSWORD) .build(); navigator.run(); LoginPage loginPage = WebDriver.update(navigator, LoginPage.class); // Click Run loginPage.clickSignup(); // Check screen #1 loginPage.fillInformation("John doe","password"); eyes.checkWindow("Signup Page"); // Check screen #2 loginPage.clickCancel(); eyes.checkWindow("Back to Login selection"); // finish the test eyes.close(); loginPage.close(); }
  • 30. Cross Browser / OS tests using the same BaseLine Data ■ Use - eyes.setBaselineName("baselineName"); Evaluate feasibility and stability of Screen Regioning Capture vs whole screen ■ Via - eyes.checkRegion(selector, matchTimeout, "windowName"); Expand to Different Screen Resolutions ■ Requires some tweaking to the framework to specify viewport resolution at the test level - driver = eyes.open(driver, appName, testName, viewportSize); Next Phases
  • 31. Q & A Special Thanks Adam Carmi - VP Engineering, Co-Founder at Applitools Adam Carmi: Automated Visual Testing that Doesn't Suck! http://www.meetup.com/SeleniumSanJose/events/209029032/ - November 17, 2014 http://www.slideshare.net/adamcarmi/visual-test-automation-that-does-not-suck - Adam’s original slide deck from Selenium Meetup Moshe Milman - VP Operations, Co-Founder at Applitools 24x7 Continuous Support, late night Join.me sessions from Tel Aviv