Browse Prior Art Database

Dynamically modify test setup based on annotations in SCM repository changes Disclosure Number: IPCOM000232475D
Publication Date: 2013-Nov-11
Document File: 3 page(s) / 46K

Publishing Venue

The Prior Art Database


Disclosed is a method to hot swap test/environment specific code at runtime without stopping or undeploying the software.

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 52% of the total text.

Page 01 of 3

Dynamically modify test setup based on annotations in SCM repository changes

In some test scenarios, different test suites/environments require that a certain part of the software's compiled code be changed, in order to accommodate the test suites/environment's needs. To do this, a user has to un-deploy the software, replace the part of the compiled code in the software specific to the test suite/environment, and then redeploy and start the system to retest. Sometimes a piece of code needs a set of changes depending on the environment in which it needs to run. It is tedious and error-prone to continually switch changes in and out to continually test in different environments.

One solution is to have if/else statements in the source code to accommodate the test needs. However, doing so is practicing poor software design. Additionally, some programming languages may not support the traditional if-else style branching that alleviates this problems. Even if the developer uses if-else style programming, this can lead to code bloat and maintenance difficulties .

For example, consider a web designer with a static Hypertext Markup Language (HTML) template that needs to be tested against numerous style sheets (e.g., one per customer). If the designer wants to use an automated test suite against this static page, the Cascading Style Sheet (CSS) import must be modified prior to the test.

The solution is a method to store a collection of change sets required for different run configurations in a standard source code repository. Each change set/run configuration is annotated to indicate which change set correlates with which environment. When setting up a test, the information from the repository is used to determine which change sets are required for a given environment and automatically apply these changes.

By having a system that can automatically "hot swap" part of the binaries in the software to accommodate the test at runtime, test efficiency can be greatly improved. The novelty here is that test/environment specific code can be hot swapped at runtime without stopping or undeploying the software.

With this invention, it is not necessary to make any changes to the source code to do regression tests in different environments. Using aspect-oriented programming, the test executes differently at runtime without compile-time knowledge.

To implement the invention in a preferred embodiment :

1. User has a file that needs to change...