Executing external test scripts from Matrix
There is a way to automate the calls to external scripts. The general idea is that the tests steps to automate will have a text starting with run:, followed by the name of a script to launch on the client side, and optional arguments.
There's a utility that must run on the client side, which will be able to:
- retrieve all the tests (XTC) that need to run, under some conditions
- launch the execution of the tests and send back the results to MatrixALM
The user set up some test steps with the syntax run: followed by the name of a script to run.
Example in Linux:
Example in Windows:
The user generates a test run containing some of the above. Let's say the test run has tests number from XTC-50 yo XTC-60
The user calls the TestRunner program to create the test file (big list of all the tests to run):
this will generate a file called test.xml on the local directory, with the test steps detected in items XTC-50 to XTC-60.
The actual run of the tests can now take place. The user enters the following command:
This will read the test.xml file and call each script. The script must generate on return a response file (see syntax below).
The TestRunner program will decode the response and send the ok or error code to MatrixALM, including some comments.
It is possible to stop the whole execution at a particular step if a pre-condition is not met by specifying continue=no in the response file
Syntax of the XML response we are expecting
Syntax of the configuration file
In order to avoid having to pass the same identification data to the test line all the time (and for security) the credentials have to be stored in a configuration file called config.xml by default:
Here is the utility (you may have to rename the downloaded file to TestRunner.jar):