protractor icon indicating copy to clipboard operation
protractor copied to clipboard

Feature to execute failed tests only

Open chun2014 opened this issue 12 years ago • 95 comments

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.

chun2014 avatar Aug 13 '14 15:08 chun2014

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.

juliemr avatar Aug 18 '14 22:08 juliemr

Maybe it could use the previous xunit report or any other report format as input to know which tests failed in the previous execution...

zarroba avatar Oct 01 '14 13:10 zarroba

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.

nuweb avatar Oct 17 '14 01:10 nuweb

have the same problem. I'm looking forward this feature! Do anybody knows when it will be ready-to-use?

iamisti avatar Dec 31 '14 19:12 iamisti

+1

jlin412 avatar Dec 31 '14 19:12 jlin412

+1

alecxe avatar Dec 31 '14 19:12 alecxe

Can you clarify which of the following use cases is the one you want?

  1. Automatically rerun failed tests as part of the initial protractor run to deflake. i.e.
> protractor config.js --retry-failed
running...A,B,D passed, C,E failed
running C,E again...C passed, E failed
running E again...E passed
  1. Manually rerun failed tests after edits. i.e.
> protractor config.js
running...A,B,D passed, C,E failed
> vim test.js // try to fix C and E
> protractor config.js --run-last-failed
running only C,E...C passed, E failed
> vim test.js // try to fix E
> protractor config.js --run-last-failed
running only E...E passed

hankduan avatar Jan 07 '15 19:01 hankduan

the first one, so "1) Automatically rerun failed tests as part of the initial protractor run to deflake" Also it would be nice if there would be a configurable value for the maximum retry count. e.g.: in your example there was a 2 re-run, if you set the limit to 1 then the last one won't run.

I hope it was clear.

iamisti avatar Jan 07 '15 20:01 iamisti

@hankduan @iamisti The first one for sure! In my case, when running tests on a CI server, having to redo an entire build/push because of a test timing out is frustrating.

galxy25 avatar Jan 23 '15 19:01 galxy25

+1 for first one

vladradz avatar Feb 13 '15 11:02 vladradz

+1

papucho avatar Feb 16 '15 16:02 papucho

+1

willgm avatar Feb 16 '15 19:02 willgm

+1, any updates on this?

robertoronderosjr avatar Feb 20 '15 16:02 robertoronderosjr

Not right now, but considering the big feedback, I'll see if I can do something about it in the near future

hankduan avatar Feb 20 '15 18:02 hankduan

Please do it as soon as possible. This is almost the most important feature that we're missing from it.

iamisti avatar Feb 21 '15 07:02 iamisti

+1

ruimarques avatar Mar 02 '15 12:03 ruimarques

+1

jlin412 avatar Mar 02 '15 13:03 jlin412

+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.

sanjeevmajgotra avatar Mar 02 '15 14:03 sanjeevmajgotra

:+1:

ericmdantas avatar Mar 02 '15 14:03 ericmdantas

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.

sanjeevmajgotra avatar Mar 03 '15 08:03 sanjeevmajgotra