The plugin architecture that is developed in Salomé is open and enables you to create your own plugins. For more information on this, see the manual on plugin development.
For looking after the plugins in Salomé-TMF, open the tab "Plugins" in
the main window (Figure ). The plugins for automating
tests are in the category TestDriver, and those for environment scripts are
in the category ScriptEngine.
This chapter describes how to use automatisation plugins in a general framework, but some features can vary from a plugin to another. For more information on a specific plugin, check the corresponding documentation.
The procedure for creating automatic tests is the following one:
The test is added to the selected test suite. You will then define the
execution code depending upon the plugin for describing entirely the test.
For this, click on "Add" in the tab "Script" of the test (Figure
).
Like manual tests, the automatic tests can use parameters (see section
) that will be valued at execution time. Please note that
the use of parameters depends upon the selected plugin. Look the specific
documentation for more informations.
When executing a test campaign, the environment script is executed first, then the initialization script for the execution, the test scripts, and then the final script for the execution.
The Figure shows how to add one or several scripts to an
execution.
Modifying execution and/or environments scripts depends on the plugin which
is used. It can be done from the "script" menus of the executions and/or
environments tabs (Figure ).
Depending upon the plugins used for describing test scripts, environment scripts and execution scripts, the execution context of the scripts can be unchanged during the complete campaign execution. In that case, the same references will be accessible. This is the case for the BeanShell and JUnit plugins.
In general, the test, execution and environment scripts have got references on the variables described in the following table (*=org.objectweb.salome_tmf.data):
Name | Class | Description | Disponible |
date | Java.lang.Date | Execution date | T, Env, Ex |
time | Java.lang.Time | Execution time | T, Env, Ex |
salome_projectName | Java.lang.String | Name of the current project T, Env, Ex | |
salome_projectObject | *.Project | Reference to the Salomé-TMF project object | T, Env, Ex |
salome_debug | boolean | False when evaluating a script in the editor | T, Env, Ex |
salome_ExecResultObject | *.ExecutionResult | Reference to the current execution results | T, Ex |
salome_ExecTestResultObject | *.ExecutionTestResult | Reference to the current test execution result | T |
salome_CampagneName | Java.lang.String | Name of the current campaign | T, Env, Ex |
salome_CampagneObject | *.Campaign | Reference to the current campaign | T, Env, Ex |
salome_environmentName | Java.lang.String | Name of the current environment | T, Env, Ex |
salome_environmentObject | *.Environment | Reference to the current environment | T, Env, Ex |
salome_ExecName | Java.lang.String | Name of the current execution | T, Env, Ex |
salome_ExecObject | *.Execution | Reference to the current execution | T, Env, Ex |
salome_TestName | Java.lang.String | Name of the current test | T |
salome_TestObject | *.Test | Reference to the current test | T |
salome_SuiteTestName | Java.lang.String | Name of the current test suite | T |
salome_SuiteTestObject | *.TestList | Reference to the current test suite | T |
salome_FamilyName | Java.lang.String | Name of the current family | T |
salome_FamilyObject | *.Family | Reference to the current family | T |
testLog | Java.lang.String | Test log that will be added as attachment to the execution | T |
Verdict | Java.lang.String | Test verdict (pass, fail, or unconclusive) | T |
salome_classloader | Java.net.URLClassLoader | BeanShell class loader | T, Env, Ex |
The column Disponible indicates whether those variables can be used in test, environment or execution scripts (T for tests, Env for environments, and Ex for executions).
The test, execution and environment scripts have also got access to the parameters valued during executions by the datasets, by using their name. Those values are of the type Java.lang.String.
This document was generated using the LaTeX2HTML translator Version 2002-2-1 (1.71)
Copyright © 1993, 1994, 1995, 1996,
Nikos Drakos,
Computer Based Learning Unit, University of Leeds.
Copyright © 1997, 1998, 1999,
Ross Moore,
Mathematics Department, Macquarie University, Sydney.
The command line arguments were:
latex2html -split 1 -no_navigation -prefix c5 -dir ../.././src/docs/html/en -no_footnode en/automatisation.tex
The translation was initiated by on 2006-03-10