The integrated "Test Script Runner" (TSR) was created to automate test sequences on one or more RCE standalone installations. These installations are automatically set up using an RCE feature called "Instance Management" (IM), which is still under development, and therefore not fully documented yet. However, the instructions below should be sufficient to configure this feature as needed for the TSR.
The most common way of using the TSR is simply running it from Eclipse. (It is also
intended to be installable into a standalone RCE product; however, this requires certain
APIs to be available in the standalone Eclipse, which makes this approach not feasible
yet.) Using it from Eclipse is fairly simple, as the project containing it
(de.rcenvironment.supplemental.testscriptrunner) is part of the
standard RCE checkout, and should therefore be present in your development workspace
already. You can verify this by starting RCE from Eclipse and executing the command
"run-test" in the RCE command console. If it prints usage information,
the extension is available as it should.
The only manual setup that is required is adding an Instance Management configuration
to the RCE instance launched from Eclipse. This configuration defines the root directory
where work files and directories will be stored, and the URLs that standalone RCE build
will be downloaded from. Locate the profile directory that is being launched and edit
its configuration.json file. In this file, add this configuration block on
the root JSON level, and adjust the settings as necessary:
"instanceManagement": {
"dataRootDirectory": "C:\\ExampleWorkdir\\rce-im",
"downloadSourceFolderUrlPattern":
"https://software.dlr.de/updates/rce/8.x/products/
standard/*/zip/",
"downloadFilenamePattern": "rce-*-standard-win32.x86_64.zip"
}
The asterisks in the URL patterns mark the locations where the specified "build id" (see below) and the automatically determined qualified build number will be inserted.
It is strongly recommended to use a short full filesystem
path as the dataRootDirectory, as RCE installations will be placed
inside of it, and long filesystem paths are known to cause problems with these. The
exact maximum lenght will be determined, documented, and maybe also automatically
checked in the future.
The TSR is invoked by a single console command (run-test), with an alias
for readability (run-tests). The general syntax is:
run-test[s] <comma-separated list of test ids>|--all <build
id>
The actual test scripts are located in *.feature files in the
/de.rcenvironment.supplemental.testscriptrunner.scripts/resources/scripts
directory. The "test ids" in the command description are the annotation-like tags above
the indivual test scenarios, e.g. "@Test01". These can be specified in the command with
or without the "@" character. "--all" executes all available test
scenarios. The reserved "@Disabled" and "@disabled" tags can
be used to mark tests as excluded in the *.feature files.
The <build id> is usually the part of the configured download URL marked by an
asterisk ("*"); for example, snapshots/trunk or
releases/8.1.1. This id is used within the test scripts as part of certain
test steps. For example, the test step "Given instances ... using the default build"
sets up one or more test instances to run with the build specified in the command, which
allows test scripts to be executed on different builds instead of hardcoding the release
or snapshot version to test.
Example: run-test Test04 snapshots/trunk
To support running test scripts on locally generated builds, a special form of build
id is supported as well: By prefixing it with "local:", a local path to a
build can be specified. This build is then executed from that location without copying
it. Note that the given path must point to an unpacked RCE build, unlike the standard
download URL, which points to zipped release packages.