View source | Discuss this page | Page history | Printable version   
Toolbox
Main Page
Upload file
What links here
Recent changes
Help

PDF Books
Show collection (0 pages)
Collections help

Search

ERP 2.50:Automated Testing/Screenshots

Contents

Introduction

Several times, a failing Selenium test case does not show enough information through console output. That makes very difficult to understand what went wrong nor what is the required action to fix it.

So Openbravo's Selenium tests have a foundation feature for taking screenshots whenever a test case fails.

Where to find screenshots

It is important to note that if build is successful, no screenshot will be taken. Only failures will trigger an screenshot, which means standard number of screenshots is one. Eventually, a second screenshot could appear, as a consequence of parallelism. However, even in that case, only one of those screenshots will be signicant, the other might be a side effect.

When using Hudson CI jobs

Hudson's interface allows you to find easily an screenshot. You could find a "Screenshots" link in your job's main page.

View larger

When clicking that link, you will be redirected to the screenshot's list.

Sometimes, the direct link is not available. In that case, you should be able to go to

Workspace > automation > pi-smoke > last-results > qa-pi-inc-pgsql > screenshots

and you will get the same list as before.

View larger

Note that you need enough permissions to the job in order to access the list.

When using command line

You should navigate to

/selenium/{yourSeleniumCheckout}/last-results/{youOpenbravoContextName}/screenshots

For example, for using pi-smoke automation branch on a context named openbravo:

/selenium/pi-smoke/last-results/openbravo

Techincal info

Screenshots were added to the OpenbravoERPTest.java, in the failed method. Built-in command is used:

selenium.captureScreenshot(screenshotPath);

Retrieved from "http://wiki.openbravo.com/wiki/ERP_2.50:Automated_Testing/Screenshots"

This page has been accessed 3,892 times. This page was last modified on 3 April 2012, at 11:00. Content is available under Creative Commons Attribution-ShareAlike 2.5 Spain License.