https://github.com/lynix28/web-webdriverio-example
Web automation testing example project with WebdriverIO
https://github.com/lynix28/web-webdriverio-example
automated-testing bdd-tests mocha-framework wdio web-testing webdriverio
Last synced: 3 months ago
JSON representation
Web automation testing example project with WebdriverIO
- Host: GitHub
- URL: https://github.com/lynix28/web-webdriverio-example
- Owner: lynix28
- Created: 2023-06-14T17:55:53.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-08-21T10:16:04.000Z (about 2 years ago)
- Last Synced: 2025-04-02T23:46:49.065Z (6 months ago)
- Topics: automated-testing, bdd-tests, mocha-framework, wdio, web-testing, webdriverio
- Language: JavaScript
- Homepage:
- Size: 143 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# web-webdriverio-example
[](https://dl.circleci.com/status-badge/redirect/gh/lynix28/web-webdriverio-example/tree/master)
Description:
An example project about Web automation testing using WebdriverIO. The test examples are created in Mocha Framework and Cucumber Framework.
Inside the project:
- WebdriverIO Packages
- Mocha and Cucumber as Test Framework
- Allure as Test Reporter
- `selenium-standalone-service` as service to run the test locally with your own browser
- `wdio-safaridriver-service` as service to run the test locally in Safari browser- The Webdrivers
- Chrome = chromedriver
- Firefox = geckodriver
- Ms Edge = edgedriver
- Safari = safaridriver \
to enable the driver, run `safaridriver --enable` on terminal (need to use MacOS to enable the feature)How to setup:
- Clone the project \
Run `npm install`- Make sure the browser also installed and match with the webdriver version
How to run the test:
Mocha Framework:
- all the test
- `npm run test`
- specific spec / test file
- `npm run test -- --spec ./to/file/location.js`
- specific suite / test suite
- `npm run test -- --suite "suiteName"`
- specific test case
- `npm run test -- --spec ./to/file/location.js --mochaOpts.grep "testcase name or testing tag"`
- `npm run test -- --suite "suiteName" --mochaOpts.grep "testcase name or testing tag"`
- running test on Safari
- start the driver with command `safaridriver -p ` (make sure to use same port with the 'wdio configuration')
- run the test `npm run test-safari`Cucumber Framework:
- all the test
- `npm run test-bdd` (Cucumber)
- specific spec / test file
- `npm run test-bdd -- --spec ./to/file/location.feature` (Cucumber)