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).

You can start Recording test results with the Launchable CLI with the --no-build option. This is a good strategy for getting data flowing to Launchable quickly.

However, if you plan to use Predictive Test Selection, you should then come back and start recording builds.

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 . or src.

    • 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, set fetch-depth: 0.

    • See also Recording builds from multiple repositories.

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.