# Creating test cases

> In this scenario, you can learn how to create a test configuration in SAP Solution Manager, create a test case in Studio, and deploy a newly created process to Orchestrator.

In this scenario, you can learn how to create a test configuration in SAP Solution Manager, create a test case in Studio, and deploy a newly created process to Orchestrator.

To create test configuration and test cases, follow these procedures:

1. [Create Test Configuration](creating-test-cases-sap-solution-manager.md)
2. [Create Test Cases](creating-test-cases-sap-solution-manager.md)
3. [Publish Test Case to Orchestrator](creating-test-cases-sap-solution-manager.md)
4. [Deploy Process in Orchestrator](creating-test-cases-sap-solution-manager.md)

## Create Test Configuration

To prepare for the test case creation, you need to create a test configuration for your business process.

1. Use **SAP Logon** to connect to your SAP Solution Manager System.
2. Start **SAP Fiori Launchpad** with help of transaction **/n/UI2/FLP**.
3. Navigate to **Project and Process Management** &gt; **Solution Documentation**.

   ![docs image](https://dev-assets.cms.uipath.com/assets/images/test-manager/test-manager-125554-a2a60035.webp)
4. Select your business process scenario and navigate to the process step that contains the transaction (executable) you want to automate.
5. Right-click the executable **Create Sales Order**.
6. Navigate to **New** &gt; **Test Cases** &gt; **Test Configuration (Create)**.

   ![docs image](https://dev-assets.cms.uipath.com/assets/images/test-manager/test-manager-125550-654f742f.webp)
7. Fill in the following test configuration details:

   * Enter a technical name for the new **Test Configuration****and**Test Script.
   * Select **UiPath®**as a **Test Tool**.
   * Enter **Version number** .
   * Enter the **Title of new Test Configuration**.
   * Choose a **Local Object** to save the Test Configuration in the $TMP package.
8. Click **Ok** to confirm.

   :::note
   The Test Configuration and Test Script names must begin with the letter Z, and they must not contain any special characters nor spaces.
   :::

   ![docs image](https://dev-assets.cms.uipath.com/assets/images/test-manager/test-manager-125938-8413866f.webp)
9. Click **Save** to save the Test Configuration.

   ![docs image](https://dev-assets.cms.uipath.com/assets/images/test-manager/test-manager-125526-0dd09e83.webp)

## Create Test Cases

Use Studio to create your test case.

1. In the newly created test configuration window, click **Launch UiPath®** to open Studio.

   ![docs image](https://dev-assets.cms.uipath.com/assets/images/test-manager/test-manager-126449-654c9bee.webp)
2. Choose one of the available options to start creating the test case.

   ![docs image](https://dev-assets.cms.uipath.com/assets/images/test-manager/test-manager-127107-e06eb38b.webp)
3. In the Project Settings window configure the following details:

   * Enter your **Test Manager URL**.
   * Select the **Default Project** where the current and future test cases are automatically created.

     ![docs image](https://dev-assets.cms.uipath.com/assets/images/test-manager/test-manager-125602-9e1f4fa7.webp)
4. Click **Ok** to confirm. You need to configure the Project Settings only once for each Studio project that will be used for the SAP Solution Manager Integration.

   The test case is created in Studio and the relevant information from Test Configuration about the System Under Test (SUT) is transferred to the test case, in the Variables section. Subsequently, the test case is created in Test Manager in a predefined **SolMan** project.

   ![docs image](https://dev-assets.cms.uipath.com/assets/images/test-manager/test-manager-126030-fb5f070a.webp)
5. Start creating test automation in Studio.
6. Click **Return to SAP Solution Manager** to save the test case in Studio and finalize the Test Configuration creation in SAP Solution Manager. This button is available only if the SAP Solution Manager Plugin is installed on your machine. For more information, see [Configuring User Machine](configuring-user-machine.md).

   ![docs image](https://dev-assets.cms.uipath.com/assets/images/test-manager/test-manager-125698-c2d5b205.webp)

   Studio is disabled and the control is handed over to SAP Solution Manager. Studio is now waiting for a new command to create, edit, or to display the Test Configuration.

   ![docs image](https://dev-assets.cms.uipath.com/assets/images/test-manager/test-manager-125962-29275ebb.webp)

   :::note
   * Click "Disconnect" to disconnect from SAP Solution Manager and work in Studio in the standalone mode
   * The changes in Test Case will be not synchronized with SAP Solution Manager.
   * The test case must be opened from test configuration to get all arguments synchronized with SAP Solution Manager.
   :::
7. Click **Refresh** to update the data in the Test Configuration.

   ![docs image](https://dev-assets.cms.uipath.com/assets/images/test-manager/test-manager-126010-106aa23d.webp)
8. Click **Close** in the Test Configuration window to complete the creation process.

   The test case is assigned to the solution documentation and its corresponding transaction.

   ![docs image](https://dev-assets.cms.uipath.com/assets/images/test-manager/test-manager-125914-3f7f485c.webp)

## Publish Test Case to Orchestrator

Once the test case creation is finished, you need to publish it to Orchestrator. For more information, see [Publish Test Cases](https://docs.uipath.com/studio/v2022.4/docs/application-testing#publish-test-cases).

## Deploy Process in Orchestrator

For the last step, you need to assign the previously created process to your execution environment.

1. Log in to Orchestrator and go to **Processes**.
2. Click **Add** to configure a new process. For more information see [Managing Processes](https://docs.uipath.com/orchestrator/v2022.4/docs/managing-processes).
3. Choose the previously created process and assign it to your execution environment.

   ![docs image](https://dev-assets.cms.uipath.com/assets/images/test-manager/test-manager-125381-9b7daaea.webp)
4. Click **Create** to confirm. The automation is ready from the UiPath side.

   You need to perform the Deploy Process action only once for each process.

## Editing Test Case

You can edit and modify test cases through Studio.

1. Use **SAP Logon** to connect to your SAP Solution Manager system.
2. Start **SAP Fiori Launchpad** with help of transaction **/n/UI2/FLP**.
3. Navigate to **Project and Process Management** &gt; **Solution Documentation**.
4. Go to the business process that contains your test configuration.
5. Navigate to **Test Configuration** &gt; **Edit**.
6. Click **Launch UiPath®** to open Studio.
7. Edit your test case.
8. Once ready, save the work and to return back by clicking **Return to SAP Solution Manager**.

   :::note
   Keep in mind to publish the latest test case version to Orchestrator.
   :::

## Displaying Test Case

You can review the test case flow in read-only mode through Studio.

1. Use **SAP Logon** to connect to your SAP Solution Manager system.
2. Start **SAP Fiori Launchpad** with help of transaction **/n/UI2/FLP**.
3. Navigate to **Project and Process Management** &gt; **Solution Documentation**.
4. Go to the business process that contains your test configuration.
5. Navigate to **Test Configuration** &gt; **Display**.
6. Click **Launch UiPath®** to open Studio. Studio opens in **Read-only mode**. Modifications are not allowed.
7. To return, click **Return to SAP Solution Manager**

   ![docs image](https://dev-assets.cms.uipath.com/assets/images/test-manager/test-manager-125690-15b58fb3.webp)
