CodeceptJS icon indicating copy to clipboard operation
CodeceptJS copied to clipboard

Before and BeforeSuite don't retry

Open ufko opened this issue 6 years ago • 8 comments

What are you trying to achieve?

I want the Before, BeforeSuite to retry when a step inside Before or BeforeSuite fails

What do you get instead?

When a test step fails which is inside Before or BeforeSuite, Before or BeforeSuite don't retry.

Details

  • CodeceptJS version: 2.3.1
  • NodeJS Version: >=8.12.0
  • Operating System: Linux, MacOS
  • Puppeteer

ufko avatar Nov 12 '19 08:11 ufko

@ufko Do you get the same result with latest CodeceptJS version 2.3.5 ?

pablopaul avatar Nov 12 '19 09:11 pablopaul

@pablopaul I didn't try with the latest CodeceptJS. I'll try it, let you know 👍

ufko avatar Nov 12 '19 09:11 ufko

Hi, @pablopaul I tried with latest CodeceptJS 2.3.5 and they didn't retry

ufko avatar Nov 12 '19 11:11 ufko

This is not working for me either

smuti avatar Nov 23 '19 13:11 smuti

Hi @pablopaul if you have any idea how to fix this could you point me in that direction? I'd love to work on this and hopefully fix it

ufko avatar Nov 26 '19 08:11 ufko

I have the same issue with codeceptjs 3.0.6

carolord999 avatar Apr 16 '21 18:04 carolord999

Running codeceptjs 3.3.0 and have the same issue. Any ideas on a timeframe for this being worked on?

Example:

Feature('My Feature Name').retry(1);

Before(async ({ I, login }) => {
  {some code}
});

If anything fails in the Before, the retry doesn't happen. But if anything fails in any of the Scenario() sections it does the retry.

alanreay avatar Jul 27 '22 21:07 alanreay

At this moment I recommend using retryTo plugin to handle cases like this

https://codecept.io/plugins/#retryto

Probably in future versions we will add retries for Before/BeforeSuite as well

DavertMik avatar Aug 23 '22 21:08 DavertMik