> For the complete documentation index, see [llms.txt](https://docs.aqua-cloud.io/documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.aqua-cloud.io/documentation/desktop-client/test-management/nested-testcases.md).

# Nested Testcases

This topic is necessary for testers who want to reuse test cases as pre-conditions and post-conditions. A Default scenario, for example, is that you want to reuse login test steps in various test cases so should anything change, login tests steps only have to be changed once. A different scenario is that many test cases have the same setup test steps and the same tear down test steps.&#x20;

It's also possible to nest a test case with test steps in the middle of defined test steps. For such a case, let us create a quick example of a scenario in which a browser is opened as setup test steps, a URL is entered as main test steps, and the browser closed as tear down test steps.&#x20;

<figure><img src="http://aquawiki.andagon.com/pictures/drex_nested_testcases_rich_client_custom.png" alt=""><figcaption></figcaption></figure>

&#x20;

<figure><img src="http://aquawiki.andagon.com/pictures/drex_nested_testcases_rich_client_custom_2.png" alt=""><figcaption></figcaption></figure>

&#x20;Save that test case and create a new one called *Open andagon Page*. This one has another two test steps. &#x20;

<figure><img src="http://aquawiki.andagon.com/pictures/drex_nested_testcases_rich_client_custom_3.png" alt=""><figcaption></figcaption></figure>

To insert our test steps of the test case *Open Browser* into the actual test case *Open andagon Page,* go back to aqua's main navigation and insert the test case via drag and drop into our test steps. You will receive the following result. For the right order, push the nested test case up to the first position. &#x20;

<figure><img src="http://aquawiki.andagon.com/pictures/drex_nested_testcases_rich_client_custom_4.png" alt=""><figcaption></figcaption></figure>

Here, you can define under which condition the test case should be executed. In this case, define Chrome and the inner variables. &#x20;

<figure><img src="http://aquawiki.andagon.com/pictures/drex_nested_testcases_rich_client_custom_5.png" alt=""><figcaption></figcaption></figure>

By executing the test case, the parameters are automatically set for manual test execution.&#x20;

<figure><img src="http://aquawiki.andagon.com/pictures/drex_nested_testcases_rich_client_custom_6.png" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.aqua-cloud.io/documentation/desktop-client/test-management/nested-testcases.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
