Script executing on wrong device intermittently

Mobile Testing, Android App Testing.
mattmccall
Posts: 29
Joined: Mon Nov 12, 2012 8:13 pm

Script executing on wrong device intermittently

Post by mattmccall » Wed Mar 27, 2013 4:46 pm

I have created a test that has been executing on an iPad. I added a new device, an iPhone,and tried to run the tests on that device. I specifically told it to run on the iPhone:

Host.Local.RunMobileApp(iPhone, "<app name>");

It logged in ok but once it did it started executing on the iPad which happened to be logged in and on the same screen after login. I tried to reproduce it and it did not do that. Then a few minutes later it did. What is going on? Why would it start executing on the other device?

Like I said it does not happen all the time, but its enough to be annoying. If I have the other device turned off there isn't a problem, however if someone would be suing that to test I do not want to screw them up, or me for that matter.

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Script executing on wrong device intermittently

Post by Support Team » Thu Mar 28, 2013 4:49 pm

Hello,

Could you please try to add a device name to your root repository item?
Please take a look at our User Guide at Run Tests in parallel.

Regards,
Markus (T)
.
Image

mattmccall
Posts: 29
Joined: Mon Nov 12, 2012 8:13 pm

Re: Script executing on wrong device intermittently

Post by mattmccall » Fri Mar 29, 2013 3:37 pm

Markus,

I have my device name set up as a parameter already. I pass the device I want to use in my data sheet. It happens intermittently and for no reason it seems.

I use Host.Local.RunMobileApp("<device>", "<app name>"); to tell it what device I want, and if I have both logged in the script will login to the correct one, and then sometimes execute on the other.

Matt

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Script executing on wrong device intermittently

Post by Support Team » Tue Apr 02, 2013 2:16 pm

Hello,

You would need to add a device name in the RxPath of your rooted repository item in order to uniquely identify your repository items. This is needed if you want to have both devices connected.

Please take a look at the example below:

Code: Select all

mobilapp[@title='com.android.keepass' and @devicename=$varMobileDevice]
More info can be found in our User Guide.

Regards,
Markus (T)
.
Image