SlideShare ist ein Scribd-Unternehmen logo
1 von 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

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (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
 

Andere mochten auch

ARCHITECTURAL STANDARDS
ARCHITECTURAL STANDARDSARCHITECTURAL STANDARDS
ARCHITECTURAL STANDARDS
stuti31
 

Andere mochten auch (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
 

Ähnlich wie 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
 

Ähnlich wie 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
 

Kürzlich hochgeladen

DeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakesDeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakes
MayuraD1
 
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills KuwaitKuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
jaanualu31
 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
Neometrix_Engineering_Pvt_Ltd
 
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
AldoGarca30
 
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 

Kürzlich hochgeladen (20)

HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKARHAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
 
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torque
 
DeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakesDeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakes
 
AIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech studentsAIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech students
 
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills KuwaitKuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
 
Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS Lambda
 
kiln thermal load.pptx kiln tgermal load
kiln thermal load.pptx kiln tgermal loadkiln thermal load.pptx kiln tgermal load
kiln thermal load.pptx kiln tgermal load
 
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptxA CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
 
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
 
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
 
Computer Networks Basics of Network Devices
Computer Networks  Basics of Network DevicesComputer Networks  Basics of Network Devices
Computer Networks Basics of Network Devices
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
 
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxHOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptx
 
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
 
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
 
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leap
 

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