Skip to content

WebdriverIO (v8) - Mocha framework to automate the web applications.

Notifications You must be signed in to change notification settings

Thangarajtk/WDIO_Mocha_Javascript

Repository files navigation

WebDriverIO_Mocha_Javascript

WebdriverIO

WebdriverIO is a progressive automation framework built to automate modern web and mobile applications. It simplifies the interaction with your app and provides a set of plugins that help you create a scalable, robust and flakiness test suite.

This is a sample WebdriverIO (v8) Mocha framework project to automate web applications using Javascript. This framework was designed with Page Object Pattern.

Pre-requisites

NodeJs Java Docker VSCode

Project Setup and Dependencies Installation Steps

  1. Clone the project from GitHub.
  2. Open Terminal from the project root directory WDIO_Mocha_Javascript on the VS code.
  3. On the terminal, Run command npm install to install all the dependencies present in the package.json file.

Steps to execute tests locally

  1. Run command npm run test from terminal to execute the scripts locally.

Steps to execute tests on Docker container

  1. Run command npm run test:docker to execute the scripts on docker container.

Reports

  • allure-reporter
  • spec-reporter
  • video-reporter

Generate and Open allure reporter along with Video-reports

On the terminal, Run command npm run generateAllureReport to open allure report. Report will be opened in the default browser.

Clean the Reporting directory

On the terminal, Run command npm run cleanup to clean the "Reporting" directory. Execute this command before the execution of test.

Key Features

  • Mocha framework
  • expect-webdriverio assertions
  • Page Object design pattern
  • Support for cross browser testing and Parallel execution
  • Babel Setup
  • Docker (Grid - Hub + Node)
  • Dockerized Jenkins
  • GitHub actions

Sample Allure Reporter along with Execution Video