BuildButler

TestRail Integration — Sync CI Test Results Automatically

Automatically export Jenkins, GitLab, and GitHub test results to TestRail. Create test cases, runs, and plans from CI builds with zero manual effort.

Every time a CI build completes, your test results should appear in TestRail automatically. No manual uploads. No custom scripts. No missed runs.

BuildButler connects your CI pipeline to TestRail and syncs test results on every build. Test cases are created or updated, test runs are populated, and your TestRail project stays current without anyone lifting a finger.

How it works

BuildButler exports test results to TestRail by creating or updating test cases, test runs, and test plans. Configure export rules as a JSON array where each object targets a set of CI jobs.

TestRail configuration — credentials, job mappings, and test sync

Configuration example

[
  {
    "jobPattern": "backend/*",
    "project": "Backend",
    "testPath": "Automated Tests/API",
    "testRun": "{jobName} #{buildNumber}",
    "searchMode": "name",
    "caseType": "Automated",
    "casePriority": "Medium",
    "closeRun": true,
    "fullyQualifiedTestName": true
  },
  {
    "jobPattern": "frontend/*",
    "project": "Frontend",
    "testPath": "Automated Tests/UI",
    "testPlan": "Release {branch}",
    "milestonePath": "Releases/{branch}",
    "searchMode": "name",
    "closeRun": false,
    "closePlan": false
  }
]

Template variables

VariableDescription
{jobName}CI job name
{buildNumber}Build number
{branch}Git branch name
{date}Build date (YYYY-MM-DD)

Key features

Automatic test case creation

When BuildButler encounters a test that doesn't exist in TestRail, it creates the test case automatically in the specified testPath. Existing tests are matched by name or full class path (configurable via searchMode).

Test runs and plans

Create standalone test runs or organize them under test plans. Use milestonePath to associate runs with TestRail milestones — milestones are created automatically if they don't exist.

Custom fields

Map custom TestRail fields on both test cases and results:

{
  "caseFields": { "custom_automation_tool": "Selenium" },
  "resultFields": { "custom_environment": "staging" }
}

Upload modes

ModeBehaviour
0 (default)Create new cases and update existing
1Create new cases only
2Update existing cases only
3Do not create or update cases (results only)

Supported CI systems

TestRail integration works with all CI systems that BuildButler supports:

  • Jenkins (plugin or API)
  • GitHub Actions
  • GitLab CI
  • TeamCity
  • BuildKite

Getting started

  1. Sign up for BuildButler (free tier includes TestRail integration)
  2. Connect your CI system
  3. Enter your TestRail credentials in System Settings
  4. Define your job mapping rules as JSON
  5. Run a build — test cases and results appear in TestRail

See the full TestRail configuration reference for all available fields.

On this page