Code Monkey home page Code Monkey logo

web-wdio-cucumber's Introduction

Web Testing with WebdriverIO and Cucumber

This project provides a boilerplate setup for running automated tests on native applications using WebdriverIO and the Cucumber frameworks. The tests can be executed on Chrome, Firefox, Edge and Safari browsers.

Prerequisites

  • Node.js (>=18) and npm: Make sure you have Node.js and npm installed on your machine.

Setup

  1. Clone the repository:

    git clone https://github.com/Exemplify777/web-wdio-cucumber
    
  2. Install dependencies:

    npm install
    
  3. Configure the project:

    • Open config/wdio.shared.conf.ts file and update the desired capabilities for Chrome, Firefox, Edge and Safari browsers, including ....
    • Adjust the cucumberOpts in the config/wdio.shared.conf.ts file to match your feature files and step definitions location.
  4. Create a .env file with local environment configurations. You can use the provided .env.example file as a template.

Usage

  • Run tests on Chrome browser:

    npm run test:chrome"
    
  • Run tests on Firefox browser:

    npm run test:firefox
    
  • Run tests on Edge browser:

    npm run test:edge
    
  • Run tests on Safari browser:

    npm run test:safari
    

Project Structure

├── config/
│   ├── wdio.shared.conf.ts       # WebdriverIO shared configuration file
├── docs/                         # Directory containing project documentation
│   ├── FAQ.md                    # FAQ documentation
├── reports/                      # Directory containing generated reports
├── tests/
│   ├── features/                 # Directory containing feature files
│   ├── src/
│   │   ├── helpers/              # Directory containing helper functions
│   │   ├── pageobjects/          # Directory containing page objects
│   │   └── step-definitions/     # Directory containing step definitions
├── .env                          # Local environment configurations
├── .env.example                  # Example variables for .env file
├── wdio.conf.ts                  # WebdriverIO configuration file (using TypeScript)
├── package.json                  # Node.js dependencies and scripts
└── README.md                     # Project documentation
  • config/: This directory contains the Chrome, Firefox, Edge browsers configurations and shared configuration file (wdio.shared.conf.ts) where you can update the desired capabilities and other shared configurations.
  • docs/: This directory contains additional project documentation.
  • reports/: This directory contains the generated reports for test execution results.
  • tests/: This directory contains the main test-related files.
    • features/: This directory contains the feature files written in Gherkin syntax that describe the behavior of your web application.
    • src/helpers/: This directory contains helper functions that can be used across your step definitions or test specifications.
    • src/pageobjects/: This directory contains page objects that represent the different pages or components of web application.
    • src/step-definitions/: This directory contains the step definitions that map the steps in feature files to actual code implementation using WebdriverIO's API.
  • .env: This file should contain local environment configurations specific to your machine. You can use the provided .env.example file as a template.

Feel free to modify the project structure and customize the configuration files according to your specific requirements.

License

This project is licensed under the MIT License.

Please refer to the individual documentation of WebdriverIO and Cucumber for more details on how to write tests, implement step definitions, and leverage the available features.

For any additional information or questions, please contact [[email protected]].

Happy testing!

web-wdio-cucumber's People

Contributors

exemplify777 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.