View source | Discuss page | Page history | Printable version   
ADVERTISEMENT
Accounting eLearning Courses
Partnerships
SourceForge.net Logo
Openbravo ERP at SourceForge

SourceForge.net Logo
Openbravo POS at SourceForge

Open Solution Alliance Logo
Openbravo at Open Solutions Alliance

Automated Testing/Execute from command line

First, you need to have a working installation of Openbravo ERP.

Contents

Check out Openbravo ERP automation source code

To be able to clone Openbravo ERP testing code from main you need to install Mercurial.

Once Mercurial client is installed, move to the directory where you want to clone the last testing code tag and type in command line:

hg clone https://code.openbravo.com/tools/automation/main/ main

Move to main/config directory and configure OpenbravoERPTest.properties.

Then, you need to install some things:

Execute Openbravo ERP tests

Now, you can move to the directory and use ant to execute the different tests already automated.

For example, with:

ant test.integration.smoke

ant will run the smoke test suite.

There are more possible ant tasks. Some are specific to a section of the application; and you can choose to run just one test and all it's preconditions.

You can also run a specific test class with:

ant test.integration -Dtestclass=com.openbravo.test.integration.smoke.masterdata.A_01_InitialClientSetup

replacing com.openbravo.test.integration.smoke.masterdata.A_01_InitialClientSetup with the test class you want to run.

Note: If you run just one test class and not it's corresponding ant task, the preconditions for the Iclass are not going to be run.

Running on a server without and X Window System

X virtual framebuffer can be used if the server that will be used to execute selenium tests has no X Window System.

To run the virtual framebuffer as display ":1", execute:

startx -- `which Xvfb` :1 -screen 0 1024x768x24 2>&1 >/dev/null &

Then, to run the tests do something like this:

DISPLAY=:1 ant test.integration.smoke


On a ubuntu system

If you are like me who is going to run the headless system on ubuntu (I tried in jaunty x86_64). The following instruction will help.

 apt-get install tightvncserver icewm 
mkdir ~/.vnc
touch ~/.vnc/xstartup
chmod a+x ~/.vnc/xstartup
#!/bin/sh
xrdb $HOME/.Xresources
xsetroot -solid black
exec icewm-session
vncserver -geometry 1280x960 -depth 8
vncserver -kill :1
vncviewer dns.yourmachine.com:5901 

Retrieved from "http://wiki.openbravo.com/wiki/Automated_Testing/Execute_from_command_line"

This page was last modified 14:50, 16 October 2009. Content is available under Creative Commons Attribution-ShareAlike 2.5 Spain License.


Category: Automated Testing ERP