

Dry running a configuration

It can be convenient to dry-run a Trade Federation (TF) configuration to ensure that TF is 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.

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.