View source | View content page | Page history | Printable version   
Toolbox
Main Page
Upload file
What links here
Recent changes
Help

PDF Books
Show collection (0 pages)
Collections help

Search

Projects:Modulescripts ERP Version Update Expose/QA

Contents

Introduction

The main goal of the QA-Test Plan of this project is to ensure that the new execution approach makes modulescripts be executed only when they are supposed to be executed, according to a possible dependency defined in the modulescript itself.

Automatic Tests

A new JUnit test case has been created and included as part of the ant task tests executed during CI.

This test covers all the possible dependencies that can be set for a modulescript execution when updating database. The code of the test can be found here.

Manual Tests

To test the new functionality inside Openbravo module installation infrastructure, some manual tests have been done. In order to execute this tests, the same module with different versions have been created:

 
package org.openbravo.modulescript.expose;
 
import org.apache.log4j.Logger;
import org.openbravo.modulescript.ModuleScript;
import org.openbravo.modulescript.ModuleScriptExecutionLimits;
import org.openbravo.modulescript.OpenbravoVersion;
 
public class ModuleScriptTest2 extends ModuleScript {
 
  private static final Logger log4j = Logger.getLogger(ModuleScriptTest.class);
 
  @Override
  public void execute() {
    log4j.info("Executing ModuleScriptTest...");
  }
 
  @Override
  protected ModuleScriptExecutionLimits getModuleScriptExecutionLimits() {
    return new ModuleScriptExecutionLimits("62F8E0D24E11473B911EA76AED13C8DC",
        null, new OpenbravoVersion(1, 1, 0));
  }
}
 
 
  @Override
  protected boolean executeOnInstall() {
    return false;
  }
 
package org.openbravo.modulescript.expose;
 
import org.apache.log4j.Logger;
import org.openbravo.modulescript.ModuleScript;
import org.openbravo.modulescript.ModuleScriptExecutionLimits;
import org.openbravo.modulescript.OpenbravoVersion;
 
public class ModuleScriptTest2 extends ModuleScript {
 
  private static final Logger log4j = Logger.getLogger(ModuleScriptTest.class);
 
  @Override
  public void execute() {
    log4j.info("Executing ModuleScriptTest2...");
  }
 
  @Override
  protected ModuleScriptExecutionLimits getModuleScriptExecutionLimits() {
    return new ModuleScriptExecutionLimits("0", new OpenbravoVersion(3,0,27029), 
        new OpenbravoVersion(3,0,27050));
  }
}
 

These four test modules can be downloaded from here.

Scenario 1

Test Plan

Through Module Management window:

  1. Install version 1.0.0
  2. Update to version 1.1.0. The modulescript ModuleScriptTest must be executed.
  3. Update to version 1.2.0. The modulescript ModuleScriptTest must not be executed.

Results

  1. Install version 1.0.0
  2. Update to version 1.1.0. Modulescript Executed
  3. Update to version 1.2.0. Modulescript NOT Executed

Test Result: CORRECT

Log - Update to version 1.1.0
Log - Update to version 1.2.0

Scenario 2

Test Plan

Through Module Management window:

  1. Install version 1.1.0. The modulescript ModuleScriptTest must be executed.
  2. Update to version 1.2.0. The modulescript ModuleScriptTest must not be executed.

Results

  1. Install version 1.1.0. Modulescript Executed
  2. Update to version 1.2.0. Modulescript NOT Executed

Test Result: CORRECT

Log - Install version 1.1.0
Log - Update to version 1.2.0

Scenario 3

Test Plan

Through Module Management window:

  1. Install version 1.2.0. The modulescript ModuleScriptTest must not be executed.

Results

  1. Install version 1.2.0. Modulescript NOT Executed

Test Result: CORRECT

Install version 1.2.0

Scenario 4

Test Plan

Through Module Management window, having core version = 3.0.27029

  1. Install version 1.2.0
  2. Update to version 1.3.0. The modulescript ModuleScriptTest2 must not be executed.
  3. Update core to a version between the first and last versions defined for the modulescript. ModuleScriptTest2 must be executed.
  4. Update core to a version higher or equal than the last version defined for the modulescript. ModuleScriptTest2 must not be executed.

Results

  1. Install version 1.2.0.
  2. Update to version 1.3.0. Modulescript NOT Executed
  3. Update core to version 3.0.27030 Modulescript Executed
  4. Update core to version 3.0.27055 Modulescript NOT Executed

Test Result: CORRECT

Retrieved from "http://wiki.openbravo.com/wiki/Projects:Modulescripts_ERP_Version_Update_Expose/QA"

This page has been accessed 485 times. This page was last modified on 21 July 2015, at 07:04. Content is available under Creative Commons Attribution-ShareAlike 2.5 Spain License.