SeleniumIDE.HowTo

From iDempiere en
 IN PROGRESS 

Feature: Selenium IDE How To

Goal: UI Testing

Sponsor: Trek Global

Description:

Use Selenium IDE to create UI testing script

Install Selenium IDE and FireBug for FireFox

  • Install the Selenium IDE Firefox extension from here http://seleniumhq.org/download/
  • While it is not a must, it is highly recommended that you should also install the Firebug extension.

Record Test Script

  • Start your iDempiere server from Eclipse using the server.product.functionaltest launch profile.
  • Access the iDempiere Web UI login page using FireFox. Start the Selenium IDE extension ( Web Developer > Selenium IDE ). Selenium IDE will start recording immediately. Perform your testing steps and stop the Selenium IDE recording when you have completed your testing step.
  • You can now save the recorded test script ( Selenese Script ) with an appropriate name for your test case.
  • To run the recorded test script from Eclipse, export the test script as JUnit 4 test script using the "File > Export Test Case As... > Java / JUnit 4 / Web Driver" menu command.

Known Issues

  • If you playback the recorded selenese script using Selenium IDE, it will not work as expected. There are 2 issues that needs to be fixed here:
    • You need to add fireEvent blur command after the type command for input element.
    • Add pause command to wait for server response where necessary.
  • The selenium ide is not very reliable and sometime have problem following accurately all your test steps. It is recommended to split your test step into multiple recording to workaround this.
  • The exported JUnit 4 test script doesn't have the same fireEvent issue but you still need to add Thread.sleep to wait for server response.
  • When you add selenese command using selenium ide, the id= is optional for target. However, if you omit id=, export to JUnit 4 will failed.

Example

  • See the selenese project in the iDempiere mercurial repository.
Cookies help us deliver our services. By using our services, you agree to our use of cookies.