CLI reference

TestRail_CLI (Navy Logo).png

General reference 

$ trcli --help
TestRail CLI v1.9.12
Copyright 2025 Gurock Software GmbH - www.gurock.com
Usage: trcli [OPTIONS] COMMAND [ARGS]...

  TestRail CLI

Options:
  -c, --config       Optional path definition for testrail-credentials file or
                     CF file.
  -h, --host         Hostname of instance.
  --project          Name of project the Test Run should be created under.
  --project-id       Project id. Will be only used in case project name will
                     be duplicated in TestRail  [x>=1]
  -u, --username     Username.
  -p, --password     Password.
  -k, --key          API key used for authenticating with TestRail.
This must be used in conjunction with --username.
If provided, --password is not required. -v, --verbose Output all API calls and their results. --verify Verify the data was added correctly. --insecure Allow insecure requests. -b, --batch-size Configurable batch size. [default: (50); x>=2] -t, --timeout Batch timeout duration. [default: (30); x>=0] -y, --yes answer 'yes' to all prompts around auto-creation -n, --no answer 'no' to all prompts around auto-creation -s, --silent Silence stdout --proxy Proxy address and port (e.g., http://proxy.example.com:8080). --proxy-user Proxy username and password in the format 'username:password'. --noproxy Comma-separated list of hostnames to bypass the proxy (e.g., localhost,127.0.0.1). --help Show this message and exit. Commands:
add_run Add a new test run in TestRail parse_junit Parse JUnit report and upload results to TestRail parse_openapi Parse OpenAPI spec and create cases in TestRail parse_robot Parse Robot Framework report and upload results to TestRail

Parse JUnit reference (upload results)

$ trcli parse_junit --help
TestRail CLI v1.9.12
Copyright 2025 Gurock Software GmbH - www.gurock.com
Usage: trcli parse_junit [OPTIONS]

  Parse JUnit report and upload results to TestRail

Options:
  -f, --file          Filename and path.
  --close-run         Close the newly created run
  --title             Title of Test Run to be created in TestRail.
  --case-matcher      Mechanism to match cases between the report and
                      TestRail.
  --suite-id          Suite ID to submit results to.  [x>=1]
  --suite-name        Suite name to submit results to.
  --run-id            Run ID for the results they are reporting (otherwise the
                      tool will attempt to create a new run).  [x>=1]
  --plan-id           Plan ID with which the Test Run will be associated.
                      [x>=1]
  --config-ids        Comma-separated configuration IDs to use along with Test
                      Plans (i.e.: 34,52).
  --milestone-id      Milestone ID to which the Test Run should be associated
                      to.  [x>=1]
  --section-id        Section ID to create new sections with test cases under
                      (optional).  [x>=1]
  --run-description   Summary text to be added to the test run.
  --case-fields       List of case fields and values for new test cases
                      creation. Usage: --case-fields type_id:1 --case-fields
                      priority_id:3
  --result-fields     List of result fields and values for test results
                      creation. Usage: --result-fields custom_field_a:value1
                      --result-fields custom_field_b:3
  --allow-ms          Allows using milliseconds for elapsed times.
  --special-parser    Optional special parser option for specialized JUnit
                      reports.
  --help              Show this message and exit.
Was this article helpful?
6 out of 18 found this helpful