Availability Release 6.1
ACCELQ allows you to automate test cases that involve multiple mobile devices within a single test case flow. Examples include testing workflows that require multiple roles logging in from various devices to complete a transaction or capturing interactions between multiple users in a chatting application simultaneously.
Each device in the flow operates independently, and you have the flexibility to choose different devices or operating systems for each of them. You may also switch back and forth between these devices during the flow.
This article explains how to set up multiple devices for such requirements.
Example Use Case: PO Creation and Approval
In the Scenario flow below, an Accountant creates a purchase order from the first mobile device (Accountant Device). Then, a Manager logs in to the app on another device (Manager Device) and approves the PO. The flow then switches back to the Accountant Device, where the Accountant navigates to the Approved Purchase Orders and verifies that the PO is approved.
- Init Mobile Device (session: Accountant Device)
- Login to Accounting App (role: Accountant)
- Create New Purchase Order
- Init Mobile Device (session: Manager Device)
- Login to Accounting App (role: Manager)
- Approve Pending Purchase Orders
- Switch to Device (session: Accountant Device)
- Verify Approved Purchase Orders
Initializing a device and loading an App
When you initialize a device and load an app using the system-provided Action "Initialize Mobile Device and Load App," you create a mobile session with the name "default".
If you need to work with multiple devices, you can write a custom Init Action that accepts the session name as a parameter. Session name distinguishes one device from the other in a single test case flow.
Here is the logic involved in such an Action. Remember to mark this Action as an Init Action.
When using this Action in a Scenario, it is important to give meaningful names to different sessions that are involved with different devices. For example, you might use session names such as "Accountant Device" and "Manager Device." Here is an example snippet of Scenario steps that include session names:
Provisioning multiple devices at run-time
When a Scenario requires multiple devices, it is necessary to provision and configure those devices before running the test. To configure multiple devices, click on the pencil icon in the run modal next to the Mobile Testing section.
In the device selection screen, click on "Add multiple Devices" in the footer.
You can add multiple devices here, with corresponding mobile driver profiles. It is important that the reference names provided here for the devices match the session names used in the Scenario Init steps.
Note: If a device was initialized in the Scenario without a specific session name, you should pass the reference name as "default" in the Multi-Device configuration screen above.
Comments
0 comments
Please sign in to leave a comment.