This Confluence has been LDAP enabled, if you are an ASF Committer, please use your LDAP Credentials to login. Any problems file an INFRA jira ticket please.

Child pages
  • Webdriver based Functional tests for OFBiz

Access to add and change pages is restricted. See:

Skip to end of metadata
Go to start of metadata

Webdriver based Functional tests for OFBiz

This document is intended  for ofbiz developper.

Why webdriver ?

Webdriver is build on Selenium 2 technology and allow runing test on a local or remote machine or using htmlunit which is a nvigator emulator.

Webdriver should be used as a complementary to jUnit test. It allow testing application functionalities in

a global way, wheras jUnit is more suitable for unitary test. With the exclosing number of OS/navigator combination

It offers a way to test the application behaviour on target environments.

How it works ?

Webdriver uses seleium tests. A selenium test a script  consisting of a set command (written in java, python php etc..) and can be obtained using plugin

navigators like :

selenium IDE : firefox plugin that produces a set of command as an XML which can be transaled to java for example.

Sauce builder : firefox plugin that allow recording a test that can be saved as a java script.

The produced java code is then  integrate into ofbiz as a functional test.

You may run all functional tests integarted into ofbiz or a signle test suite (a group of test cases) or a single test case.

When starting ofbiz with the parameter webdriver it will start a the functionalTestContainer that bring up all necessary staf to run test and then

call webdriver component that will reproduced the same scenari described by the test script using the desired navigator.

For developpement purposes test can be run a local machine, but they may be excuted on remote machine (a service provider that offer à large choice of OS and navigator combinations.)

Continuous integration ?

To ensure a minimum of quality, we must have a continuous integartion platform like jenkins (hudson) coupled with some kind of automated tests.

Selenium Tests can be run after each build using  the grid.

You need more ?

With provider like sauce lab, you may execute functional tests remotly with the navigator ans OS of your choice.

For each test you execute on sauce lab machines :

  • a video is produced and can be downloaded (may be used for demonstration).
  • a raw log that decribe the whole test as step by step  command (verry usefull for debugging purposes).

Here is an example of a test i run on that platform here.

  • No labels