Boost Test Coverage with Automated Visual Testing

23
5/13/16 1

Transcript of Boost Test Coverage with Automated Visual Testing

Page 1: Boost Test Coverage with Automated Visual Testing

5/13/16  

1  

Page 2: Boost Test Coverage with Automated Visual Testing

5/13/16  

2  

Page 3: Boost Test Coverage with Automated Visual Testing

5/13/16  

3  

Page 4: Boost Test Coverage with Automated Visual Testing

5/13/16  

4  

Page 5: Boost Test Coverage with Automated Visual Testing

5/13/16  

5  

Page 6: Boost Test Coverage with Automated Visual Testing

5/13/16  

6  

Page 7: Boost Test Coverage with Automated Visual Testing

5/13/16  

7  

Page 8: Boost Test Coverage with Automated Visual Testing

5/13/16  

8  

Page 9: Boost Test Coverage with Automated Visual Testing

5/13/16  

9  

import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver; public class NoApplitools {

public static void main(String[] args) { WebDriver driver = new ChromeDriver(); driver.get("https://stareast.techwell.com/program/concurrent-sessions/" + "boost-test-coverage-automated

+ “-visual-testing"); driver.findElement(By.partialLinkText("Joe Colantonio")); driver.quit();

}

}

<dependency>    <groupId>com.applitools</groupId>    <ar@factId>eyes-­‐java</ar@factId>    <version>RELEASE</version>  </dependency>  

Page 10: Boost Test Coverage with Automated Visual Testing

5/13/16  

10  

import  com.applitools.eyes.Eyes;  import  com.applitools.eyes.MatchLevel;    import  com.applitools.eyes.RectangleSize;  

WebDriver driver = new ChromeDriver(); Eyes eyes = new Eyes();

Page 11: Boost Test Coverage with Automated Visual Testing

5/13/16  

11  

eyes.setApiKey(getKey()); eyes.setForceFullPageScreenshot(true); eyes.setBaselineName(”StarEast"); eyes.setMatchLevel(MatchLevel.LAYOUT2); driver  =  eyes.open(driver,  "StarEast",  "StarEastDemo",  new  RectangleSize(1000,  800));

driver.get("https://stareast.techwell.com/" + "program/concurrent-sessions/boost” + "-test-coverage-automated-visual- testing"); eyes.checkWindow("Joe Session Main Page");    

Page 12: Boost Test Coverage with Automated Visual Testing

5/13/16  

12  

driver.findElement(By.partialLinkText ("Joe Colantonio")).click(); eyes.checkWindow("About Joe Colantonio"); eyes.close();

Page 13: Boost Test Coverage with Automated Visual Testing

5/13/16  

13  

Exception in thread "main" com.applitools.eyes.NewTestException: 'StarEast' of 'Stareast Demo'. Please approve the new baseline at https://eyes.applitools.com/app/sessions/123456789=1

Page 14: Boost Test Coverage with Automated Visual Testing

5/13/16  

14  

Exception in thread "main" com.applitools.eyes.TestFailedException: 'StarEast' of 'Stareast Demo'. See details at https://eyes.applitools.com/app/sessions/1234accountId=1 at com.applitools.eyes.EyesBase.close(EyesBase.java:600)

at com.applitools.eyes.Eyes.close(Eyes.java:12) at com.applitools.eyes.EyesBase.close(EyesBase.java:540) at com.applitools.eyes.Eyes.close(Eyes.java:12) at TestApplitools.main(TestApplitools.java:41)

Page 15: Boost Test Coverage with Automated Visual Testing

5/13/16  

15  

Page 16: Boost Test Coverage with Automated Visual Testing

5/13/16  

16  

Page 17: Boost Test Coverage with Automated Visual Testing

5/13/16  

17  

Page 18: Boost Test Coverage with Automated Visual Testing

5/13/16  

18  

Page 19: Boost Test Coverage with Automated Visual Testing

5/13/16  

19  

Page 20: Boost Test Coverage with Automated Visual Testing

5/13/16  

20  

Page 21: Boost Test Coverage with Automated Visual Testing

5/13/16  

21  

Page 22: Boost Test Coverage with Automated Visual Testing

5/13/16  

22  

Page 23: Boost Test Coverage with Automated Visual Testing

5/13/16  

23