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

bifrost-io

v0.6.19

Published

Client library for heimdall (an e2e dashboard server)

Downloads

14,715

Readme

bifrost.io

JS client library to send E2E report data to a heimdall.io dashboard service for visualization.

Currently provides integrations for these UI testing frameworks:

Use it in your codeceptjs project

Install the bifrost-io client package

    npm i bifrost-io --save

Add the .bifrost.js file to the root of your project and set ownerkey and dashboard host.

    module.exports = {
        ownerkey: 'YOUR KEY HERE', 
        dashboardHost: 'YOUR DASHBOARD HOST NAME HERE'
    }

Alternatively you could provide key and host on a per run basis on the command line:

    cross-env OWNER_KEY=YOUR_KEY DASHBOARD_HOST=YOUR_HOST codeceptjs run

Add the bifrost-io helper for codeceptjs to your codecept.json config file

NOTE that bifrost-io currently works ONLY with the WebDriverIO backend.

  "helpers": {
    "WebDriverIO": {
      "url": "http://localhost",
      ...
    },
    "BifrostHelper": {
      "require": "bifrost-io/codeceptjs/dashboard_helper.js"
    },
    ...
  },

Now just run your tests

    codeceptjs run

After the test run you should see this line in the output

Go here to see reports:
  http://YOUR_DASHBOARD_HOST:4000/tests?ownerkey=YOUR_KEY&project=YOUR_PROJECT&runid=H1RgPInCM

Just click on the link and view your reports

For a working codeceptjs example project please take a look at the codeceptjs demo project.

Typical Use Cases

Categorize your tests in folders

CodeceptJS lets you organize your test files in a folder hierarchy. You should use this to categorize your tests. E. g. you could

  • Categorize by feature category
  • Categorize by application/component and then by feature category

The folder hierarchy can then be used in test reports to generate a table of contents for tests.

Since you usually do not want to include the test base folder as a category, you can remove that by using the cutPrefix config parameter.

  BifrostHelper: {
      require: "bifrost-io/codeceptjs/dashboard_helper.js",
      cutPrefix: "/features"
    },

Specify the environment when running tests

You should specify NODE_ENV when running your tests. The following environment names are supported:

  • development - when you run tests from your development machine
  • test, integration - when you run your tests against an integration/test system
  • staging - when you run your tests against a near/pre production environment
  • production - when you run your tests against a production environment

Run tests in mobile emulation mode

In order to run your web browser tests on a different device (using chrome emulation mode)

  # run on iPhone
  cross-env TEST_DEVICE="iPhone 6" codeceptjs run 

  # Run on iPad
  cross-env TEST_DEVICE="iPad Pro" codeceptjs run 

  # Run on Google Pixel 2
  cross-env TEST_DEVICE="Pixel 2" codeceptjs run 

For a list of availabe devices see https://github.com/AndreyBelym/chrome-emulated-devices-list/blob/HEAD/devices.md

See in action

Going from a failing (red) to a green test

Video