androidandroid-studiodevice-emulation

Android Studio test between two emulators


Okay so, I have two emulators running. I want to write a test where one device calls the other device using VOIP. My goal is to automate VOIP testing.

A successCount variable is defined inside the test class to validate whether the test was successful or not.

Steps I need to take in my test class:

  1. Login into the SIP server with device A.
  2. Login into the SIP server with device B.
  3. Device A calls device B (increase success count by 1).
  4. Device B answers the call (increase success count by 1).
  5. Device B hangsup after 5 seconds (increase success count by 1).
  6. Assert that success count is equal to 3.

Now the issue I have is the sequence of the steps on the devices. I need to tell device A to call device B after that device B has been logged into the SIP server for example. Currently I'm unable to accomplish this in an instrumented or unit test.

Does anyone know a solution to sequentially execute (unit/instrumented) test code in two device emulators in Android Studio? Is this even possible?


Solution

  • Our QA team uses Appium to automate integration tests. I allows you to find views in Android native, iOS native, web (both browser and webviews), etc. and simulate different actions (taps, get values, etc.). It also works in emulator/simulator (including remote devices) and physical devices.

    I'm pretty sure this tool will fit what you're trying to do, and also reasonably sure that will allow to control two emulators at the same time.