This is a personal learning repo for Automated UI testing using Selenium Webdriver with Mocha + Mochawesome and Chai. This is using LambdaTest Todo project.
Project currently executes 'firstTest.js' on local machine. Executes 'secondTest.js' on Lambda Test Selenium Grid. It also executes tests in headless mode. 'paramTest.js' executes paramaterized tests
- Selenium Webdriver - Automation
- Mocha - Test Framework
- Chai - Assertion Library
- Edge Webdriver - Browser
- Mochawesome - Automation Reports
- Lambda Test Suite - Testing on Remote Selenium Grid
- Node.js (v14 or higher)
- npm (comes with Node.js)
- Edge Browser (Can use Chrome/Firefox instead too)
- Clone the repository:
git clone https://github.com/deusion/selenium-webdriver-learning.git
cd selenium-webdriver-learning- Install dependencies:
npm install- Modify '.env.example' with your access key and username from LambdaTest and rename to '.env'
- Run all tests
npm test- Run specific test file:
npx mocha --no-timeouts .\test\firstTest.jsAfter tests have run, a report is generated using Mochawesome in './test-reports/TestReport.html'. Open it in browser to view detailed run results. (Note: Default behaviour on secondTest.js is an intentional fail)
Create a new '.js' file under 'test' folder following the same naming pattern