Skip to: site menu | section menu | main content

Automatic Testing Platform

Examples

This section summarizes three examples of input to ATP (included in the distribution of ATP 2.0), namely:

HTML Script (R&P)

The following example is an recored HTML script made with Selenium IDE against Wikipedia. The script is simply an search of the term software testing, and then a click action on Test automation. This script can be seen as a the following table:

Wikipedia HTML Script







... and the (HTML) source code of the script is as follows:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="selenium.base" href="http://en.wikipedia.org/" />
<title>wikipedia</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">wikipedia</td></tr>
</thead><tbody>
<tr>
<td>open</td>
<td>/wiki/Main_Page</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>id=searchInput</td>
<td>software testing</td>
</tr>
<tr>
<td>clickAndWait</td>
<td>id=searchButton</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>link=Test automation</td>
<td></td>
</tr>
</tbody></table>
</body>
</html>



With this input, ATP creates the following report as output.

UML Models

The following models represent the use case of performing a serach in Amazon. This simple use case has an linked activity diagram, composed by two screens and a transition between them. The first screen (Home)is modelled using an Enterprise Architect presentation diagram. The second screen (Results) is not modelled.

Amazon UML Diagrams With this input, ATP creates the following report as output.

XML Model

The following example correspond a navigation model created in XML in which a web serarch in performed in Google. An assertation is made in the results to verify that the searched string (Software Testing) is present in the results.

<?xml version="1.0" encoding="ISO-8859-1" ?>
<website xmlns="http://www.dit.upm.es/atp" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.dit.upm.es/atp http://atestingp.sourceforge.net/atp.xsd"
base="http://www.google.es/">

<home id="google">
<data locator="q">
<value>Software Testing</value>
</data>
</home>

<transition from="google">
<action target="btnK" event="click" />
<to state="results" />
</transition>

<state id="results">
<assert type="textPresent">
<value>Software Testing</value>
</assert>
</state>

</website>


With this input, ATP creates the following report as output.