CLI reference

General reference 

$ trcli --help
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.
  -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
  --help             Show this message and exit.

Commands:
  parse_junit  Parse report files and upload results to TestRail

Parse JUnit reference (upload results)

$ trcli parse_junit --help
Usage: trcli parse_junit [OPTIONS]                                
                                                                  
  Parse report files 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 JUnit report and
                      TestRail.
  --suite-id          Suite ID for the results they are reporting.  [x>=1]
  --run-id            Run ID for the results they are reporting (otherwise the
                      tool will attempt to create a new run).  [x>=1]
  --milestone-id      Milestone ID to which the Test Run should be associated
                      to.  [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
  --special-parser    Optional special parser option for specialized JUnit
                      reports.
  --allow-ms          Allows using milliseconds for elapsed times.
  --help              Show this message and exit.
Was this article helpful?
2 out of 3 found this helpful