0.11.1 • Published 2 years ago

testcafe-reporter-testrail v0.11.1

Weekly downloads
720
License
MIT
Repository
github
Last release
2 years ago

NPM NPM NPM

Description

Reporter plugin that sends test results to TestRail

It does not provide test output to console, please use with combination with the default reporter

Usage

  1. Installation

    npm install testcafe-reporter-testrail --save-dev

  2. Add reporter to testrail configuration. Make sure to also include default reporter if reporters option was not provided

    Command Line:

    testcafe chrome tests/* -r spec,testrail:out.xml

    API:

    testCafe
        .createRunner()
        .src('path/to/test/file.js')
        .browsers('chrome')
        .reporter(['spec', { name: 'testrail', output: '' }]) // <-
        .run();
  3. Provide required options from the configuration section

Prerequisites

  • All test cases should have a valid mapping between TestCafe and TestRail. TestRail Case ID should be put into TestCafe test metadata. (Example: test.meta({CID: 'C123'})('test name', async t => { .... });)

Configuration

Configuration can be provided via:

  • ENV variables
  • configuration file (.testrailrc)
ENV VariableConfigDescriptionDefaultRequired
TESTRAIL_ENABLEDenabledEnables TestRail integration.false
TESTRAIL_HOSThostURL of the TestRail instance.true
TESTRAIL_USERuserAccount name which will be used to push results.true
TESTRAIL_API_KEYapiKeyAPI key which can be generated on the profile page in TestRail.true
TESTRAIL_PROJECT_IDprojectIdProject id in which test cases are stored. Ex. P123true
TESTRAIL_SUITE_IDsuiteIdSuite id in which test cases are stored. Ex. S123true
TESTRAIL_RUN_IDrunIdRun id which test cases are stored. Ex R123
TESTRAIL_CASE_METAcaseMetaMeta attribute to be used to get TestRail case id mapping.'CID'
TESTRAIL_RUN_NAMErunNameTest Run name. Configurable with variables %BRANCH% - see config option branchEnv%BUILD% - see config option buildNoEnv%DATE% - see config option dateFormat%BRANCH%#%BUILD% - %DATE%
TESTRAIL_RUN_DESCRIPTIONrunDescriptionYou can provide you own Test Run description. If this option is not configured, it will contain test results and test coverage.
TESTRAIL_REFERENCEreferenceString that will be added to the refs field in TestRail. This can enable integration with other tools like https://github.com/DamianOsipiuk/jest-reporter-testrail/. Configurable with variables %BRANCH% - see config option branchEnv%BUILD% - see config option buildNoEnv
TESTRAIL_BRANCH_ENVbranchEnvWhich ENV variable is used to store branch name on which tests are run.BRANCH
TESTRAIL_BUILD_NO_ENVbuildNoEnvWhich ENV variable is used to store build number of tests run.BUILD_NUMBER
TESTRAIL_DATE_FORMATdateFormatWhat date format should be used for %DATE% placeholder. https://momentjs.com/ formats supported.YYYY-MM-DD HH:mm:ss
TESTRAIL_RUN_CLOSE_AFTER_DAYSrunCloseAfterDaysAfter how many days should reporter close old Runs in testrail.
TESTRAIL_UPLOAD_SCREENSHOTSuploadScreenshotsShould upload screenshots to testrail. Requires test result edit enabled in testrail.false
TESTRAIL_UPLOAD_VIDEOSuploadVideosShould upload videos to testrail. Requires test result edit enabled in testrail.false
TESTRAIL_UPDATE_RUN_TEST_CASESupdateRunTestCasesTells to the reporting tool to no create or update the given test run, you need to create the mapping for the testcases manuallytrue
0.11.1

2 years ago

0.11.0

2 years ago

0.10.0

2 years ago

0.9.0

3 years ago

0.8.0

3 years ago

0.7.1

3 years ago

0.7.0

3 years ago

0.6.3

3 years ago

0.6.2

4 years ago

0.6.1

4 years ago

0.6.0

4 years ago

0.5.2

4 years ago

0.5.1

4 years ago

0.5.0

4 years ago

0.4.3

4 years ago

0.4.2

4 years ago

0.4.1

4 years ago

0.4.0

4 years ago

0.3.1

4 years ago

0.3.0

4 years ago

0.2.1

4 years ago

0.2.0

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago