0.6.19 • Published 5 years ago

bifrost-io v0.6.19

Weekly downloads
470
License
ISC
Repository
-
Last release
5 years ago

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

0.6.19

5 years ago

0.6.18

5 years ago

0.6.17

5 years ago

0.6.16

5 years ago

0.6.15

5 years ago

0.6.14

5 years ago

0.6.13

5 years ago

0.6.12

5 years ago

0.6.11

5 years ago

0.6.10

5 years ago

0.8.0

5 years ago

0.6.9

5 years ago

0.6.8

5 years ago

0.6.7

5 years ago

0.6.6

6 years ago

0.6.5

6 years ago

0.6.4

6 years ago

0.6.3

6 years ago

0.6.2

6 years ago

0.6.1

6 years ago

0.6.0

6 years ago

0.5.9

6 years ago

0.5.8

6 years ago

0.5.7

6 years ago

0.5.6

6 years ago

0.5.5

6 years ago

0.5.4

6 years ago

0.5.3

6 years ago

0.5.2

6 years ago

0.5.1

6 years ago

0.5.0

6 years ago

0.4.1

6 years ago

0.3.12

6 years ago

0.3.11

6 years ago

0.3.8

6 years ago

0.3.7

6 years ago

0.3.6

6 years ago

0.3.4

6 years ago

0.3.2

6 years ago

0.3.1

6 years ago