Record test results

2 minute read

Before you start recording test results to test sessions, consider your Test Session Layouts.

CloudBees Smart Tests uses the test results from each test session to provide features. After running tests, run the smart-tests record tests command to record test results in your workspace.

The general structure of this command is as follows:

smart-tests record tests <BUILD OPTIONS> <TOOL NAME> <PATHS TO REPORT FILES>

  • <BUILD OPTIONS>: Use one of the following:

    • --no-build, where no build information is captured with the test results. This is the best option for getting started quickly. The examples on this page all use this option.

    • --build <BUILD NAME>, is used if you recorded a build before running tests (for predictive test selection only). For more information, refer to Record builds with the CloudBees Smart Tests CLI.

      Even if you plan to use Predictive test selection, you can always start recording tests without recording builds and then record builds later.

    • --session <SESSION ID STRING>, is used if you have a complex test session layout. For more information, refer to Manage complex test session layouts.

  • <TOOL NAME>: This command varies slightly based on your test runner/build tool. For more information, refer to Supported test frameworks and integrations for specific tool instructions.

  • <PATHS TO REPORT FILES>: After recording tests, view recorded test sessions on the menu:[Test Session] dashboard of the CloudBees Smart Tests.

Select a session to view details and failed tests.

Test session dashboard
Figure 1. Test session dashboard

The CLI will also output a link to view each session’s details in the web app.

Instructions for test runners/build tools

The CloudBees Smart Tests CLI supports many popular test runners and build tools. Follow the instructions for the tool used to record test results.

Table 1. System-specific test runners/build tools

Android CTS

Android Debug Bridge (ADB)

Ant

Bazel

Behave

CTest

cucumber

dotnet test

Flutter

GoogleTest

Go-Test

Gradle

Jest

Karma

Maven

minitest

NUnit console runner

prove for Perl

Playwright

pytest

Robot

RSpec

Ruby test unit

TestNG

vitest

XCTest

Other integrations

If not using one of the test runners above, CloudBees Smart Tests also uses the following options: