Testing: Selenium: Running ZimbraSelenium
General Information
ZimbraSelenium is the automation test harness for verifying the browser based Zimbra clients.
Downloading and Building ZimbraSelenium
Please follow the steps in Testing:_Selenium:_Building_ZimbraSelenium.
Tests Configuration
The file located in ZimbraSelenium/conf/conf.properties is the master configuration file. Every parameter change required to run the tests properly should be present and configurable on it. Configure the test harness with the basic parameters required to run properly against your desired version of Zimbra by changing the following variables in the file:
- server: This is the URL in which the Zimbra install to be tested is running. Please notice that the same must be reachable from the location in which the Selenium RC server is running (localhost, Sauce OnDemand, a remote machine).
- serverMachineName: The machine in which the Selenium RC server will be running (localhost, sauceondemand or a reachable ip/domain).
- browser: The browser in which the tests should run. This is the standard Selenium browser string.
- locale: The locale in which the installed version of Zimbra is running (en_US, ch, es_Es, etc).
Running ZimbraSelenium
Running from Eclipse
- Find projects/zcs/bin/ExecuteTests.java file
- In the project-tree, right click on projects/zcs/bin/ExecuteTests.java
- In the context menu, select: Run As > Open "Run Configuration" (This will bring "Run Configuration" dialog)
- Select "JAVA Application" folder from the tree
- Click on the + icon(at the top) or right-click and select "New" (This will essentially create a subfolder under Java Application)
- Enter the name as: "ajaxExecuteTests"
- Under "Main Class" section you should have: projects.zcs.bin.ExecuteTests
- Click "{x}=Arguments" tab
- In the "Program Arguments" section enter: "fullSuite" without double-quotes (ExecuteTests.java takes 1 argument <debugSuite> to run debug-tests or <fullSuite> to run full tests)
- In the VM Arguments section enter: -Dlog4j.configuration=file:/<path to>/log4j.properties
- If you are running/debugging in chinese,korean etc, also add -Dfile.encoding=UTF-8 to the VM Arguments section
- Click Apply (you can duplicate these things for projects/html/bin/ExecuteTests.java)
Running from the command line
Running with ant commands
Installing Ant
You need Ant 1.7+ to be installed on your system.
Notice: If you are running Mac OS X 10.5 or newer you can safely skip this step — the system comes with Ant 1.7.0 pre-installed.
If you are running an older version on Mac OS X you still need to install Ant 1.7: the pre-installed Ant version is too much behind. Follow the instructions described in the "Other Systems" section.
Ubuntu
If you are running Ubuntu 8.04 "Hardy Heron", the easier way to install Ant 1.7 is to run:
sudo apt-get install ant ant-optional
Other Systems
Install Ant 1.7.x and make sure it is in your PATH:
Download the binary distribution.
Unpack the binary distribution in the directory of your choice.
Add <where you unpacked the zip file>/apache-ant-1.7.0/bin to your PATH environment variable.
Check that your Ant installation is OK:
ant -version Apache Ant version 1.7.0 compiled on December 13 2006
Running the tests
- cd to ZimbraSelenium dir
- run ant targets:
ant "Run tests"
Runs both ajax and html suite
ant "Run ajax tests"
Copies i18n and test data, compiles the code, creates the jar file and runs ajax suite
ant "Run html tests"
Copies i18n and test data, compiles the code, creates the jar file and runs html suite