Comments (6)
I guess my pr will address this as it will call protractor with --params.flake.iteration which then can be used in via browser.params.flake.iteration.
from protractor-flake.
I think this makes a lot of sense, could you give me some pseudocode for how you'd use this? This could potentially be a param
that we pass to protractor or an env variable that we set. I'd want to make sure we can do it in a way that wouldn't clash with protractor config.
from protractor-flake.
Glad you agree! To be honest I get a little twitchy with the thought of the attempt count being a Node environment variable as this value would persist if flake got stopped etc. It would also cause problems for shared CI/build servers with multiple builds unless you make the environment variable unique to the instance of flake running (not sure that's a good idea either)? In my opinion, it would be better as a param
or just accessible from a flake
instance:
onPrepare: () => {
if(flake.attemptNo == 1) {
// Do cleanup
}
}
But as I mentioned before, I would also be happy to put my code in functions passed to the protractor-flake config like so:
protractorFlake({
parser: 'standard'
}, function(status, output) {
process.exit(status);
}, function() {
//beforeAttempts
}, function() {
//afterAttempts
})
But the obvious drawback with the latter is that no 'protractor or jasmine stuff' will be available for use in either function. Also, if you go with this option, it would be nice if the functions could be callback managed (or accept a promised function) so time consuming operations can be performed synchronously (sorry for adding complexity).
Thanks!
from protractor-flake.
@rasjani - yes it would! If @NickTomlin is happy then I would link the PR so this issue can be closed.
from protractor-flake.
And its also already released.
from protractor-flake.
@rasjani thanks for reporting back here and for your PR! I'm going to go ahead and close this issue 😄
from protractor-flake.
Related Issues (20)
- How to build with ng e2e and run config file via protractor-flake? HOT 7
- The automated release is failing 🚨 HOT 1
- Protractor-flake no show outputs in console HOT 18
- Reruning all the tests not just the failed ones with cucumber. HOT 1
- protractor-flake doesn't run tests if suite is not specified HOT 3
- protractor-flake doesn't run the remaining tests after retrying the failed test HOT 5
- protractor-flake finds the typescript file (not the compiled file) on retry HOT 5
- protractor flake executing all suites mentioned instead of specific suite HOT 2
- Feature Request: Option to mark failing and pending specs as failure to be picked up for rerun in flake
- Same failed spec being marked to run twice with cucumber HOT 3
- Failing Cucumber Scenarios causing entire feature files to re-run HOT 4
- Protractor Flake is not working with cucumber? HOT 2
- Easier way to specify path of custom parser HOT 5
- screenshots of retries overwrite the original run HOT 4
- Running serve as part of Flake HOT 4
- retryconfig doesn't work HOT 3
- running node ./protractor-flake-retry.js works putting than command inside npm run test fails HOT 3
- seleniumAddress HOT 2
- how to use protractor arguments with yarn HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from protractor-flake.