It can be convenient to dry-run a Trade Federation (TF) configuration to verify that it's properly configured.
There are two different mechanisms in TF for this.
General configuration
The dry-run command checks that a configuration is parsed correctly and is
runnable. The command does not run TF so this validation is limited to the
TF configuration syntax.
Configuration for test suites
For the test suite configurations, such as CTS, the --collect-tests-only
command is available. It runs everything except the test cases, which are
enumerated. However, it does run all the other setup steps, like installing
APKs.
This is a convenient option to ensure that a configuration runs as expected without actually running the tests.
Dry run command reference
This table summarizes the dry run commands for various uses.
| Host | Description |
|---|---|
run cts --collect-tests-only |
collect-tests-only CTS excluding MCTS modules |
ENABLE_XTS_DYNAMIC_DOWNLOADER=false ./cts-tradefed
run cts --collect-tests-only |
collect-tests-only CTS including MCTS modules |
Support for collect-tests-only
The support for the collect-tests-only is exposed via ITestCollector.
A test runner that implements this interface enumerates its test cases instead of running them.
InstrumentationTest is an example implementation of that interface.