The application needs to have the following dependencies:
- npm --version 6.1.0
- node --version 8..
Before start the program is supposed to run the command [npm install].
It downloads needed modules and prepars the programm for starting.
i.e. will be created folders : 'logs' and 'reports'.
And will be run webdriver-manager update.
`"chai": "^4.1.2",
"cucumber": "^5.0.1",
"cucumber-json-reporter-to-html": "git+https://github.com/KarneyenkaDzmitry/cucumber-json-reporter-to-html.git",
"protractor": "^5.4.0",
"protractor-cucumber-framework": "^6.1.1",
"winston": "^3.0.0",
"yargs": "^12.0.2"`
- test - there are all files and folders connected with tests;
- [node_modules] - will be created after [npm install] command. There will be stored all additional modules;
- [reports] - will be created after the first run of [npm test] command. There will be stored all data that are need for report;
- .eslintignore - all folders and files that should not be indexed by [eslint] are listed here;
- .eslintrc.js - all rulles for [eslint] are placed there;
- .gitignore - all folders and files that should not be indexed by [git] are listed here;
- package.json - includes all data for [npm]
- README.md - readme file with special information about the application and git-syntacs.
There are some scripts in package.json that helps us.
$ .\node_modules\.bin\protractor .\configs\conf.js --tags '@Restaurants,@Search'
$ npm test -- --tags '@Restaurants,@Search'
$ npm test
$ npm test -- --maxInstances 2
$ npm test -- --browserName firefox
$ npm test -- --browserName firefox --maxInstances 2
- Use special construction
<scriptName>: "<script> || exit 0"
e.g."test": "./node_modules/.bin/protractor ./configs/conf.js || exit 0"
- using npm script (e.g. "test": "protractor ./pathToConfig.js")
$ npm test -- --cucumberOpts.tags='@Search'
Don't forget use additional '--' dashes because it is the special simbols that say to npm that there are some arguments for running command
see review - using plant command
$ .\node_modules\.bin\protractor .\configs\conf.js --cucumberOpts.tags='@Search or @Restaurants'
Set 'cucumberOpts.tags' according to needed tests with related tags.
Use construction : '@tag1 and @tag2' - for tests that contains these two tags
-------------------: '@tag1 or @tag2' --- for tests that include or tag1 or tag2
-------------------: '@tag1 or not @tag2' - fortests that includes @tag1 or doesn't include @tag2
see documentation