# Multiapp

Multiapp testing allows you to test multiple applications within a single test session. This feature is particularly useful for scenarios involving interconnected workflows between two or more apps. Below, we discuss the different ways to perform multiapp testing.

### OPEN\_APP Command

The OPEN\_APP command enables seamless switching between apps during a test session. This command opens a specified app, allowing you to continue testing within a different application.

#### **Example Use Case: Testing a Food Delivery Workflow**

Imagine testing a food delivery system that involves two apps:

1. **Customer App:** Where the order is placed.
2. **Delivery Agent App:** Where the order is accepted and tracked.

#### **Step-by-Step Workflow Example:**

1. **Step 1:** Start testing the **Customer App** by placing an order.
2. **Step 2:** Use the OPEN\_APP command to switch to the **Delivery Agent App** and continue testing.\
   OPEN\_APP:(com.deliveryagent.app)
3. **Step 3:** Perform actions on the Delivery Agent App, such as accepting the order.
4. **Step 4:** Optionally, switch back to the Customer App to validate the updated order status.

#### **Syntax:**

1. OPEN\_APP:(\<package\_name>)

#### **Example:**

1. OPEN\_APP:(com.android.chrome)

{% embed url="<https://youtu.be/I5AhCp_GWQ4>" %}

### System + Action Commands

For greater flexibility, you can combine **system commands** like MINIMIZE\_APP with **action commands** to test workflows across multiple apps without relying solely on the OPEN\_APP command.

#### **Commands Used:**

1. **MINIMIZE\_APP:** Minimizes the current app, taking you to the device’s home screen or app menu.
2. **TAP:** Simulates a tap gesture to open another app from the menu.

#### **Example Use Case: Switching Between Two Apps on the Device Menu**

Suppose you're testing a scenario where one app sends data to another for processing.

#### **Step-by-Step Workflow:**

1. **Step 1:** Begin testing on the first app (e.g., sending a file via email).
2. **Step 2:** Use the MINIMIZE\_APP command to return to the home screen.\
   MINIMIZE\_APP
3. **Step 3:** Use the TAP command to open the second app from the app menu.\
   TAP:(Coordinates or Element Description)
4. **Step 4:** Continue the test flow on the second app.

#### **Command Example:**

1. MINIMIZE\_APP
2. TAP on Chrome

#### **Benefits of Multiapp Testing with Multiple Commands**

* Greater control over app transitions, especially for custom workflows.
* Flexibility to simulate real user actions, such as opening apps via the home screen.
* Allows integration of device-specific actions into the test flow.

By combining system commands with action commands, you can create dynamic and realistic multiapp test scenarios tailored to your needs.


---

# Agent Instructions: 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:

```
GET https://docs.drizz.dev/different-use-cases-supported-by-drizz/multiapp.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
