Recording builds with the Launchable CLI
Background
Each Test Session is associated with a Build.
In particular, Predictive Test Selection selects tests based on the Git changes in a build (among other data).
Recording builds
To record a build, run launchable record build
before you create a build in your CI script:
launchable record build --name <BUILD NAME> --source src=<PATH TO SOURCE>
With the
--name
option, you assign a unique identifier to this build. You will use this value later when you record test results. See Choosing a value for <BUILD NAME> for tips on choosing this value.The
--source
option points to the local copy of the Git repository (or repositories) used to produce this build, such as.
orsrc
.Make sure to point to a full clone of each repository, not a partial clone.
GitHub Actions users: if you use
actions/checkout
to check out the current repo, setfetch-depth: 0
.
You can view your recorded builds on the Builds page of the Launchable dashboard at app.launchableinc.com.
Recording test results against your builds
After you record a build, you can record test results against it by updating the launchable record tests
invocation(s) you created after following Recording test results with the Launchable CLI:
Instead of --no-build
, use --build <BUILD NAME>
where <BUILD NAME>
is the value you used for --name
in launchable record build
.
# before
launchable record tests --no-build <TOOL> <PATH TO REPORTS>
# after
launchable record tests --build <BUILD NAME> <TOOL> <PATH TO REPORTS>
If done correctly, you'll see the corresponding build name for each test session on the Test Sessions page.