How Rerun failed Specs for a certain number of times in Protactor?

I have a conf.js file and a spec.js file . There It{}are blocks in spec.js 5 (five) . When it starts through the protractor, the 4th block is Itever blocked, or at some point it becomes unsuccessful (due to a network connection). Now, how can I re-run my fourth block Itup to a certain number of times so that I get to pass the result?

+4
source share
1 answer

There is an npm package, protractor-flake , that fits your needs exactly. This will take an argument --max-attempts=3that will control the number of failed tests.

Using:

npm i -g protractor flakes

protractor-flake --protractor-path=/path/to/protractor --parser standard --node-bin node --max-attempts=3 --color=magenta -- path/to/protractor.conf.js

+1
source

Source: https://habr.com/ru/post/1672131/


All Articles