Automated Testing/Eclipse
Installation and setup of Eclipse IDE
Openbravo ERP's testing code is ready to work with Eclipse's IDE projects schema, just like the ERP source code.
Please read Installation and setup of Eclipse IDE, a step-by-step guide to install and setup Eclipse Integrated Development Environment (IDE) for Openbravo ERP development.
At this moment you must have Eclipse IDE 3.4 working with Subclipse plugin. In addition, you should have configured the workbench and workspace.
Check out Openbravo ERP automation source code
The next step is to check out Openbravo ERP automation code to:
- Execute tests using Eclipse runner.
- Create your own tests and extend Openbravo ERP test suite.
Note: if you have checked out Openbravo ERP code to your current workspace, now you should create another workspace through File > Switch Workspace > Other.... Switch among your workspaces just by selecting File > Switch Workspace. |
To download Openbravo ERP tests into your empty workspace:
- Click on File > New > Other.... In New pop-up window, select SVN > Checkout Projects from SVN and click on Next button.
- Create a new repository location. Then type https://dev.openbravo.com/svn/automation/selenium in URL text box. If you want to check out the testing code tag of an Openbravo ERP branch, type https://dev.openbravo.com/svn/automation/selenium/branches/.
- When repository location validation finishes, select the folder with the desired version of tests then click on Finish button.
- In Check Out As window, select Check out as a project configured using the New Project Wizard radio button, then click on Finish button.
- In New Project, select Java -> Java Project. Click Next.
- In Create Java Project, enter the name of the project and click Finish.
- Openbravo ERP testing code check out starts.
Debugging tests with Eclipse
Eclipse has powerful debugging capabilities that we can use while writing tests or looking for errors in them.
The first thing that has to be done in order to debug a test is to set a breakpoint before the section of code that is going to be checked.
To do this, place the cursor on the line and go to menu Run -> Toggle Breakpoint.
You can add as many breakpoints as necessary; and the execution will stop before executing them.
Now, to execute the test on debug mode, select it's java file and go to menu Run -> Debug As -> Junit test.
Category: Automated Testing ERP








