Skip to content

Usage example of webdriverIO with Allure reporter in TypeScript

License

Notifications You must be signed in to change notification settings

jackieros/wdio-allure-ts-example

Repository files navigation

Sample project for 'wdio-allure-ts'


Build Status

A sample project with a quick introduction to wdio-allure-ts framework and its usage on a real-world application.
The project contains examples for the following:

Getting Started

Following those instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

  • NodeJs runtime engine
  • Chrome and FireFox for tests execution and display allure reporter
  • Java for selenium grid and report generation

Install packages:

npm install

Start Selenium grid: (start grid in separate terminal)

npm run grid

Execute test suite: *(npm test)

npm run suite todoMvcTestSuite

Execute single test:

npm run spec ./lib/tests/TodoAngularTest.js

Show report: require installed java and firefox

npm run report

Additional commands can be found in the package.json

Code Structure

Tests

Test located under /test folder and file names ends with Test.ts Suggestion: Use only 1 test, to keep it more readable and in case of failure we'll rerun only one test and not all tests in class(Mocha limitation)

Naming convention in tests:

Describe should hold name of the tests suite and it will be represented in report as one suite, and each test should hold file name of the test class Example where TodoAngularTest is a suite name and test file name is TodoAngularTest.ts

  describe('TodoAngularTest', () => {
       it('Check URL', () => {
           //some test implementation
       });
   });

Pages

Page Object Model is used for tests and all page classes located under /pages folder. Each class represent an UI object/functionality. For example: TodoAngularPage.ts holds main functionality of the page, while Button.ts class holds basic functionality of the button component

Utils

TestHelperUtils with common describe method that suites all the tests.

Report example

Click for live report example

Related project

wdio-allure-ts

About

Usage example of webdriverIO with Allure reporter in TypeScript

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published