Skip to content

a6a18/wdio-testrail-reporter

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Install

npm i testrail-wdio-reporter -D

Using

In wdio config file u have to do next:

const CustomReporter = require('testrail-wdio-reporter')


const wdioConfig = {
...
reporters: 
        [[CustomReporter, {
        suite_id: 1, //number of your suite
        link: 'link to your testrail <title>.testraile.io or other',
        login: 'login',
        apiToken: 'password or api token,
         tests:'it' /* an optional parameter, if present, generates a report after each IT block if not, generate report after each suite (describe/context block)  */
        }]]
...
}

Info

This reporter pushes results after every test suite (describe or contex blocks), using Axios to create http requests.

The tests titles (it block or suite) must have a title with number of test case, for example:

describe('some suite',()=>{
        it('C1 test case 1',()=>{
                //test
        })

        it('C2 test case 1',()=>{
                //test
        })
})

or

describe('C1 some test case',()=>{
        it('step 1 of test case',()=>{
                //test
        })

        it('step 2 of test case',()=>{
                //test
        })
})

Example of using

https://github.com/Kiriago-san/wdioTestActionsSync/tree/testrail

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%