1.0.1 • Published 2 years ago

wdio-enverus-html-reports v1.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

WDIO Enverus HTML reporter

About

A reporter for webdriver.io which generates a HTML report.

Getting Started

Install Enverus HTML reporter as an npm module and save it to your package.json file as a development dependency:

npm i wdio-enverus-html-reports --save-dev

Once installed it can now be referenced by simply calling import emailReporter from 'wdio-enverus-html-reports';

Available methods:

  • createReportFile
  • afterFeature
  • afterSuite
  • addReportPortalLaunchUrl
  • addCustomMessage
  • afterAll

How to use:

    onPrepare: async function (config, capabilities) {
        emailReporter.createReportFile(emailSuiteReport);
        
    },

    beforeSuite: async function (suite) {
        const suiteTitle = suite.title.match(/(T\d+)/);
        global.suiteID = suiteTitle[1];
    },

    afterTest: async function (test, context, { error, result, duration, passed, retries }) {
        failedStepName = context.test.title;
        stepError = error;
        global.testSuiteTitle = context.test.parent.title;
    },

    after: async function (result, capabilities, specs) {
        emailReporter.afterSuite(testSuiteTitle, result, emailSuiteReport, failedStepName, stepError);
    },

    onComplete: async function (_, config, capabilities, results) {
        emailReporter.addCustomMessage('resultMessage', results, process.env.testsArray, 'API');
        emailReporter.afterAll(emailSuiteReport);
    },
1.0.1

2 years ago

1.0.0

2 years ago