tlc-core-automation-framework-v3-wdio-v9
v9.1.19
Published
Background: - We are following multi-layer automation framework architecture using webdriver.io + cucumber + typescript This core framework has been implemented with generic utility functions and cucumber steps, which can be easily consumed by another fra
Downloads
1,296
Maintainers
Readme
Background:
We are following multi-layer automation framework architecture using webdriver.io + cucumber + typescript This core framework has been implemented with generic utility functions and cucumber steps, which can be easily consumed by another framework
Design pattern:
src e2e o helpers common-helpers framework-helpers reporting-helpers o step-definitions action-steps verification-steps o global-types.ts o index.ts o world.ts package.json tsconfig.json
Explanation:
common-helpers
Holds all common function, not related to webdriver.io example: file utilities, moment utilities, string helpers etc.
framework-helpers
Holds all webdriver.io related async helper functions, which can be directly consumed in the steps
reporting-helpers
Holds all functions/classes to generated reports and logs
step-definitions
Implementation of all common steps, can be utilised across web/mobile platform
global-types.ts
Defines few special types for the framework
world.ts
Used to pass data/information from one step to another step
Publishing the framework
This framework has been published to npm
Utilization
The external projects can consume this core framework as npm package by providing the correct version number. Please note, the version number will keep on increasing with every release. If you don’t want to use the latest version, please make sure you lock your version, in your own framework. However, we always encourage to use the latest version to make best use of this framework
To point to your feature step to the core framework steps, you must update the wdio.confg.ts file > cucumberOpts > require tags ['','']
require: ['./src/e2e/step-definitions/*.ts','./node_modules/tlc-core-automation-framework-wdio'],
Tests
e2e-local.sh
can be used to run the e2e tests locally in the same way they are run in Gitlab (inside a webdriverio/selenium-standalone
container).
-> You need to specify the PLATFORM_TAG
as an environment variable inside the configuration.
For example :
PLATFORM_TAG=@desktop
PLATFORM_TAG=@mobile
PLATFORM_TAG=@tablet.
Also add the same @desktop/@mobile/@tablet tag to your scenario inside the feature file.
features
To run the features in GitLab requires setting the GITLAB environment variable to 1. This passes some extra parameters to Chrome so that it works in Docker.