Testing with two devices on one user flow

Mobile Testing, Android App Testing.
User avatar
sandamal
Posts: 28
Joined: Wed Jul 08, 2015 7:50 am

Testing with two devices on one user flow

Post by sandamal » Wed Dec 07, 2016 12:20 pm

Hi, I tried google and forum search but couldn't find a satisfying answer. :shock:

My Scenario as follows.

I need to test same application with two different roles (in two devices ) in one user flow.

Ex:
device A user log as user role
device B another user log as Admin Role. (both cases have same UI)

when user with device A perform some action ,
Admin is getting a update and validate that .

this device switching is fine with launching application and log in since there we specify device name in record module.

so my question is if I click button X ( both devices have button x under same ranorex path) how can I specify which device to click. :cry: :cry:

User avatar
sandamal
Posts: 28
Joined: Wed Jul 08, 2015 7:50 am

Re: Testing with two devices on one user flow

Post by sandamal » Wed Dec 07, 2016 1:24 pm

hi , in further investigation I found that I can include the device name in to repository root,
so I think if I keep 2 duplicated repositories issue might solve.

Is that the best approach ? can I pass the device name in to ranorex path in test case level keeping one repository. ??

User avatar
sandamal
Posts: 28
Joined: Wed Jul 08, 2015 7:50 am

Re: Testing with two devices on one user flow

Post by sandamal » Wed Dec 07, 2016 1:27 pm

yes , i found it is possible. :lol: :lol:

but pretty messy setting variables , is there an easy solution.

jma
Posts: 111
Joined: Fri Jul 03, 2015 9:18 am

Re: Testing with two devices on one user flow

Post by jma » Fri Dec 09, 2016 1:22 pm

Hi,

According to my opinion distinguishing both devices by using a repository variable in the root item will be the best solution.

tvu
Posts: 195
Joined: Tue Apr 07, 2015 10:47 pm

Re: Testing with two devices on one user flow

Post by tvu » Tue Dec 13, 2016 12:47 am

Hi sandamal,

As jma mentioned, just add a variable representing your mobile device in the repository root then you just have to bind the two different device names in your test case. I switch between two devices in a single test case and it's pretty easy to setup.

Let's say you have a recording that perform a touch operation on a button. That recording should have a parameter where you can bind the name of the device. Add that recording twice to a test case. In your test case, create two parameters containing the name of each device. Bind one name to the first instance of your recording and then bind the second name to the second instance of the recording.

That's it.