yahoo / protractor-retry

Use protractor features to automatically re-run failed tests with a specific configurable number of attempts.
MIT License
28 stars 32 forks source link

Can't handle command-line parameters and using data from protractor.conf.js file for retry attempts instead #64

Open viktorgogulenko opened 5 years ago

viktorgogulenko commented 5 years ago

Hi. Today I've found an issue that seems 'ptotractor-retry' can't handle a situation when we are passing parameters to Protractor from command-line like '--params.{some_parameter}' - for the first time (main tests run) everything fine, but as soon as it will try to re-run failed tests - will be used data from protractor.conf.js file instead of passed before params. So for even small change I need to create separate config-file instead of parameters. Any ideas how to resolve this issue?

dreuxl commented 5 years ago

Yep , I may have an idea why it s happening, I would need to repro to check.

viktorgogulenko commented 5 years ago

It could be easily reproduced by making your test(s) broken, set retry to '3' for example, in protractor.conf.js provide browser as 'firefox', and launch from command-line using 'chrome' instead - protractor protractor.conf.js --browser='chrome' For the first time it will launch Chrome as provided in command-line, but for retry it will use 'protractor.conf.js' and Firefox will be used for all retries.

viktorgogulenko commented 5 years ago

Maybe it's possible to generate some temporary file inside of your folder where all passed parameters could be reused for retry? At this moment I'm seeing that your module is awesome, but with this issue I need to create for each new case (different parameters) new separate protractor.conf.file with needed change inside.

allbigbopper commented 4 years ago

Hi @dreuxl! I'm wondering if there is any progress with this issue?