ERP 2.50:Upgraders Testing
Contents |
Introduction
This document explains the procedure for testing an Openbravo ERP upgrade from a 2.40 release to a 2.50 release and from a 2.50 release to another 2.50 release. (there is a document that explains how-to upgrade from previous releases).
Compatibility
This test should be repeated on the four supported environments:
- Linux/PostgreSQL
- Linux/Oracle
- Windows/PostgreSQL
- Windows/Oracle
Note:PostgreSQL 8.2 is not supported since 2.50 |
Upgrading a customized 2.40 release
Step 1 - Installing
The first step is to install the Openbravo ERP starting release. You may choose among published releases (i.e. Installers) or public branches (i.e. svn checkouts).
Installation instructions are provided at ERP/2.40/Openbravo_ERP_installation.
Step 2 - Customizing
Note: You can bypass this step if you have an already customized dmp file |
Running scripts
Create the tables used for customizing with this Oracle script or this PostgreSQL script. Remember to replace tad with your db username if you changed the default.
Then create customized functions IMP_VENTAS and IMP_VENTAS_TOTAL running the script for Oracle or for PostgreSQL.
Setting up Openbravo ERP
Follow this steps:
Note:As an additional test, you may try to add a new PL and/or modifying an existent function |
- Import a new language
- Create 4 references, all with "List Validation" validation type:
- Room Type
- Scheduling Frequency
- Department
- Type Attender
- For each reference, enter two List Reference:
- Room Type
- MR, Meeting room
- CR, Conference room
- Scheduling Frequency
- DA, Daily
- WE, Weekly
- Department
- EN, Engineering
- SA, Sales
- Type Attender
- EM, Employee
- BP, Business Partner
- Room Type
- Add the 3 tables (C_Room, C_Roomschedule and C_Roomattend) to Application Dictionary
- Access level Client/Organization
- For each table, create the columns with the "Create columns from DB" button
- Verify that all the columns were imported successfully
- Important: Every table needs one column marked as Identifier. If no column is Identifier, compile process will fail.
- On C_Room, mark Name as Identifier and Mandatory
- On C_Roomschedule, mark C_Room_ID and Topic as Identifier and Topic also as Mandatory
- On C_Roomattend, mark C_Roomschedule_ID and Meetingrole as Identifier and Meetingrole also as Mandatory. For C_Bpartner_Id select value for the "Reference Search Key" Business Partner
- Change reference to List, and select the proper reference for:
- C_Room.Roomtype
- C_Roomschedule.Frequency
- C_Roomattend.Department
- C_Roomattend.Typeattender
- Change reference Starttime and Endtime in C_Roomschedule from Date to Time
- Change reference ReservationDate to Date
- Create a window "Rooms"
- For the window, create 3 tabs:
- Room (Table:C_Room, Tablevel:0)
- Room Schedule (Table:C_Roomschedule, Tablevel:1)
- Room Attend (Table:C_Roomattend, Tablevel:2)
- For each tab:
- Run the "Create Fields" process
- Go to Field Sequence and move up AD_Client_ID and AD_Org_ID and remove Ad_User_Id field
- Go to Field and mark:
- For Room Schedule: AD_Client_ID, AD_Org_ID and AD_Room_ID as Read only. The s
- For Room Attend: AD_Client_ID, AD_Org_ID and AD_Roomschedule_ID as Read only
- Run the Synchronize Terminology process
- Add the menu entry (General Setup>Application>Menu) for Rooms
- Launch a compilation (ant compile -Dtab=Room or ant compile.development -Dtab=Room depending of your installation. If not sure, use the first one)
- After compilation, go Room menu as a Client Admin and enter some data into the three tabs.
- You may have compilation errors. If errors are like this:
[java] 507 [main] ERROR org.openbravo.data.Sqlc - SQL error in query: [java] SELECT C_Roomattend.AD_Client_ID, [java] (CASE WHEN C_Roomattend.AD_Client_ID IS NULL THEN ' ' ELSE (COALESCE(TO_CHAR(table1.Name),' ') ) END) AS AD_Client_IDR, [java] C_Roomattend.AD_Org_ID, [java] (CASE WHEN C_Roomattend.AD_Org_ID IS NULL THEN ' ' ELSE (COALESCE(TO_CHAR(table2.Name),' ') ) END) AS AD_Org_IDR, [java] C_Roomattend.Typeattender, [java] (CASE WHEN C_Roomattend.Typeattender IS NULL THEN ' ' ELSE ( COALESCE(TO_CHAR(list1.name), ' ') ) END) AS TypeattenderR, [java] C_Roomattend.Department, [java] (CASE WHEN C_Roomattend.Department IS NULL THEN ' ' ELSE ( COALESCE(TO_CHAR(list2.name), ' ') ) END) AS DepartmentR, [java] C_Roomattend.C_Bpartner_ID, [java] (CASE WHEN C_Roomattend.C_Bpartner_ID IS NULL THEN ' ' ELSE (COALESCE(TO_CHAR(table3.Name),' ') ) END) AS C_Bpartner_IDR, [java] C_Roomattend.Meetingrole, [java] C_Roomattend.C_Roomschedule_ID, [java] (CASE WHEN C_Roomattend.C_Roomschedule_ID IS NULL THEN ' ' ELSE () END) AS C_Roomschedule_IDR,
the problem is that you do not marked one column as Identifier for C_Roomattend table.
- Backup database
Adding custom code
Copy this code on your AppsOpenbravo/srcClient/org/openbravo/erpCommon/ad_reports folder.
Step 3 - Running the upgrader
Last step is to run the upgrader. You can take a look at ERP/2.50/Upgrading_From_2.40.
Before running the upgrader, please verify:
- For PostgreSQL use version 8.3.3 or above
- Database encoding is UTF8, that is required in order to avoid differences related to ASCII when comparing .xml database files
Rollbacking
In the case of a failure during the process, it is often needed to restart the upgrader again. It is not necessary to start from step 1.
For rolling back:
- Connect to the database (if using Oracle, use the system user)
- You should have an user TAD (or the name you chose). Delete it. You can do it with this command
drop user TAD cascade;
- In PostgreSQL you have also a database openbravo (or the name you chose). You have to delete de database before deleting the user.
- Finally, create the user (for PostgreSQL also create the database), and restore the backup you made after customizing.
After this, the testing can skip Step 1 and Step 2 and start on Step 3.
Issues to verify
- Old srcClient is used in the upgraded environment. See a further explanation below
- Verify the version string in info window
- Login into the application and go to any window
- Click the "i" icon that is on the right top side of the window and check the version is the correct one
- Verify the upgrade does not create another context different than the one is configured
Verify Database XML files
This test will verify that migrated database XML files match with the same XML files on a fresh new installation.
See also File Distribution
Steps
- Save a copy of <yourOpenbravo2.50folder>/src-db/database folder (for using as described on Additional Verification section).
- Using a terminal window, run:
- ant database.lib
- ant export.database
- Run a diff between:
- New installation <newCloneOfOpenbravo2.50folder>/src-db/database/model folder
- Migrated <yourOpenbravo2.50folder>/src-db/database/model folder
- and do the same for the sourcedata folder (also located in database folder)
Expected differences
The model and sourcedata folders are supposed to be identical.
Additional verification
Is a good practice, specially when differences were found, to also compare XML files backed up prior exporting with the new installation XMLs. That will add info to developers about what upgrading step has the error.
Run an acceptance test and verify bugs
- Verify that the new bugs found while testing the upgrade are fixed
- To make sure that there is no regression after applying the upgrade an acceptance test will be executed but just in one environment
- 10 random major bugs will be checked in the upgraded installation and again only in one environment
Upgrading a customized 2.50 release
Step 1 - Installing
The first step is to install the Openbravo ERP starting release. You may choose among published releases (i.e. Virtual Appliance) or public branches (i.e. svn checkouts). Installation instructions are provided at ERP/2.50/Openbravo_ERP_Installation
Step 2 - Customizing
You have the Rooms module and several localization packs to choose. No need to manually modifications.
Step 3 - Running the upgrader
Upgrading is like installing a module. The module in this case is an .obx file of new 2.50 release. In some cases the new release can be found as a module in the Central Repository
Rollbacking
In the case of a failure during the process, you can restore the application from the zip file generated during step 3.
Issues to verify
- All previous installed modules are still up and running if they support new release as well
- Verify the version string in info window
- Login into the application and go to any window
- Click the "i" icon that is on the right top side of the window and check the version is the correct one
Run an acceptance test and verify bugs
- Verify that the new bugs found while testing the upgrade are fixed
- To make sure that there is no regression after applying the upgrade an acceptance test will be executed but just in one environment
- 10 random major bugs will be checked in the upgraded installation and again only in one environment