Check that your modernized application produces the correct data in a continuous integration

From The Real BLU AGE® Wiki
Jump to: navigation, search
Updating Wiki - Mise à jour du Wiki

The Wiki is currently being updated to the Blu Age 5.4 version. - Le Wiki est en cours de migration vers la version 5.4 de Blu Age.

— The Blu Age Team

Last updated : 11/24/2014
Apply to versions : Blu Age II 5.0 and higher, any technologies.

Introduction

The compare feature enables to check that your modernized application is valid regarding the data test cases. For more information on the compare feature, refer to the compare feature wiki page

Usage

You must have a environment variable JAVA_HOME set to a JRE 1.6 +.
The command line template is:

  • java [jvm.args] -Dmagicdraw.dir="[magicdraw.dir]" -Dmagicdraw.use.dialog.auto.dispose=true -Dmagicdraw.use.popup.dialog=false -Djavax.net.ssl.trustStore=[bluage.dir]/eclipse/bluage.jks -jar [bluage.dir]/eclipse/plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar -data [project.workspace] -application com.netfective.bluage.compare.launcher [project.name] [project.compare.targets] [project.compare.test.file]

You must set parameters in command line.

Parameter Description Example
jvm.args Java Virtual Machine (JVM) options. -Xmx2048M -XX:PermSize=40M -XX:MaxPermSize=256M
magicdraw.dir Magic Draw 17.0 SP5 installation directory.
You must use \\ in path.
C:\\Program Files\\MagicDraw UML\\17.0 SP5
bluage.dir Blu Age 3.7.0 SP1 installation directory.
You must use / and have no space in path.
D:/BluAge-3.7.0-SP1/BLUAGE
project.workspace Workspace directory.
You must use / and have no space in path.
You must not have open the workspace with an Eclipse-based product when excuting command line.
D:/Workspace
project.name Name of the project in the worskapce. Batch-project
project.compare.targets

Compare tool targets to execute:

  • compare_files : compare files only
  • compare_db : compare databases only
  • compare_files,compare_db : compare files then compare databases
  • compare_db,compare_files : compare databases then compare files
compare_files,compare_db
project.compare.test.file Relative path from project to test property file to use. test/Test.properties

Command line with example values is

  • java -Xmx2048M -XX:PermSize=40M -XX:MaxPermSize=256M -Dmagicdraw.dir="C:\\Program Files\\MagicDraw UML\\17.0 SP5" -Dmagicdraw.use.dialog.auto.dispose=true -Dmagicdraw.use.popup.dialog=false -Djavax.net.ssl.trustStore=[bluage.dir]/eclipse/bluage.jks -jar D:/BluAge-3.7.0-SP1/BLUAGE/eclipse/plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar -data

D:/Workspace -application com.netfective.bluage.compare.launcher Batch-project compare_files,compare_db test/Test.properties

You can launch this command line using ANT script like the one below.

<project basedir="." name="Compare tool command line" default="compare">
  <property name="bluage.dir" value="D:/BluAge-3.7.0-SP1/BLUAGE" />
  <property name="workspace.dir" value="D:/Workspace" />
  <property name="magicdraw.dir" value="C:\\Program Files\\MagicDraw UML\\17.0 SP5" />
 
  <property name="vm.args" value="-Xmx2048M -XX:PermSize=40M -XX:MaxPermSize=256M -Djavax.net.ssl.trustStore=${bluage.dir}/eclipse/bluage.jks" />
  <property name="magicdraw.args" value='-Dmagicdraw.dir="${magicdraw.dir}" -Dmagicdraw.use.dialog.auto.dispose=true -Dmagicdraw.use.popup.dialog=false' />
 
  <property name="equinox.jar" value="org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar" />
  <property name="compare.launcher" value="com.netfective.bluage.compare.launcher" />
 
  <property name="project.name" value="Batch-project" />
  <property name="project.compare.targets" value="compare_files,compare_db" />
  <property name="project.compare.test.file" value="test/Test.properties" />
 
  <target name="compare">
    <echo>java ${vm.args} ${magicdraw.args} -jar ${bluage.dir}/eclipse/plugins/${equinox.jar} -data ${workspace.dir} -application ${compare.launcher} ${project.name} ${project.compare.targets} ${project.compare.test.file}</echo>
    <exec executable="cmd" >
      <arg value="/c"/>
      <arg  value="java ${vm.args} ${magicdraw.args} -jar ${bluage.dir}/eclipse/plugins/${equinox.jar} -data ${workspace.dir} -application ${compare.launcher} ${project.name} ${project.compare.targets} ${project.compare.test.file}"/>
    </exec>
  </target>
</project>