Skip to main content

Teardown Steps in Thunder Code

Add, Update & Delete Teardown steps

Karim JOUINI avatar
Written by Karim JOUINI
Updated over 3 weeks 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 and can be either Browser and/or API Steps.

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- Chat Creation:

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.

For more assistance or questions about teardown steps, contact our support team at [email protected]

Did this answer your question?