Skip to main content
Version: 5.2.0.0

Test Runner

The Test Runner is a feature that was introduced with Orchestra 4.16. It offers the possibility to validate Scenario Elements in an Orchestra Scenario (e.g. Mapping, Process model) via different testing levels.

Unit, integration and system tests can thus be implemented. With this feature, quality assurance and error detection in your application can be extensively optimized. It enhances the Testing feature, allowing multiple scenarios to be tested within a single pipeline.

Functionality​

  • Repeatable tests: The Test Runner enables the automated and repeatable execution of recorded tests. This saves time and resources, especially for regular regression tests.

  • Difference tracking: The Test Runner can compare the current behavior of the application with the recorded behavior and makes differences visible in a clear and traceable way. This makes it easier to identify and rectify errors.

  • Defining landscapes: Different test environments can be defined, which enable tests to be tested on different systems. Here you can overwrite existing environment entries or define which Docker containers should be started before the test is executed.

  • CI/CD integration: The Test Runner can be integrated into a pipeline, capable of testing multiple scenarios and providing test results for each scenario.

Use Cases​

  • Automated regression tests: By recording and automating test cases, regular tests can be carried out to ensure that new developments do not have any undesirable effects on existing functions.
  • Troubleshooting and error tracking: In the event of failed tests, the assert functionality enables the rapid identification of problems and their precise localization.
  • Realistic tests: Even if external systems are not available, realistic tests can be carried out by mocking steps.

Advantages​

  • Improved quality assurance and error detection.
  • Time savings through automated tests and simple test definition.
  • User-friendly description language for tests.
  • Traceability of differences in behavior.

Configuration​

To use the Test Runner, you must ensure that the correct Java path is set. Open startscripts/Unix/orchestra_env.sh and verify that ORC_JAVA_HOME is set correctly.

###############################################################
# Please adjust these values that they fit your system
###############################################################
ORC_JAVA_HOME=$JAVA_HOME
note

Java 21 is the minimum requirement.

Usage​

The Test Runner is a command line interface that can be started via a script. To do this, run the following script:

Operating System Scripts​

Operating SystemScript Path
Linuxstartscripts/Unix/test-runner.sh
Windowsstartscripts/Windows/test-runner.cmd

To start the application, you can use the following commands and options with the script:

Commands​

Command(s)Description
test, executeExecutes tests defined in a scenario. Both commands are equivalent.

Options​

OptionDescription
-d, --scenarioDirPath to the directory containing scenarios to be tested. br/ Can be used multiple times. br/ Can be combined with -s.
-f, --formatDefines the output format of the test results. br/ Options: json, junit. Default: json.
--failNeverIf set, the command exits with 0 even if tests fail. Otherwise, exits with -1. br/ Useful in pipelines.
-h, --helpShows help message and exits.
-o, --outputPath to the output directory for test results. br/ Default: current working directory.
-p, --testProfileName of the test profile to be executed. br/ Scenarios without the profile will be skipped.
-s, --scenarioPath to a scenario file to be tested. br/ Can be used multiple times and combined with -d.
-V, --versionPrints version information and exits.

Linux​

On Linux, an autocompletion script can be executed, allowing you to run the test runner directly from the command line without executing the script manually. Additionally, this provides code completion capabilities. To enable this, simply run the test-runner-autocompletion-install.sh script. This will add an entry to your .bashrc file and creates an test-runner_completion.sh script.