WebdriverIOv4-Cucumber-TypeScript

WebdriverIO-v4 Cucumber BDD and TypeScript Boilerplate

Stars
0

WebdriverIO-v4 Cucumber BDD and TypeScript Boilerplate

This repository shows an example of how to combine WebdriverIO (v4), Cucumber and TypeScript in order to create a robust BDD test cases.

Fetaures

  • WebdriverIO v4
  • Cucumber v5
  • Chai v4
  • TypeScript v3
  • Allure v2

Getting Started

Install all packages

npm install

How to write a test

You just need to create a *.feature file under ./features/test/ folder. The test is written by using Gherkin Syntax.

// myTest.feature

Feature: Is it Friday yet?

   Everybody wants to know when it's Friday

   Scenario: Sunday isn't Friday
    Given today is Sunday
    When I ask whether it's Friday yet
    Then I should be told "Nope"

Run one test only

npm run dev path-to-feature-file

Run all the test

npm test

Show Allure report

npm run report

Referece

Thanks to Amiya Pattnaik

Read Cucumber Boilerplate for more examples.