Exchange Modules testing in Continuous Integration
Contents |
Introduction
The Openbravo Exchange is the marketplace to find solutions for the leading open source ERP. It is necessary to test the modules that are published in exchange. This document describes the process Openbravo follow in testing the modules and reporting their status on exchange to appropriate product owners
Work Flow
- Modules are added to exchange
- Release management team creates a job to test the installation and un-installation of the module.
- On failure
- Remove the modules from exchange by requesting to Eva Sanagustin <eva.sanagustin@openbravo.com>.
- Inform the removal of the module from exchange to appropriate owners.
- Once the module is fixed staff.rm get notified about new updated version available in forge.
- RM will test the module and on success it gets added to exchange.
- mail to Eva Sanagustin <eva.sanagustin@openbravo.com> to add the module again to exchange.
How integrated to builds
The module install and uninstall check are done using the selenium test suite. We use Automated test suite and create a appropriate test class for the module to install/uninstall.
Prerequisites
Clone the automated selenium test from openbravo scm
hg clone https://code.openbravo.com/tools/automation/pi-exchange /srv/hudson_setup/exchange_modules/smoke_suite
Create the test case for each module to install and uninstall and place them in path "src-test/com/openbravo/test/integration/erp/testsuites/continuousintegration/exchange"
- Name specification to perform module installation
Syntax: INM0XY_Install<ModuleName>.java Example: INM033_InstallShipmentsAwaitingInvoiceReport.java
- Name specification to perform module installation
Syntax: UNM0XY_Install<ModuleName>.java Example: UNM033_UnInstallShipmentsAwaitingInvoiceReport.java
Create ant target in build.xml
- Target to install module
example : <target name="test.integration.erp.testcases.exchangemodules.INM033" > <antcall target="test.integration"> <param name="testclass" value="com.openbravo.test.integration.erp.testcases.smoke.masterdata.INM033_InstallShipmentsAwaitingInvoiceReport" /> </antcall> </target>
- Target to un-install module
example : <target name="test.integration.erp.testcases.exchangemodules.UNM033" > <antcall target="test.integration"> <param name="testclass" value="com.openbravo.test.integration.erp.testcases.smoke.masterdata.UNM033_UnInstallShipmentsAwaitingInvoiceReport" /> </antcall> </target>
Note: Once the new script added is tested and on successful execution the script must be pushed to https://code.openbravo.com/tools/automation/main
Job Specifications
- Create a job in builds.openbravo.com
- Make the job refer to main repository
- Schedule the job to be triggered weekly, Select on Poll SCM option and set the time
# This is similar to cronjob specification # Example: Trigger on every Sunday at 1.15am 15 1 * * 7
- Add the above line Execute shell, which will execute appropriate ant task for the modules
Syntax: sh /srv/hudson_setup/exchange_modules/modInstall.sh "<Module1 Module2 ...>" $WORKSPACE sh /srv/hudson_setup/exchange_modules/modInstall.sh INM001 INM006" $WORKSPACE
Example Jobs
Refer the below link for existing jobs that test modules in exchange http://builds.openbravo.com/view/modules/