Release Management/Upgrading Process from Last Release MP to latest to be released OBX
This page refers to how can we implement test which can check upgrade process from the last official released MP to latest ready to be released MP OBX. As an example we can take a real use case; at the moment we have MP7 released and ready to be used by customers. The proposal is to test upgrade the next release MP8 OBX with MP7 using automated scripts. More about this milestone here
We can implement the upgrade either using the command line or module management console. For testing using the command line we propose we can write the scripts using bash scripts and there are already few scripts available to test which we will discuss in detail below. For testing using Module Management Console we propose we can write few selenium scripts.
Using the command line
After a detailed discussion with platform team we came up with the steps to be followed for a upgrade test (upgrade from last release MP to latest MP OBX) Steps followed for a upgrade test from MP source to latest MP OBX:
- openbravo folders to be deleted: legal, lib, WebContent, src-core, src-db, src-gen, src-trl, src-wad, src, web, src-test, src-diagnostics.
- except the dirs: build, modules, logs,
- uncompress the obx in the openbravo dir
- ant update.database-Dapply.on.create=true, ant core.lib, ant wad.lib, ant trl.lib, ant compile.complete.deploy.
We already have a working script command line script written by few folk(s) in our team. Might have to modify a bit to suit the hudson environment.
Using Module Management Console
Since most of our customer use Module Management Console, it make sense to test the upgrade process from the module management console. Basically the operation what is does is same as what we do from command line but with a difference that input is fed from the web browser.
The best way to test the upgrade process from MMC a.k.a Module Management Console is to write selenium test. Our QA team could help us writing the test for the same. Read more about Automated Test using selenium here
How tied to continuous integration engine
The job that does the upgrade is erp_upgrade_to_latest_obx.
- Clone the source from main and update it to the latest MP released
hg clone <local main repo> $WORKSPACE
hg up -C $LATEST_MP
- Set the properties (set the deploy to class)
- Deploy the instance
- Remove the following directories to upgrade and the older obx
rm -rf legal lib WebContent src-core src-db src-gen src-trl src-wad src web src-test src-diagnostics *.obx
- Generate the obx file from the repo int-11 (last successfull revision)
- unzip -o Openbravo2.50CI.<revision>.obx
- Trigger on following ant tasks to upgrade
- Restart the tomcat