Execute SKF tests¶
‘run’ goal (squash-ta:run)¶
The run
goal of the SKF maven plugin is used to execute one or several tests. By default this goal is associated with the Integration-test
phase of the maven build life cycle.
To execute ALL tests, you can use one of the command bellow (in the root directory of your project) :
mvn integration-test
mvn squash-ta:run
Specify the test list to execute¶
The SKF maven plugin defines a maven property which allows to specify the test list to execute. This option is : ta.test.suite
.
It’s possible to specify its value by modifying the pom.xml of an SKF project :
...
<modelVersion>4.0.0</modelVersion>
<groupId>fr.mycompany</groupId>
<artifactId>my-app-automated-tests</artifactId>
<packaging>pom</packaging>
<version>0.0.1-SNAPSHOT</version>
<properties>
<ta.test.suite>tc1.txt,tc2.txt</ta.test.suite>
</properties>
<build>
...
It’s also possible to specify its value in the command line :
mvn integration-test -Dta.test.suite=tc1.txt,tc2.txt
Note
- If a property is defined in ‘pom.xml’ AND via command line, the command line value predominates.
- If a property has an empty value, all tests are executed.
There are many ways to define the test list to execute through ta.test.suite
parameter. More details here.
Manage temporary files¶
The SKF maven plugin also defines two maven properties which allow to manage temporary files created during execution.
- ta.temp.directory : Defines where temporary files should be stored.
- ta.debug.mode : Defines if temporary files are deleted or not after the execution (its value must be “true” or “false”).
Same as ta.test.suite
, it’s possible to define them in the pom.xml.
Example :
mvn integration-test -Dta.temp.directory=C:Squash_TF_temp mvn integration-test -Dta.debug.mode=true mvn integration-test -Dta.temp.directory=C:Squash_TF_temp -Dta.debug.mode=true |
Note
- If a property is defined in ‘pom.xml’ AND via command line, the command line value predominates.
ta.temp.directory
default value is the system temporary directory.ta.debug.mode
default value is “false”.
Attention
If there are syntax-error-metadata in the running test script(s), warning message(s) will be displayed in the console. (See Metadata section for more information about Metadata syntax conventions)