WebdriverIO Cucumber Framework

04 Mar 2023  Amiya pattanaik  2 mins read.

A Next-gen browser and mobile automation test framework using WebdriverIO with CucumberJS. Write your BDD tests using cucumberJS and it is particularly useful for testing web applications and native mobile applications for iOS and android enabled devices.

Use Case

An automation team in a project is using the WebDriverIO framework and its plugins to design powerful and robust automation tests and perform end-to-end testing of the web application. The client has requested the project team to test the application from the user’s perspective by implementing BDD. The team has decided to use Cucumber as the BDD framework and write acceptance test scenarios in plain English language using Gherkin keywords. These scenarios must be mapped to the automation test code.

The project team must look forward to designing a framework that can integrate Cucumber BDD scenarios with the WebDriverIO test automation code, execute on multiple browsers, and generate interactive test reports like Allure, JSON, HTML.

webdriverIO-with-cucumberBDD will enable the team to achieve automated testing of the application from the user’s perspective.

  • Framework: WDIO-V8 with Cucumber (V8x).
  • Features:
    • Page Objects Model uses with ES6 /ES7 style class base approach and TypeScript support
    • Examples of multi selector option to query element with more than one selector at a time
    • Examples of multi browser and headless browser execution using - Chrome and Firefox
    • Cloud testing Integration with BrowserStack, Sauce Labs, LambdaTest
    • Examples of read/write data from MS-Excel for easy test data management from external data sources with examples
    • Database support to any RDBMS (Oracle, MySql, TeraData, Vertica etc.), executing any queries / fetching result set etc. with examples for E2E testing
    • Multiple reporting (Spec, Xunit/Junit, Allure, JSON) and Hosting Allure and Xunit/Junit reporting on WebServer.
    • Examples with demo app https://search.yahoo.com/ and http://the-internet.herokuapp.com.
    • BrowserStack, Sauce Labs, LambdTest and Appium specific .config file ( for playback on mobile device.) For one click Appium setup on local machine for iOS and Android refer to [appium-setup-made-easy-OSX](https://github.com/amiya-pattnaik/appium-setup-made-easy-OSX){:target="_blank"}

We encourage our readers to treat each other respectfully and constructively. Thank you for taking the time to read this blog post to the end. We look forward to your contributions. Let’s make something great together! What do you think? Please vote and post your comments. ***

Amiya Pattanaik
Amiya Pattanaik

Amiya is a Product Engineering Director focus on Product Development, Quality Engineering & User Experience. He writes his experiences here.