Skip to main content

Teardown Steps in Thunder Code

Add, Update & Delete Teardown steps

Karim JOUINI avatar
Written by Karim JOUINI
Updated over a month ago

What are Teardown Steps?

Teardown Steps are special cleanup operations that always get executed, even when other steps fail, similar to a try/finally block in programming. They ensure proper cleanup and resource management even during errors.

They’re declared at the end of your steps, whether manually or through chat. These steps are easily identifiable with a special icon.

When to Use Teardown Steps

Teardown Steps are particularly useful when you need to:

  • Clean up test data

  • Reset application state

  • Release system resources

Creating Teardown Steps

A- Manual Creation

  1. Go to the end of your test sequence

  2. Click on the "Teardown Steps" dropdown

  3. Click "Add a new teardown step"

  4. Choose your step type and fill in the required information

  5. Click "OK" to confirm

B- Creation via Chat:

When writing your prompt, specify that you need a "Teardown Step" or "execution on failure" so our agent can create the appropriate Teardown Step

Edit or Delete Teardown Steps

Teardown steps can be edited or deleted just like normal steps. Please refer to Edit Test Case steps section for detailed instructions.

⚠️ Important: While you can add multiple teardown steps, each one should serve a specific purpose. Avoid adding unnecessary cleanup steps that might slow down test execution.

Contact Us

If you have any questions about teardown steps, please feel free to reach out through the chat widget at the bottom of your screen or on [email protected] .

Did this answer your question?