tavern icon indicating copy to clipboard operation
tavern copied to clipboard

Continue execution after failed stage

Open KenStorey opened this issue 4 years ago • 3 comments

Is it possible to instruct Tavern not to stop executing a test when it encounters a failure?

Most of our tests are of the form

  • Set up
  • Perform test
  • Tear down

If a failure is encountered the tear down does not happen and, consequently, subsequent tests all fail.

KenStorey avatar Sep 09 '21 10:09 KenStorey

I don't think there's any particular reason why there couldn't be something like

setup:
	- name: ...

stages:
	- name: step 1
	- name: step 2

teardown:
	- name: ...

Where the teardown would act like a 'finally' block in Python and would always run as long as the setup stages all finished

michaelboulton avatar Sep 25 '21 13:09 michaelboulton

Is anyone working on this? I could use this feature too and will write it if no one else is working on it.

hamx0r avatar Dec 01 '21 21:12 hamx0r

I would opt to add a new keyword to each test step, eg., execute that can take up values always or success. Analogous to how GitHub does it. We could have it set to success by default. WDYT @michaelboulton?

lvijnck avatar Apr 11 '22 16:04 lvijnck