NickTomlin / protractor-flake

Rerun potentially flakey protractor tests before failing.
MIT License
80 stars 51 forks source link

Improve README.md with protractor.conf.js #82

Closed benjaminapetersen closed 4 years ago

benjaminapetersen commented 7 years ago

The current README.md install & usage instructions aren't exactly clear, do you require & use this within your current protractor.conf.js? Initially I'm inclined to think there is a bit more to it as:

protractorFlake({
  protractorPath: '/path/to/protractor',

protractorFlake wants to know where protractor lives. True?

NickTomlin commented 7 years ago

Your inclination is correct, flake handles executing protractor itself so this is not something that goes in your protractor config.

think this could definitely be clearer. Would a simple // run-protractor-flake.js at the top of the file or something like "in a separate file" help?

Can you think of other ways of clearing this up? I'd be more than happy to accept a README pr

benjaminapetersen commented 7 years ago

Well, I'm curious how one would setup a grunt test or gulp test or npm run test task to integrate this. Perhaps even just clarifying how a run-protractor-flake.js would work along with an existing protractor.conf.js. I haven't actually attempted to integrate this package yet, but it looks very promising for the types of issues I'm experiencing (running protractor in a Jenkins environment where timing issues can occasionally cause a set of tests to fail arbitrarily).

Thanks!

ogiexela commented 4 years ago

Which file should contain the js code from "Usage > programmatically"? How is it invoked?

NickTomlin commented 4 years ago

@ogiexela Any Javascript file will do. E.g. if you were to write the contents of that example to example.js and then run node example.js.

I'm going to go ahead and close this issue. I'm happy to accept a PR to the README!