Testing two connected Android devices

Hi all,

I’m looking to execute a test case, or test cases, where there is interaction between two Android devices - e.g. I want to perform actions on device A, then I expect to see something appear on device B that I’d like to verify/click. Is it possible somehow to execute one test case on device A, and a different test case on device B? (or alternatively, start an APK (Mobile.startApplication) for a specified device).

I know I can execute a Test Suite from the command line, where I can specify the specific Android device in ‘Generate Command for Console Mode > Run Configuration’, but that would be cumbersome as I’d have to generate Test Suites on a 1:1 basis with Test Cases, and there are too many for that to be manageable.

So, does anyone know a way to achieve this please?

If not, could I request this feature please (specifically, the ability to specify which device (or browser) to execute a specific test step, or test case against)?

Thanks :slight_smile:

Anyone? :slight_smile:

Hi Kevin,

I’m trying to do test 2 mobile devices in interaction same as you, any progress on your side?

Thanks :slight_smile:

The Test Suite method with parallel execution does work but as you say it is tedious setting up on a 1:1 basis per Test Suite added to a Test Suite Collection.

If you don’t need the tests running in parallel at the same time, you can call another test case for the test. I have done this in my tests for sending a SMS from device A to device B.

So the main test is in one folder related to device A and this is named ‘Send SMS to device B’, and the test to check output on device B is in the device B folder name ‘Receive SMS from device A’.

In the ‘Send SMS to device B’ it will go through all the steps required to create a new message with the number for device B and hit send. After this, in the same test at the end is a Call Test Case statement and it links to ‘Receive SMS from device A’ so this is the check that will be done on device B. The ‘Receive SMS from device A’ test case will open up the messaging app and verify the SMS and it’s contents that should have been received from device A.

The test ‘Send SMS to device B’ should now be marked as pass which covers both scenarios of sending the SMS and it being received on device B. Hope this explanation helps