RCPTT Test Runner takes various options like path to RCPTT projects, application-under-test and other parameters, runs all tests and produces reports in HTML and JUnit XML formats.
- build.xml – sample Ant script
- runner.sh – sample Shell script for Linux/Mac OS X
- runner.cmd – sample CMD script for Windows
The base command line for RCPTT runner looks like this (backslashes indicate line breaks instead, on Windows,
^ is used instead):
java <RCPTT Runner VM arguments> -jar /path/to/runner/plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar \ -application org.eclipse.rcptt.runner.headless \ -data /path/to/runner/workspace \ <the rest of arguments in form of -argName argValue>
Basic command-line options The table below summarizes information about arguments, arguments are more or less sorted by decreasing importance
|Local RCPTT License Server address.
|Path to application under test
|Semicolon-separated list of project folders with RCPTT tests or resources to link. RCPTT Runner will perform a recursive search of RCPTT projects in each of given folders.
|Path prefix for application-under-test's workspace. The workspace prefix given will be suffixed with incrementing restart index to make sure no data is lost in case of application-under-test restart, hang or crash. See also reuseExistingWorkspace.
|File path to save JUnit report with test exec results
|File path to save HTML report with test exec results
|File prefix for application-under-test process output. It will be appended with incrementing restart index for the same reason as -autWsPrefix arg.
|Semicolon-separated list of RCPTT Runtime options (see description below)
|List of arguments for application-under-test separated by semicolon.
|List of arguments for application-under-test's JVM separated by semicolon.
|List of Test suite names separated by semicolon. If this argument is set, RCPTT runner executes only test cases from given suites (otherwise it executes all tests from given projects).
|Semicolon-separated list of tags. Test cases containing any of listed tags are not be executed. The default value is 'skipExecution'.
|Java VM to use with application-under-test. By default it is set to the same Java VM which is used for RCPTT Runner launching
|Overall execution timeout in seconds, default value is 18000 (5 hours)
|application-under-test connection timeout in seconds, default value is 300 (5 mins).
|Generate report with custom reporting renderer. "id;path" format should be used to specify report renderer id and path to export.
|If provided, -eclipse.keyring parameter will not be specified. Also -testOptions could contain "overrideSecurityStorage=false" for same effect.
|This argument does not have value
|If specified, print AUT memory usage in Runner stdout
|This argument does not have value
|Semicolon-separated list of test name glob patterns (* - any chars, ? - exactly one char). If this argument is set, RCPTT runner executes listed test cases only. This argument also works with combination with
suites argument, i.e. at first Runner collects all tests from provided suites and then filters it by test names
|-tests myTest.test or -test myTest*
|If present, autWsPrefix is treated as full path to the existing workspace. This workspace is never recreated and always reused.
|This argument does not have value
Injection mechanism allows to install some extra features into application-under-test before test execution. This might be useful in two cases:
- The product being tested is distributed as an update site, so there's no default all-in-one RCP application. In this case Eclipse SDK (or other eclipse package) can be used as application-under-test and plugins being tested will be installed into it.
- Application-under-test requires some extra plugins for testing, and these plugins are undesirable in a final product
Injection mechanism currently does not resolve dependencies automatically, i.e. it just puts specified plugins/features into an application, but does not make sure that all prerequisites are installed.
Injecting from Update Site
In command line it is specified as argument with name injection.site where value is update site URL optionally followed by list of features separated by semicolon. If list of features is omitted, then all features from given site will be installed
It is possible to specify this argument several times to inject features from more than one update site.
Injecting from a directory
This way is similar to dropping some plugins into eclipse/plugins folder:
It is possible to specify this argument several times to inject plugins from more than one directory.
RCPTT Runtime options
This table summarizes RCPTT runtime options which are rarely need to be modified and can be specified in
testOptions argument. In RCPTT IDE these options can be set by going to Preferences -> RCP Testing Tool -> Advanced Options.
|When true, include output of 'take-screenshot' and 'trace' ECL commands into a report
|Timeout for a single test execution in seconds
|Context applying timeout in milliseconds
|If there are any jobs started after context applying, wait for their completion during this time (in milliseconds).
|Timeout in milliseconds for jobs scheduled from eclipse Debug plugin.
|If job reschedules itself more than times specified by this parameter, RCPTT stops setting delay to 0 (see jobScheduleDelayedMaxtime parameter).
|When job is in sleeping mode (see jobTreatAsSleeingTimeout option), execute commands with given delay (in milliseconds) between commands.
|Wait timeout in milliseconds for stepping jobs (see jobTreatAsSleepingTimeout and jobSleepingStepTime)
|If job executes more than this time (in milliseconds) and sleeps (i.e. executing Thread.sleep() or Object.wait()), then RCPTT considers that this job is waiting for some user actions and continues to the next command.
|If Display.timerExec is scheduled for the delay less than this value (in milliseconds), set delay to 0.
|How many seconds Runner should wait for application startup.
|Job hang skip timeout in milliseconds. If job is running longer than this time, RCPTT Runtime considers that it is hung and moves to the next command.
|Max job scheduled delay to be waited for in milliseconds. If job is scheduled with delay less than this value, RCPTT sets delay to 0 and waits for job completion (also see jobNullifyRescheduleMaxValue). Otherwise RCPTT Runtime does not wait for job completion if it is scheduled with a delay greater than this value.
|Kill AUT on connect error. Whether Runner should kill application-under-test if it cannot connect to it.
|Wait for a given milliseconds between each ECL command. This can be useful when things go wrong at some point and it is hard to determine when by looking at execution. Setting this value to, say, 500, allows to inspect RCPTT actions in more details.
|Forces garbage collection on workspace cleanup.
|Use following EMF features for part identity
|Non EMF object identity method
|EMF object identity by 'name feature' support
|Use text content for part identity
When Runner executed on a machine behind a proxy server, it is possible to specify proxy settings via Java's system properties (see http://docs.oracle.com/javase/6/docs/technotes/guides/net/proxies.html):
java -Dhttp.proxyHost=my-local-proxy -Dhttp.proxyPort=8080 -jar ...