Flank / flank

:speedboat: Massively parallel Android and iOS test runner for Firebase Test Lab
https://firebase.community/
Apache License 2.0
672 stars 112 forks source link

Retry only failed test when --num-flaky-test-attempts is provided #2429

Open jerrycp opened 11 months ago

jerrycp commented 11 months ago

GIVEN --num-flaky-test-attempts is N, WHEN flank is run , THEN

I have tried running flank v23.07.0, and provided the argument --num-flaky-test-attempts=4, for 2 test named as :

I expected the "alwaysPass" test to be executed only once, without further retry. But, it was executed for 4 times as shown in the attached screenshot.

Based on my understanding of the previous issue : https://github.com/Flank/flank/issues/636 I believe that the retry feature should only be executed on failing test ?

Can someone help to provide advice ?

image

adamvduke commented 11 months ago

The linked issue points to Flank delegating the retry logic to the Firebase backend, but the documentation doesn't concretely describe exactly what will be re-run, e.g. entire execution, shard, individual test case. I opened a conversation internally with folks to investigate.

adamvduke commented 11 months ago

Following up, the behavior is working as intended. The documentation specifies that the execution will be retried. In certain cases that might mean retrying a shard instead of the entire set of tests, but explicitly does not mean retrying individual test cases. I'll work to get the documentation clarified.