Coder Social home page Coder Social logo

bugreplay / wdio-bugreplay-service Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 2.0 3.58 MB

BugReplay's integration with WebDriver.IO

Home Page: https://www.bugreplay.com/

License: Other

TypeScript 100.00%
wdio webdriverio automated-testing automation

wdio-bugreplay-service's Introduction

BugReplay WebDriver.IO Service

The BugReplay WDIO service records screencasts of your automated tests including timesynced JavaScript Console and Network logs

Installation

Install the package

npm install wdio-bugreplay-service --save-dev

or if you prefer to use yarn

yarn add wdio-bugreplay-service --dev

Configuration

Getting an API key

You will need to sign up for an account at https://bugreplay.com. After that you will need to login and get an API key by clicking the Hamburger Menu, click My Settings, and then Show API Key. You'll use this in the configuration file.

getting an API key

Adding the BugReplay Integration

In wdio.conf.js, you will need to add both the bugreplay service as well as add the configure the BugReplay automation extension to be added to chrome:

// wdio.conf.js
export.config = {
    // ...
    capabilities: [{
      // ...
      browserName: 'chrome',
      'goog:chromeOptions': {
        args: [
          '--load-extension=node_modules/bugreplay-automation/extension/',
          '--auto-select-desktop-capture-source=Record This Window'
        ]
      },
    }
    // ...
    services: [
        ['bugreplay', {
            apiKey: 'YOUR_BUGREPLAY_API_KEY_GOES_HERE',
            saveSuccessfulTests: true // the default is false
        }]
    ],
    // ...
};

After this configuration your tests will automatically be recorded to video, uploaded to BugReplay, and ready for playback alongside the timesynced JS console and network traffic logs.

Limitations

This currently only works for chromedriver and edgedriver. We're looking to expand to other browsers in the future.

Working with MS Edge (Chromium)

We've had the best luck using the selenium-standalone-service for running on MS Edge.

The configuration looks the same except instead of browserName: 'chrome' you'd have browserName: 'MicrosoftEdge'. Instead of goog:chromeOptions you'd have ms:edgeOptions.

Running the Test

Running from Command Line

You can run the test directly by running the following in your terminal:

npx wdio run ./wdio.conf.js

Setting up a script

Inside of package.json add the following to the scripts object:

"scripts": {
  "test:wdio": "wdio run ./wdio.conf.js"
}

You can name the script anything you'd like, it does not have to be test:wdio.

Then in your command line run:

npm run test:wdio

or

yarn test:wdio

wdio-bugreplay-service's People

Contributors

carter avatar dependabot[bot] avatar rkgupta avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.