First, follow the steps in the Getting started guide to install the Launchable CLI, set your API key, and verify your connection.
Then return to this page to complete the integration.
Launchable chooses which tests to run based on the changes contained in a build. To enable this, you need to send build information to Launchable.
Right before you create a build in your CI script, invoke the Launchable CLI as follows:
launchable record build --name <BUILD NAME> --source src=<PATH TO SOURCE>
--name option, you assign a unique identifier to this build. You will use this value later when you request a subset and record test results. See Choosing a value for
<BUILD NAME> for tips on choosing this value.
--source option points to the local copy of the Git repository used to produce this build, such as
The Nose plugin automatically sends test results to Launchable when you run Nose with
However, if you want to submit test reports from a full test run to help train the model, run your tests with the
nosetests --launchable-build-number <BUILD NAME> \--launchable-record-only
First, install the Launchable plugin for Nose using PIP:
$ pip install nose-launchable
To run a meaningful subset of tests, invoke
nosetests with three extra flags:
# subset tests with Launchablenosetests --launchable-build-number <BUILD NAME> \--launchable-subset \--launchable-subset-options <LAUNCHABLE CLI SUBSET OPTIONS>
--launchable-build-number flag tells Launchable which build is being tested. This should be the same value you used for
launchable record build before. The
--launchable-subset flag enables subsetting.
--launchable-subset-options flag tells the plugin which Launchable CLI subset options to use. For example, to use the Launchable CLI's
--target option, the flag should look like
--launchable-subset-options '--target 10%'. This runs a subset of the most useful test targets that will run in 10% of the full execution time. You can also use
--launchable-subset-options '--time 100' to run a subset of the most useful test targets that will run in 100 seconds. See the CLI reference for more options.
If you encounter issues running Nose with the Launchable plugin, you can set the
LAUNCHABLE_DEBUG environment variable to
1 before running tests to print debug logs.
# enable debug logsexport LAUNCHABLE_DEBUG=1# run tests with Launchablenosetests --launchable-subset ...
The Launchable Nose plugin is open source and available on GitHub. Pull requests are always appreciated!