1.5.1 • Published 1 year ago

junit-testrail-reporter v1.5.1

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

NPM Package Version

You've got some test cases in TestRail that are automated and the results are ouputted in a JUnit format. This will report the results as a run in TestRail.

Installation

npm install --save-dev junit-testrail-reporter
pnpm install --save-dev junit-testrail-reporter
yarn add --dev junit-testrail-reporter

Usage

  1. Add the test suite and case identifier in the title of your test:

      ...
    
      it('S123456 C123456 given some scenario when an action is taken then something is true', () => {})
    
      // multiple test cases are supported as well
      test('S123456 C654321 C654321 C678901 given some scenario when an action is taken then something is true', () => {})
    
      // so are multiple test suites
      test('S123456 C123456 S654321 C654321 C678901 given some scenario when an action is taken then something is true', () => {})
    
      ...
  2. Configure and run your tests to output a JUnit test report

  3. Run

    npx junit-testrail-reporter --resultsPattern='test-results/*.xml'
    pnpm exec junit-testrail-reporter --resultsPattern='test-results/*.xml'
    yarn exec junit-testrail-reporter --resultsPattern='test-results/*.xml'

Configuration

Argument NameEnvironment VariableDescriptionRequiredDefault
host or hTESTRAIL_HOSTThe host of the TestRail server to send results to.✔️-
keepOpenTESTRAIL_KEEP_OPENIf true, the reporter will leave the test runs open in TestRail.false
-TESTRAIL_PASSWORDThe password, of the user, used to authenticate with TestRail.✔️-
milestoneIdTESTRAIL_MILESTONE_IDThe identifier, if any, of the milestone to group test results under.✔️-
projectIdTESTRAIL_PROJECT_IDThe identifier of the TestRail project to send results to.✔️-
resultsPattern or p-The glob pattern for test result files that will be reported to TestRail.✔️-
runName or rTESTRAIL_RUN_NAMEA brief description used to identify the automated test run."Automated Test Run via junit-testrail-reporter"
username or uTESTRAIL_USERNAMEThe username of the account to authenticate with TestRail.✔️-

The password configuration parameter can only be set via environment variable.

The resultsPattern configuration parameter can only be set via command line arguments.

1.5.1

1 year ago

1.5.0

1 year ago

1.4.1

1 year ago

1.4.0

1 year ago

1.3.0

2 years ago

1.2.0

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.1

3 years ago

1.0.0

3 years ago