Download the HTML5 Robot installer from here, which emails you a download link.

Double-click on the downloaded file to launch the installer.

install_1 install_2

Specify where to place the Gwen compiler along with the example Gwen, Java , and ExtJS projects.

  • The Java project contains all of the necessary jar dependencies along with an Ant build for executing the tests, as well as external Selenium Web Driver executables for Chrome and Internet Explorer.
  • The Gwen project contains example tests, an example run command, along with the Selenium Web Driver executables for Chrome and Internet Explorer.
  • The ExtJS project is just the source for what is also deployed to this website at http://html5robot.com/1.0/extjs/, which is what the example tests are written against.

install_3 install_4

The Gwen project will be installed to the following location: C:\Program Files\af-html5-robot-1.0\examples\gwen

Ready to Go

The installation comes with the Gwen IDE, which you can start using the Desktop shortcut that was created for you.

Open the the directory located at examples/gwen and you are ready to go with an example project.

gwen_ide

 

The IDE contains standard development environment features such as:

  • Error checking as you type
  • Syntax highlighting
  • Opening multiple files at the same time
  • Running groups of tests or individual test from within the environment
  • Easy new project creation

You receive real-time feedback as your tests are running, and then they are done you can optionally open a detailed report.

runtime_example

 

Build System Integration

Assuming that you have some version of Chrome, Safari, Internet Explorer, and Firefox installed along with some version of Java, you are ready to go.

cd C:\Program Files\af-html5-robot-1.0\examples\gwen
example_run_script.bat

 

This will run the tests for Form #1 using the following command:

.\..\..\gwen -properties "test.properties" -file "Form1Test.gwen"

The Gwen tests output an HTML report to target/gwen-output, where the example output can be seen at http://html5robot.com/1.0/gwen/.

There are two ways to run Gwen tests:

  1. By file
  2. By a directory of files

 

Example of executing an individual file:

gwen -properties "test.properties" -file "Form1Test.gwen"

Example of executing a directory of files:

gwen -properties "test.properties" -directory "."

Recommendation

It is recommended that you add the HTML5 Robot installation directory to your Windows PATH Environment variable, so that the “gwen” command can be called from anywhere on the computer. Otherwise you will have to specify the full or relative path to the install directory in order to use the command, for example:

C:\Program Files\af-html5-robot-1.0\gwen -properties "test.properties" -file "Form1Test.gwen"

How do I do this?

Assuming you are on Windows and depending on what version of Windows you are on:

1. Right-click on My Computer and Select Properties

path_1

2. Select the Advanced tab and press the “Environment Variables” button

path_2

3. Find the System variable named “Path” and press the “Edit” button

path_3

4. Add the location of the installation prefixed with a ;

path_4

5. Open up the command-line and type “gwen”, and you should see the following

path_5

Directory Structure

The directory structure is the following:

What next?

See Test Structure