Tuesday 12 March 2013

Taking ScreenShots

The hareness allows you to take screenshots for your Test Case(s)

There are 3 methods you can use:
  1. takeScreenshot()
  2. takeScreenshot(String imageName)
  3. takeScreenshot(String imageName, String caption)
Now lets use all the above methods in the test case we created.































ScreenShots In Test Results

The hareness when it generates the results of the test case(s) using the JUnit style will link all screenshots related to a test case. 

Navigate to index.html in the RegressionTestHarness/results/junitreports directory and click on the package that the test case belongs to.















Now click on the View link for the test case to view the images associated with it.












Finally, you will now be presented with a jquery slide show of all images that have been taken with the test case. You are able to play/pause the slideshow, navigate to the previous/next image(s) and also each image will display the prefix (Same as annotation) of the browser it was taken from. Also each image can have an optional caption associated with it.




No comments:

Post a Comment