npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

wdio-light-reporter

v0.2.7

Published

A WebdriverIO plugin. Generates json results in light format.

Downloads

3,958

Readme

WDIO-LIGHT-REPORTER

Inspired by HTML and Mochawesome reporter

!Philosphy:

This reporter does not support cucumber Report regeneration and is developed keeping in mind the bdd an mocha framework. Here,describe() section is considered as test scenario and it() as testcase inside the test scenarios.

FEATURES

  1. Easy setup
  2. Enhanced UI
  3. Screenshot embedded in html report
  4. addLabel() to include steps context or name

Releases

V 0.1.9 - Initial release V 0.2.6 - (latest)

  1. Include multiple enviroment runs and segregate base on enviroment.
  2. Fix bugs
  3. Improved performance.

EXAMPLES

Example Example Example

Installation

NPM

npm install wdio-light-reporter --save-dev

Configuration

reporters: ['dot', ['light',{
      outputDir: './Results',
      outputFile:`demo${new Date()}`,    // html report file will be name this 
      addScreenshots: false,   // to add screenshots in report make it as true. Default is false
  }]
],

Screenshots

The Reporter does not have capability to automatically configure to take screenshots but however if manually configured, it listen to the event and attach the screenshots in the HTML report. To include screenshots in the report add below code in the afterTest() hook in the wdio conf file.

afterTest: async function (test,context,{ error, result, duration, passed, retries }) {
    if (!passed) {await browser.takeScreenshot()}
},

ResultFiles

Each run regenerates json report for each spec files, to generate combined json and HTML report, add below code in the onComplete() hook in wdio conf file

 onComplete: function (exitCode, config, capabilities, results) {
    const mergeResults = require("wdio-light-reporter/src/mergeResults"); //you can add this on top of the file
    mergeResults("./Results");
 },

If you run your test wihout any --suite option then it considers default as the suite Reporter does not works if you give multiple parameters as suites while run. wdio run wdio.conf.js --suite firstSuite - (WOKRS FINE) :)
wdio run wdio.conf.js --suite firstSuite --suite secondSuite (DOES NOT WORK) :(

Adding Context

You can use useLabel() to add context to any steps or added to include it as steps.

const { addLabel } = require("wdio-light-reporter").default;
describe("Show how to use addLabel ", () => {
  it("report will added this a steps/context in report", async () => {
      addLabel("Log Example 1 as step 1")
      console.log("Log Example 1 )
      addLabel("Log Example 2 as step 2")
      console.log("Log Example 2 )
  })
})

Updates

 reporters: ['dot', ['light',{
      outputDir: './Results',
      outputFile:"demo",    // html report file will be name this 
      addScreenshots: false,   // to add screenshots in report make it as true. Default is false
      //autoClean:false       // removed autoClean and include the same functionality as default in mergeResult function
  }]
],

License

MIT Free, Hell Yeah!