icon

Export test results to Test Reports

This Step is used to search for test results and export them for the Deploy to Bitrise.io Step which can export the results to the Test Reports.

Not all testing Steps automatically export their results to the Test Reports. This Step is designed to export the results of those Steps that do not do this automatically. The Step creates the required test-info.json file and deploys the test results in the correct directory for export.

Configuring the Step

To use this Step to export the results of a testing Step - for example, Flutter Test -, you need to make sure that:

  • The Step knows which folder to look for your test results.
  • The Step knows which file to look for.
  • The Step exports to the correct directory.
  1. In the The name of the test input, set the name you want to see in the Test Reports. Each exported results file has a separate tab with the name defined here.

  2. In the Test result base path input, set the path where your test results can be found.

    This input determines where Bitrise will look for your test results. We recommend setting a folder here, though you can also set a specific file path.

  3. In the Test result search pattern input, set a glob pattern that matches a single test result output file.

    This search pattern is used to search every file and folder of the provided base path which was set in the Test result base path input. If there is more than one match, you will receive a warning and the Step will export the first match.

    If you set a specific file path in the previous input, just set * here.

  4. In the Step's test result directory input, make sure the path points to a valid directory.

    By default, do NOT modify this input’s value. It should be set to the $BITRISE_TEST_RESULT_DIR Env Var.

  5. Make sure you have a Deploy to Bitrise.io Step in your Workflow. This step is responsible for deploying the exported files from the test result directory to the Test Reports.

Troubleshooting

  • You always need a Deploy to Bitrise.io Step in your Workflow to export test results to the Test Reports. If you can't see your results in Test Reports, check that you have the Step in your Workflow.

  • If more than one file matches the pattern set in the Test result search pattern input, you will receive a warning. It should only match a single file in the base path.

  • If either the Test result base path input or the Test result search pattern input isn't set correctly or if either is left empty, the Step will fail.

Useful links

Test reports Exporting custom tests to test reports

Related Steps

Android Unit Test Xcode Test for iOS

Similar steps

Deploys build artifacts to make them available for the user on the build's Artifacts tab. Sends test results to the Test Reports (build's Tests tab). Uploads Pipeline intermediate files to make them available in subsequent Workflows and also uploads Bitrise and user generated html reports.

Parses Composer junit test results and stores them in environment variables. $COMPOSER_ALL_TEST_COUNT and $COMPOSER_PASSED_TEST_COUNT respectively.

Run your ApiSpotter tests and get the test result to your Bitrise build.

Exports a universal APK from an Android App Bundle.