Please correct my understanding for the below:
- I've installed protractor flake
- From the website we have 2 sets of code
My assumption
I'm pretty sure the B part needs to be given in configuration.js
file
of my protractor project but the A part where exactly should it be written.
As a separate file should i write it and then require them in the spec file which i'm running.I need exact steps as to achieve the above
The usage section which starts with below:
**var protractorFlake = require('protractor-flake')
// OR using es6 modules/typescript
import protractorFlake = require('protractor-flake')**
and ends with **process.exit(status)**
and the parsers section which starts with
module.exports = { till return [...failedSpecs]
As per the documentation,
Add dependency
Running tests
Option 1: Via the CLI:
Assuming that your
conf.js
file is inroot
directory.Option 2: Programmatically
Create file in your
root
directory asflake
and copy below snippet.flake
is a node script that usesprotractor-flake
to re-run failed tests. Note that it reruns tests at thefile
level, so if one test fails, it will rerun all the tests in that file. Thanks Brian Ray to this repositoryAfter creating this file, for avoiding permission error's just run
chmod +x ./flake
To run your test cases
./flake conf.js
If you are keeping
specs
in a test suite, just pass afterconf.js
../flake conf.js --suite smoke_test
Before you are running, check these
Caveats