E2E tests for Tajawal project
- Framework: Protractor
- Programming language: TypeScript
- BDD: Jasmine
- Page object pattern
- Browsers: chrome, firefox
- Screenshots for last page per spec
- Reporting: Allure
- Logger: Log4js
- Flakiness: 3 re-runs for flaky tests
Node.js >= v.8 installed
- Install protractor globally with:
npm install -g protractor
- Navigate to your project's folder in command prompt and run:
npm i
- To update selenium server with chrome driver - Run script:
npm run wd-update-chrome
- To start tests execution - Run script:
npm run test
- After tests are finished, command should be executed in Node.js command prompt:
npm run allure-generate-report
- Navigate to folder ./target/allure-html-report
- Open index.html file
- To update selenium server with chrome driver - Run script:
npm run wd-update-firefox
- In package.json, update parameter in "test" script: target/src/config/chrome.conf.js, => target/src/config/ff.conf.js
- To start tests execution - Run script:
npm run test
- Firefox browser is less stable than Chrome and additional efforts are needed for locator and timeout strategies This may be done further, not in terms of demo
- Don't worry to change browser name manually in package.json. In real project it has to be done dynamically by CI env. variables