- Creating your first website test
- How to locate web site elements for testing
- Start your test manually
- Start your test automatically
- How is the automatically scheduled time calculated?
- View Test Results
Creating your first website test
Follow these simple steps to create your first test:
- Go to Domain Settings and save the domain you want to run your first test on in the first row in the field URL (e.g. http://www.usa.gov)).
- Go to Tests.
- Click Add Test.
- Type in a name and description for your first test.
- Check the box in front of your just saved domain to define that this test will be run on that domain.
- As planned start time set any time in the past that would have been a scheduled test run for the particular domain and set the desired test interval. (e.g. if the test is supposed to run every Tuesday at 3:00 pm, you could set the Planned Start Time as April-7-2015 3:00 pm and type in Interval H: 168).
- As first Command select open and type in as Target /. This will open the base of your domain. (e.g. if you saved http://www.usa.gov as URL for the domain you want to test, this command would open http://www.usa.gov/.)
- As second Command select ClickAt and type in as Target: link=TextOfAnyVisibleLink
- For the third step select verifyText as Command, type in as Target css=h1 and put in the Value-Field the text of your h1-title of the page where the previous defined link leads to. The Target css=h1 looks for the HTML-H1-Tag of your page. If you have more than one h1-title on your page (which you should not) this target definition would not be specific enough. Look in the corresponding section of this guide that explains what options you have to define a specific target element.
- Optional: Check Screenshot at one or more steps if you want to see a screenshot later from this particular command in the test results.
- Click Save Test.
- Congratulations, you created your first test!
How to locate web site elements for testing
For some of the available commands you need to define an website element as target. For example if you want to test the effect or possibility of clicking on an element you could use either the command clickAt or clickAtAndWait. In both cases you need to define the target-element. To do that you have to use one of the following locators in the Target-Field.
You can use this locator if you want to identify an element by its ID. In your html quellcode e.g. the element &st;h1 id=”unique-main-heading”> has the ID “unique-main-heading”. The id of an HTML-Element should always be unique on one page.
If you want to use this locator, your value for the Target-field should look like this:
Whenever possible you should locate your elements by their id because you will have the least amount of maintenance work to do. You can change all other objects on your website but as long as the unique id of an element stays as it is you won’t need to alter your test definition.
You can use this locator if you want to identify an element by its tag-name and/or its css-class. In your html quellcode e.g. the element &st;h1 class=”big-red-text”> has the tag-name “h1” and the css-class “big-red-text”.
If you want to use this locator your value for the Target-field should look like this:
Here are a few examples, how this locator can be used:
This locator is the most powerful but also most complex and complicated one. With xPath you can describe exactly every element on your website since it uses the whole HTML-hierarchy of your document. To understand the concept and syntax of xPath have a look at the following resources:
Fortunately you don’t need to write the xPath-definitions manually. There are browser plugins available who do that work for you. As an example we will go through the steps with the Chrome-Plugin XPath Helper.
- Look in the Chrome Store for the plugin XPath Helper, download and install it.
- Open a new tab and navigate to the page you want to test.
- Hit Ctrl-Shift-X to open the XPath Helper console.
- While you mouser over the target element hit Shift. The query box will update to show the full XPath.
- Since the full xPath for an element often is very long, you should use only the last part of the xPath. Mark as much from the xPath as needed to have a unique description of the target element. Always start with a slash, because it marks the beginning of an element.
- Copy the marked part of the xPath to the Target-field and add a slash at the beginning. After you added a slash at the beginning you should have two slashes!
- As an example the Target-field for the “home”-link of http://www.usa.gov could look like:
//div[@class=’w12 footer’]/div[@class=’accCont’]/div[@class=’item’]/ul[@class=’one_column_bullet bottomLinks’]/li/a
Start your test manually
- Go to Tests.
- Click Run at the particular test and the specific domain you want to run the test on. In this example we only saved one domain.
- The test will be added to the priority queue and will be executed as soon as possible, depending on other priority test runs that have been scheduled. Usually the results will be available after 1-3 minutes.
Start your test automatically
At the following occasions there will be scheduled a new test run automatically:
- If you add a test, save it for the first time and have at least one domain checked.
- If you edit a test, save it and for the checked domain(s) is currently no test run scheduled.
- If a automatic scheduled test run is executed, the next automatic test run will be scheduled automatically.
To check for which tests you have runs scheduled go to Queue. There you can see all your scheduled test runs with the Scheduled Time.
How is the automatically scheduled time calculated?
- Take the value of Planned Start Time for the particular test and domain.
- If that time is in the future, the test will be scheduled at that time.
- If that time is in the past, the value of Interval H will be added as hours again and again until the resulting time is in the future.
- Planned Start Time: April-7-2025 3:00 pm
- Interval H: 24
Since the Planned Start Time is in the future, the Scheduled Time will be equal to the Planned Start Time.
- Planned Start Time: April-7-2015 3:00 pm
- Interval H: 24
Since Planned Start Time is in the past and the interval is exactly 24h = one day, the test will be scheduled at 3:00 pm today or tomorrow depending on whether the current time is before or after 3:00 pm.
- Planned Start Time: March-17-2015 5:00 pm
- Interval H: 168
Since Planned Start Time is a Tuesday in the past and the interval is exactly 168h = one week, the test will be scheduled on (this) Tuesday at 5:00 pm.
View Test Results
To get a quick overview whether your test case has passed or failed, you have two options.
- Go to Tests. If there has been a test run yet, you will see in the row of the tested domain, whether the last test run has passed or failed. As soon as at least one step of any tested browser in the last test run failed the whole test is presented as failed.
- Go to Queue and to the row of the particular test run of which you want to know the result for.If the test run has not been executed yet, Time of Test Run will all be zeros. In that case scroll further down to get to the last executed test run. You will see in the row of the particular test run whether it has passed or failed. As soon as at least one step of any tested browser in that test run failed the whole test is presented as failed.
Detailed test results
Again you have two options to view the detailed test results:
- Go to Tests and click on the name of the test of which you want to view the results. If there are no results yet, the name of the test will not be clickable.
- Go to Queue and click on the name of the test at the particular test run of which you want to view the results. If the test run has not been executed yet, Time of Test Run will all be zeros and the test result page will be empty.
The test results will be presented for each tested browser, device and step.
You will notice that the behaviour of browsers might be slightly different for some commands and also when taking a screenshot.