/wdio-automated-tests

This is started project to automation using webdriver.io

Primary LanguageJavaScriptApache License 2.0Apache-2.0

wdio-automated-tests

Boilerplate project to run Web tests with WebdriverIO v7 for:

Tested with webdriver.io BrowserStack Status

Requirements

Git

Node v14

Yarn

If you want to see the report, you will also need Java 8 or higher. This is a prerequisite of allure reports.

Consider use NVM to configure and set you Node version.

Features

WebDriverIO is a Selenium abstraction to set up and runs your web tests;

Mocha framework to execute and describe your tests;

Chai assertion library;

Browserstack powerful cloud to run web tests;

Page Objects Pattern

Github Actions

Allure Reports

Husky

Getting Started

‼️ To start developmentt: Consider to use vscode as editor to development. In this project is configured the integration to automatic auto-fix code in vscode as configured at eslint! Also, remember that is necessary your vscode has an Eslint plugin installed.

Clone project:

git clone <https://github.com/viniciusflores/wdio-automated-tests.git>

Install dependencies

yarn

Run all web tests locally

yarn test

Run all web tests at Browserstack

yarn test.bs

Run specific test

yarn test --spec <PATH OF TEST FILE>

Run a test suite

yarn test --suite <NAME OF TEST SUITE>

Run a test using filter by suite name or test name -> this command executes all tests and in runtime time, filter the results to run. Avoid this option if is possible.

yarn test --mochaOpts.grep "<string/REGEX to search>"

Reports

Allure

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

yarn report:generate

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

yarn report:open

Points to Attention