Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/codewithmmak/webdriverio-mocha-chai-javascript
This is sample Test Automation framework designed using WebdriverIO, Mocha, Chai and Javascript. And in this framework we will see some basic working examples for learning.
https://github.com/codewithmmak/webdriverio-mocha-chai-javascript
chai javascript mocha test-automation webdriverio webdriverio-boilerplate-framework
Last synced: about 1 month ago
JSON representation
This is sample Test Automation framework designed using WebdriverIO, Mocha, Chai and Javascript. And in this framework we will see some basic working examples for learning.
- Host: GitHub
- URL: https://github.com/codewithmmak/webdriverio-mocha-chai-javascript
- Owner: codewithmmak
- License: mit
- Created: 2021-05-02T15:18:47.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2024-08-29T15:01:05.000Z (4 months ago)
- Last Synced: 2024-08-29T16:43:57.950Z (4 months ago)
- Topics: chai, javascript, mocha, test-automation, webdriverio, webdriverio-boilerplate-framework
- Language: JavaScript
- Homepage:
- Size: 1010 KB
- Stars: 4
- Watchers: 1
- Forks: 2
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
---
# WebDriverIO and JavaScript Automation Framework Setup Guide
---## Getting started
### Pre-requisites
* Download and install Node.js
* Download and install any Text Editor like Visual Code/Sublime/Brackets### Setup Visual Code
* Install GitLens Extension from the Marketplace: `GitLens — Git supercharged by GitKraken`
* Go to Visual Code Preference > Setting and search `formatOnSave` and enable/ON it.### Setup Scripts
* Clone the repository into a folder
* Go to Project root directory and install Dependency: `npm install`
* All the dependencies from package.json would be installed in node_modules folder.### How to write Test
* Add new spec under `test` folder
* Name the file as .e2e.js (e.g. login.e2e.js)
* Create page object under pageobjects/ folder as .page.js (e.g. login.page.js)### How to Run Test
* Go to Project root directory and run command: `npm run wdio`
* If you want to run api tests then run command: `npm run wdio:api`### How to Update local npm packages
* Go to Project root directory and run command: `npm update`### How to view HTML report
* Go to Project root directory: `./allure-results/index.html`### Sample Test Results
![WebDriverIO and JavaScript Test Report](./assets/Allure-Report.png?raw=true "WebDriverIO and JavaScript Test Report")![WebDriverIO and JavaScript Test Report Expanded View](./assets/Allure-Report-Detailed-View.png?raw=true "WebDriverIO and JavaScript Test Report Expanded View")
### How to run Test on SauceLabs
* SauceLabs Quickstart `https://docs.saucelabs.com/web-apps/automated-testing/playwright/quickstart/`
* Set Environment Variables:
* Open Terminal
* Run ```touch ~/.bash_profile; open ~/.bash_profile```
* In TextEdit, add
* `export SAUCE_USERNAME=“YOUR USERNAME”`
* `export SAUCE_ACCESS_KEY="YOUR ACCESS KEY"`
* Save the .bash_profile file and Quit (Command + Q) Text Edit.
* In Terminal echo $SAUCE_USERNAME
* In Terminal echo $SAUCE_ACCESS_KEY
* Configure ```https://docs.saucelabs.com/secure-connections/sauce-connect/setup-configuration/basic-setup/```
* Open Terminal
* Run ```cd sc-4.8.0-osx/bin```
* Again run tests: ```./sc -u YourUsername -k YourAccessKey --region us-west --tunnel-name YourTunnelName```