Git Product home page Git Product logo

wdio-starter-kit's Introduction

Build Status js-semistandard-style

WebdriverIO Starter Kit

Boilerplate repo for quick set up of WebdriverIO test scripts with TravisCI, Sauce Labs and Visual Regression Testing

Configuration

  1. Clone the repo and run npm install
  2. Add a valid SAUCE_USERNAME and SAUCE_ACCESS_KEY to your environment variables to enable that integration. (Settting up Sauce)
  3. Update the 'baseUrl' property in wdio.conf.js and wdio.conf.local.js
  4. Create a 'test' folder and place your tests in it

Usage

By default, the kit is set up to run tests using the npm test command.

You can also lint your code with npm run lint.

This kit features:

More Details

Starter Test Cases

Because login and registration pages are ubiquitous on websites, I've included two test files with corresponding page objects.

You'll very likely need to replace the selectors used in the page objects.

You'll also want to update the isLoggedIn and isRegistered functions in the page objects to return the proper response.

Folder Structure

Tests and page objects go in the test\ folder, which you'll need to create.

Name tests with a .spec.js extension. For example: mytest.spec.js

Name Page Object files with a .page.js extention. For example: mypageobject.page.js

Visual regression screenshots will be saved to the screenshots folder.

TravisCI Integration

This kit includes a basic .travis.yml file set up to allow easy integration with their service. Simply enable your repo in TravisCI and you'll get it up and running. And be sure to update the badge information at the top of this file.

Debug Command Line Flag to adjust timeout

By setting the 'DEBUG' environment variable to true, the test timeout with be essentially removed, allowing you to run the debug command without your tests timing out.

DEBUG=true npm test

Configuration file flavors

By default, tests will run in Sauce Labs testing your production server.

To run the tests entirely locally, run:

npm test -- wdio.conf.local.js

wdio-starter-kit's People

Contributors

klamping avatar

Watchers

James Cloos avatar Dao Minh Dam 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.