Download the HTML5 Robot installer from here, which emails you a download link.
Double-click on the downloaded file to launch the installer.
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.
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.
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.
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:
- By file
- 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 "."
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
2. Select the Advanced tab and press the “Environment Variables” button
3. Find the System variable named “Path” and press the “Edit” button
4. Add the location of the installation prefixed with a ;
5. Open up the command-line and type “gwen”, and you should see the following
The directory structure is the following:
- Form1Test.gwen – Runs a series of tests against form #1, which can be seen at http://html5robot.com/1.0/extjs/form1.html
- Form2Test.gwen – Runs a series of tests against form #2, which can be seen at http://html5robot.com/1.0/extjs/form2.html
- Form3Test.gwen – Runs a series of tests against form #3, which can be seen at http://html5robot.com/1.0/extjs/form3.html
- Form4Test.gwen – Runs a series of tests against form #4, which can been seen at http://html5robot.com/1.0/extjs/form4.html
- test.properties – Specifies properties for running tests, such are where the Chrome and Internet Explorer drivers are located
See Test Structure