jeudi 20 avril 2017

Rerun failing cucumber tests from the cucumber.yml profile

I am trying to create a profile in the cucumber.yml that reruns failed tests automatically. From the command line, I have been using this: cucumber tests -f pretty -f rerun --out rerun.txt || cucumber @rerun.txt

Which works as expected running tests and then re-running the failing ones in rerun.txt

I created a profile in my cucumber.yml file default: ENVIRONMENT=test BROWSER=chrome -f pretty -f rerun --out rerun.txt || cucumber @rerun.txt

This works to a degree that it creates a rerun.txt file, populating it with failures but doesn't rerun. Which points towards || as the problem.

Found this http://ift.tt/2pVBsd4

Which led me to try declaring <%" rerun = "-f pretty -f rerun --out rerun.txt || cucumber @rerun.txt" %> in my cucumber.yml

Then using default: ENVIRONMENT=test BROWSER=chrome <% rerun %>

but this kicks back the error: `cucumber.yml was found, but could not be parsed with ERB. Please refer to cucumber's documentation on correct profile usage.

rerun = "-f pretty -f rerun --out rerun.txt || cucumber @rerun.txt" ^ (erb):2: syntax error, unexpected tIDENTIFIER, expecting keyword_do or '{' or '(' rerun = "-f pretty -f rerun --out rerun.txt || cucumber @rerun.txt" ^ (erb):2: syntax error, unexpected tIDENTIFIER, expecting keyword_do or '{' or '(' rerun = "-f pretty -f rerun --out rerun.txt || cucumber @rerun.txt" ^ (erb):2: syntax error, unexpected tIVAR, expecting keyword_do or '{' or '(' rerun = "-f pretty -f rerun --out rerun.txt || cucumber @rerun.txt" ^ (erb):3: syntax error, unexpected $undefined, expecting end-of-input _erbout.concat "\n"`

Can anyone help in pointing me in the right direction to fix this issue?

Thanks in advance.

Aucun commentaire:

Enregistrer un commentaire