Links

Requesting and running a subset of tests

Once you've started Training a predictive model with your data, you can connect your test runner with Launchable.
We strongly suggest that you request and run a 100% subset of tests (i.e. run all the tests you normally would) before you actually run partial subsets in your pipeline. That way you can identify and fix any integration issues.
The high level flow for subsetting is:
  1. 1.
    Get the full list of tests (or test files, targets, etc.) and pass that to launchable subset along with:
    1. 1.
      an optimization target for the subset
    2. 2.
      a build name, so Launchable can choose the best tests for the changes in the build being tested
  2. 2.
    launchable subset will get a subset from the Launchable platform and output that list to a text file
  3. 3.
    Pass the text file into your test runner to run only those tests
The diagram below illustrates the interactions between your tools, the Launchable CLI, and the Launchable platform:
The diagram above uses the generic term test files, but the real object type may be different depending on your stack (e.g. test classes, test targets, etc.).

Requesting and running a subset

Use launchable subset to request a subset of tests. You'll run this command before your normal test runner command.
Here's an example using Ruby/minitest. For integration, we're using an optimization target of 100% so that all tests are still run:
launchable subset \
--build <BUILD NAME> \
--target 100% \
minitest test/**/*.rb > launchable-subset.txt
The --build option should use the same <BUILD NAME> value that you used in launchable record build.
This creates a file called launchable-subset.txt that you can pass into your test runner.
Again, with Ruby/minitest:
bundle exec rails test $(cat launchable-subset.txt)
Subsetting instructions depend on the test runner or build tool you use to run tests. Click the appropriate link below to get started:

Checking for integration issues

Coming soon!