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:
Customer App: Where the order is placed.
Delivery Agent App: Where the order is accepted and tracked.
Step-by-Step Workflow Example:
Step 1: Start testing the Customer App by placing an order.
Step 2: Use the OPEN_APP command to switch to the Delivery Agent App and continue testing. OPEN_APP:(com.deliveryagent.app)
Step 3: Perform actions on the Delivery Agent App, such as accepting the order.
Step 4: Optionally, switch back to the Customer App to validate the updated order status.
Syntax:
OPEN_APP:(<package_name>)
Example:
OPEN_APP:(com.android.chrome)
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:
MINIMIZE_APP: Minimizes the current app, taking you to the device’s home screen or app menu.
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:
Step 1: Begin testing on the first app (e.g., sending a file via email).
Step 2: Use the MINIMIZE_APP command to return to the home screen. MINIMIZE_APP
Step 3: Use the TAP command to open the second app from the app menu. TAP:(Coordinates or Element Description)
Step 4: Continue the test flow on the second app.
Command Example:
MINIMIZE_APP
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.
Last updated
Was this helpful?