/demo-webdriverio-cucumber

E2E Tests with WebdriverIO and Cucumber

Primary LanguageTypeScriptMIT LicenseMIT

E2E tests with WebDriverIO and Cucumber

Commitizen friendly Action Status

This is a demonstration project of integration tests. In this project the user sends a message to the customer service on Automation Practice.
These tests are developed in TypeScript with WebDriverIO V6 and Cucumber

Features

  • TypeScript
  • Expect-webdriverio
  • Page Object Pattern
  • Gherkin lint
  • Scripts to check undefined and unused steps on step/feature files
  • Commit lint and Commitizen
  • ESlint
  • Prettier
  • Husky
  • Github Actions example
  • Allure report (screenshots on failure) and Timeline report

Requirements

Getting Started

Install the dependencies:

npm install

Compile TypeScript:

npm run build

Run e2e tests:

npm run tests:e2e

Spoken Languages

If you want to use another language in features files, you can see this doc about how can you do that.

Reports

Allure

Run this command to generate the allure report in the directory ./test-report/allure-report:

npm run report:generate

You can run this command to start a server on your machine and open the allure report on the browser:

npm run report:open

Time line reporter

You can see Timeline report in ./test-report/timeline/timeline-report.html

Prettier and Eslint

Run to format the code:

npm run code:format

Gherkin lint

We use Gherkin lint to keep the feature files organized.

npm run code:gherkin

Also, we have more two interesting hooks;

  • The first one checks if there is any step on feature files, and this step was not defined on step files:
npm run cucumber:undefined:step
  • The second one checks if there is any step on steps files, and this step was not being used on feature files:
npm run cucumber:unused:step

Commit

We use the best practices for message's commit, using Commit lint and Commitizen we can generate changelogs automatically.

Run npm run commit and commitizen will help you.