Capturing test reports and selecting tests to run in multiple environments (for example, browser tests, mobile tests, etc.)
|
This page relates to Record test results with Cloudbees Smart Tests. |
Lots of teams run the same tests across several different environments. For example, a UI test suite might be run in several browsers in parallel. Or perhaps you need to build a slightly different version of a mobile app for different locales and need to run the same tests across all of them.
In these scenarios, a test result is not just a test result: it is the combination of the test and the environment that it was run in. A test might pass in one environment but fail in another.
Cloudbees Smart Tests supports these scenarios with a concept called flavors .
--flavor is set once, as key-value pairs, when you create the test session with smart-tests record session. (You can submit multiple key-value pairs, too: --flavor key=value --flavor key2=value2 .) smart-tests subset and smart-tests record tests don’t take a --flavor option themselves — every test recorded or subsetted through a session automatically carries that session’s flavor, so create one session per flavor and reference it with --session for every step of that flavor’s run.
For example, reporting results for two flavors, with no subsetting yet:
Later, when you want to request a subset of tests, request it against the flavor’s session — the subset will automatically be scoped to that flavor.
For example:
This feature lets you select the right tests to run based on the changes being tested and the environment they are being run in.