Automated the Testing using Puppeteer, Mocha, chai. For example we can use linkidin account and few functionality to automated the testing
- Node JS (v.1.8.10)
- Puppeteer JS
- Mocha
- Chai
- Mochawesome for Report generation)
- express JS (Web server to run generate Report)
- opn (open the report of testing automatically to browser)
- node-cmd (Run Command Line command)
- clone the project
https://github.com/tariqulislam/puppeteer-mocha-automated-testing.git
- go to folder
cd puppeteer-mocha-automated-testing
- run
npm install
|-- puppeteer-mocha-automated-testing
|---- mochawesome-report
|------ assets
|------ mochawsome.html
|------ mochawsome.json
|---- test (Directory for where the test file are contains)
|------ bootstrap.js (Puppeteer Configuration file)
|------ sample.spec.js (Sample Automated Testing file)
|---- package.json
|---- node_modules
|---- server.js (Web server to show generate report)
- Open the file
test/sample.spec.js
- Add the Linkedin email or user name at line 35 for testing.
await linkEmail.type('<sample@email.com>'); // add the email address for linkedin //
- Add the Password at line 38
await linkPassword.type(''); // add password for linkedin account
- Then run the predefiend test by
npm test
form command line