-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Feature to execute failed tests only #1190
Comments
Sounds nice - this would require integration with the test runner (Jasmine, Mocha, etc) and I'm not sure how it would know which ones failed before (it would have to store state somewhere). It's not likely that this will be added soon, but it's a neat idea. |
Maybe it could use the previous xunit report or any other report format as input to know which tests failed in the previous execution... |
I have the same problem with some tests, they pass most times, but fail sometimes, so it would be nice feature to have protractor retry those failed tests. |
have the same problem. I'm looking forward this feature! |
+1 |
1 similar comment
+1 |
Can you clarify which of the following use cases is the one you want?
|
the first one, so "1) Automatically rerun failed tests as part of the initial protractor run to deflake" I hope it was clear. |
+1 for first one |
+1 |
1 similar comment
+1 |
+1, any updates on this? |
Not right now, but considering the big feedback, I'll see if I can do something about it in the near future |
Please do it as soon as possible. This is almost the most important feature that we're missing from it. |
+1 |
1 similar comment
+1 |
+1, must have feature. have a suite of 1300+ TCs, 15~20 are failing and in teamcity and causing build failure, all are passing if running individually. |
👍 |
Hi @hankduan , could you please let me know possible ETA for this feature. I need to decide whether i should have a workaround implemented or wait for this implementation from protractor team. |
Likely some time between 1-2 months. I'm trying to get to it as soon as possible, but there are a few other pressing issues that are ahead of this. |
We desparately need a way to retry tests in our pipeline, as we have reached critical mass of 100+ tests where likely one will fail. Is there an alternative workaround for retries, or is this the only way? @hankduan |
You would need write a script to retry from a top level. (i.e. examine the output which test passed failed, and retry those --using grep). This is probably the approach I'll need to take (well, without the script part) when I do start investigating a way to do this, as there is no way for protractor to tell jasmine or mocha to retry a test directly. |
hmm ok I was actually thinking about doing something like this myself. I might hack something together as a proof of concept to solve our immediate needs. |
@premkh9, are you using gulp? If so I suggest using protractor flake mentioned above: |
I've actually had to make a script that finds all the failures and re-runs them because there is sometimes one or two that fail but it was just a matter of communication with a service like browserstack or saucelabs taking too long or some other factor that wasn't a real positive failure. |
Protractor-flake resolved this issue for me. |
@gkohen, can you please help me how to implement protractor flake in protractor configuration file. I am not using gulp. |
+1 |
if u guys are using Mocha, it already has retry |
Mocha's retry is mostly good, but there are still some issues:
|
can someone please help me how to implement protractor flake in protractor configuration file. I am not using gulp. |
+1 |
1 similar comment
+1 |
@juliemr @NickTomlin - Its really hard to configure protractor flakes from following documentation. Can you please explain in detail, It would be really helpful to many of them |
@premkh9 if you have an issue please raise it on the protractor flake repository. Protractor flake is not an official angular/protractor project. |
Re running a failed tests are very useful feature for the frame work perspective. I tried flake but It did not help. Can you please suggest any other way to achieve this. |
+1 |
For folks having trouble setting up You could also always use it directly... for example, assuming you have |
We could do this in Jasmine wd issue: angular/jasminewd#73 |
+1 |
3 similar comments
+1 |
+1 |
+1 |
Hello, |
"Windows as an environment to launch & use this package is unfortunately not yet supported." |
+1 |
This is an older issue, but if you are looking for this, you can achieve this using different npm packages, I'm using: https://www.npmjs.com/package/protractor-flake I've changed some stuff because I'm using typescript, and when a test fails protractor shows the trace for typescript files, and flake looks the trace in order to rerun failed tests, so you need to point to transpiled JS files in order to be able to rerun failed tests, but should be pretty straightforward the implementation. |
Also works out of the box with windows/mac/linux we are using it in a cross-platform development team (= |
As a end to end testing framework, it would be nice if Protractor provide a way to execute failed tests only from test suite(s) run.
The text was updated successfully, but these errors were encountered: