Open oeresundsgruppen opened 1 year ago
This is beneficial when tests are not mackovian, e.g. they built up state...
@oeresundsgruppen , thank you for reporting this proposal and volunteering to work on this. Could you help us understand the scenario better?
It seems like the class' lifecycle methods like JUnit's @BeforeEach
or @BeforeAll
would be a good place for such commands. Those will be executed before each retry, and you could then restart a service, etc.
Can you maybe give an example where this will not work?
Would it be an idea to allow to run a command before a retry or before last retry, e.g. restart a service, reload db etc.
CommandBeforeRetry=sqlcmd delete from tableX CommandBeforeLastRetry=gradlew restartX && wait 60
Maybe I could add this and make PR for your review ?