Most Powerful Open Source ERP

How To Run Zelenium Tests

How To showing how to run integration tests for user interfaces from inside ERP5.
  • Last Update:2016-02-11
  • Version:001
  • Language:en

Shows how to install and run Zelenium tests on an ERP5 instance.

Table of Contents

Installation

Running

Go to [host]/erp5/portal_tests.

In the top-left window select a test you want to run. In the top-right window choose if you want the test to run automatically or if you want to step through it. The click "selected" to run only the test you choose.

Sit back and watch a ghost work on your machine.

Troubleshooting

You may see an error on "type" commands (the left column):

Selenium failure. Please report to selenium-devel@lists.public.thoughtworks.org, with details from the logs at the base of the page. UniversalFileRead privilege has been denied for this script 

This is not at all a bug in selenium, to test file uploads, we use this hack. To enable it in firefox, type about:config in the location bar and set signed.applets.codebase_principal_support to true. Warning, this can represent a security risk for you browser

Running automatically

If you're intersted in running zelenium tests non interactively, take a look at ERPType/tests/prepareFunctionalTest.py to setup the environment and ERPType/tests/runFunctionalTest.py to run the tests and report by email.

Example:

$ cd /path/to/Products/ERP5Type/tests
$ ./runUnitTest.py --save prepareFunctionalTest.py
$ ./runFunctionalTest.py --email_to_address=foo@example.com

You can see more options (eg. invoking Firefox on the current DISPLAY instead of on Xvfb, specifying a test suite etc.) by './runFunctionalTest.py --help'.

Related Articles