1.0.15 • Published 4 years ago

testcafe-reporter-testrail-ultimate v1.0.15

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

testcafe-reporter-testrail-ultimate

This is the testrail-ultimate reporter plugin for TestCafe.

Preview

Install

npm install testcafe-reporter-testrail-ultimate

Usage

When you run tests from the command line, specify the reporter name by using the --reporter option:

testcafe chrome 'path/to/test/file.js' --reporter testrail-ultimate

When you use API, pass the reporter name to the reporter() method:

testCafe
    .createRunner()
    .src('path/to/test/file.js')
    .browsers('chrome')
    .reporter('testrail-reporter') // <-
    .run();

Configuration

In the root folder of project (where the main package.json is placed) create the file named ultimateReporterConfig.js

You can set settings programmatically, pass from CI with process.env

Template of this file:

module.exports = {
  shouldSendReport: boolean,
  TestrailHost: "https://YOURDOMAIN.testrail.io/",
  TestrailUser: "USER@EMAIL.com",
  TestrailPassword: "APIKEY",
  TestrailProjectID: number,
  TestrailSuiteID: number, 
  testPlanName: 'string',
  shouldCreateTestPlanAndReuse: boolean,
  testPlanDescription: {
    use: boolean,
    data: 'string'
  },
  testPlanMilestoneID: {
    use: boolean,
    data: number
  },
  testRun: {
    name: "string",
    description: {
      use: boolean,
      data: 'string'
    }
  },
  shouldAttachScreenshotsOnFail: boolean,
  shouldPrintFixtureData: boolean,
  shouldClosePlanAfterRun: boolean,
  shouldTriggerApiReport: {
    use: boolean,
	reportID: number
  },
  configurationsMap: {
    use: boolean,
      map: {
      key1: "value1",
      key2: "value2"
      keyN: "valueN"
    }
  },
  testrailStatusIDs:{
    passed: 1,
    failed: 5,
    skipped: number,
    unstable: {
      use: boolean,
      id: number
    },
  }
};

shouldSendReport: boolean

False if reporter should be disabled for test debug runs

testPlanName: string

Name that will be posted to testrail. Mandatory.

shouldCreateTestPlanAndReuse: boolean and shouldClosePlanAfterRun: boolean Both settings are NOT compatible with each other. shouldCreateTestPlanAndReuse can be used for rare situation when in one instance of CI job few different test runners should be executed. Does not support parallel execution

shouldClosePlanAfterRun If we want to close test plan immediately after all tests are done.

testRun.name Is mandatory.

shouldAttachScreenshotsOnFail: boolean You can enable this setting if you have screenshot on fail enabled in TestCafe

Attachment

shouldTriggerApiReport Please refer to official reference https://www.gurock.com/testrail/docs/api/reference/reports

configurationsMap Optional. Please refer to https://www.tutorialspoint.com/testrail/testrail_test_plans_configuration.htm

Configurations

testrailStatusIDs Just assign correct IDs for statuses in your TestRail

Author

Alexander Motornyuk

1.0.15

4 years ago

1.0.14

4 years ago

1.0.13

4 years ago

1.0.12

4 years ago

1.0.11

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.0

4 years ago