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

  1. Find projects/zcs/bin/ExecuteTests.java file
  2. In the project-tree, right click on projects/zcs/bin/ExecuteTests.java
  3. In the context menu, select: Run As > Open "Run Configuration" (This will bring "Run Configuration" dialog)
  4. Select "JAVA Application" folder from the tree
  5. Click on the + icon(at the top) or right-click and select "New" (This will essentially create a subfolder under Java Application)
  6. Enter the name as: "ajaxExecuteTests"
  7. Under "Main Class" section you should have: projects.zcs.bin.ExecuteTests
  8. Click "{x}=Arguments" tab
  9. 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)
  10. In the VM Arguments section enter: -Dlog4j.configuration=file:/<path to>/log4j.properties
  11. If you are running/debugging in chinese,korean etc, also add -Dfile.encoding=UTF-8 to the VM Arguments section
  12. 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
  1. cd to ZimbraSelenium dir
  2. 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

Verified Against: unknown Date Created: 11/7/2007
Article ID: https://wiki.zimbra.com/index.php?title=Testing:_Selenium:_Running_ZimbraSelenium Date Modified: 2010-07-26



Try Zimbra

Try Zimbra Collaboration with a 60-day free trial.
Get it now »

Want to get involved?

You can contribute in the Community, Wiki, Code, or development of Zimlets.
Find out more. »

Looking for a Video?

Visit our YouTube channel to get the latest webinars, technology news, product overviews, and so much more.
Go to the YouTube channel »

Jump to: navigation, search