Simple Example using selenium cucumber Js
selenium cucumber Js: https://www.npmjs.com/package/selenium-cucumber-js
cucumber js
selenium webdriver (driving the web application): https://www.npmjs.com/package/selenium-webdriver
selenium webdriver api documentation : https://seleniumhq.github.io/selenium/docs/api/javascript/module/selenium-webdriver/lib/promise.html
Faker(generate random data fo testing): https://www.npmjs.com/package/faker
HTML and JSON reports are automatically generated and stored in the default ./reports
folder. This location can be changed by providing a new path using the -r
command line switch:
You can use the framework without any command line arguments if your application uses the following folder structure:
.
├── features
│ └── google-search.feature
├── step-definitions
│ └── google-search-steps.js
├── page-objects
│ └── google-search.js
└── shared-objects
│ ├── test-data.js
│ └── stuff.json
└── reports
├── cucumber-report.json
└── cucumber-report.html
npm install
Firefox : Npm run bdd -- -t @CreateUser -b firefox
Chrome : Npm run bdd -- -t @CreateUser