# Nested test cases (shared test cases/steps)

## Nested Test Cases

This topic is important for testers who want to reuse test cases/test steps. A simple scenario might be that you want to reuse test steps for a login in various test cases so that those tests steps only have to be updated once in case of changes. As an example, let us create a scenario in which a browser is opened in a first step, an URL is entered as a second test step, and the browser is closed as a third test step.

&#x20;

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

&#x20; &#x20;

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

Save that test case and create a new one called `Open andagon Page`. This one has two more test steps.

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

In order to insert our test steps of the test case Open Browser into the actual test case Open andagon Page, click on ![](http://aquawiki.andagon.com/pictures/drex_nested_test_cases_custom_4.png) and select the test case and its place in the step sequence. &#x20;

<figure><img src="http://aquawiki.andagon.com/pictures/drex_nested_test_cases_custom_5.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_test_cases_custom_6.png" alt=""><figcaption></figcaption></figure>

By executing the test case, the parameters and test steps are resolved automatically. &#x20;

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

A nested test case will be shown as a [dependency](https://docs.aqua-cloud.io/documentation/items/general-item-capabilities/dependencies).

&#x20;

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