Skip to main content
TestDriver supports generating JUnit XML reports that are compatible with most CI/CD systems, test reporting tools, and IDEs. This feature enables you to integrate TestDriver tests into your existing test infrastructure and get detailed test results in a standardized format.

Overview

JUnit XML reports provide structured test results that include:
  • Test Suite Information: Organized by folder structure from your testdriver directory
  • Test Case Details: Individual test files with execution status
  • Step-by-Step Results: Each step in your test with pass/fail status
  • System Output: Complete logs from test execution (ANSI codes stripped)
  • Error Information: Detailed failure messages and stack traces
  • Timing Data: Execution duration for tests and individual steps

Basic Usage

Enable JUnit reporting by adding the --junit flag to your TestDriver command:
This will:
  1. Execute your TestDriver test normally
  2. Generate a JUnit XML report at the specified file path
  3. Include all test execution details in the report

Command Line Options

Examples

Basic usage:

Report Structure

Test Suite Hierarchy

JUnit reports organize your tests using the following structure:
  • Test Suite: Named after the folder path from your testdriver directory
  • Test Case: Individual test files (.yaml files)
  • Properties: Each step in your test with its status and prompt

Example Report Structure

For a test file at testdriver/features/login.yaml:

CI/CD Integration

GitHub Actions

Jenkins

GitLab CI


Test Result Details

Successful Tests

For passing tests, the report includes:
  • Test execution time
  • All step prompts with [passed] status
  • Complete system output logs
  • Command execution details

Failed Tests

For failing tests, the report includes:
  • Detailed failure messages
  • Failed assertion information
  • Failed step prompts with [failed] status
  • Error logs in <system-err> section
  • Exit code information

Example Failure Report


Integration with Test Viewers

JUnit Viewer

Generate HTML reports from your XML:

IDE Integration

Most IDEs support JUnit XML reports:
  • VS Code: Use test result extensions
  • IntelliJ IDEA: Import test results directly
  • Eclipse: Built-in JUnit viewer support