Coder Social home page Coder Social logo

lynix28 / web-webdriverio-example Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 146 KB

Web automation testing example project with WebdriverIO

JavaScript 98.98% Gherkin 1.02%
automated-testing wdio web-testing mocha-framework webdriverio bdd-tests

web-webdriverio-example's Introduction

web-webdriverio-example

CircleCI

Description:

An example project about Web automation testing using WebdriverIO. The test examples are created in Mocha Framework and Cucumber Framework.

Inside the project:

  • WebdriverIO Packages

    • Mocha and Cucumber as Test Framework
    • Allure as Test Reporter
    • selenium-standalone-service as service to run the test locally with your own browser
    • wdio-safaridriver-service as service to run the test locally in Safari browser
  • The Webdrivers

    • Chrome = chromedriver
    • Firefox = geckodriver
    • Ms Edge = edgedriver
    • Safari = safaridriver
      to enable the driver, run safaridriver --enable on terminal (need to use MacOS to enable the feature)

How to setup:

  • Clone the project
    Run npm install

  • Make sure the browser also installed and match with the webdriver version

How to run the test:

Mocha Framework:

  • all the test
    • npm run test
  • specific spec / test file
    • npm run test -- --spec ./to/file/location.js
  • specific suite / test suite
    • npm run test -- --suite "suiteName"
  • specific test case
    • npm run test -- --spec ./to/file/location.js --mochaOpts.grep "testcase name or testing tag"
    • npm run test -- --suite "suiteName" --mochaOpts.grep "testcase name or testing tag"
  • running test on Safari
    • start the driver with command safaridriver -p <your desire port> (make sure to use same port with the 'wdio configuration')
    • run the test npm run test-safari

Cucumber Framework:

  • all the test
    • npm run test-bdd (Cucumber)
  • specific spec / test file
    • npm run test-bdd -- --spec ./to/file/location.feature (Cucumber)

web-webdriverio-example's People

Contributors

lynix28 avatar

Watchers

 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.