Android OS automation and Close Application not working

Mobile Testing, Android App Testing.
Katie
Posts: 2
Joined: Tue Aug 07, 2018 4:55 pm

Android OS automation and Close Application not working

Post by Katie » Tue Aug 07, 2018 5:37 pm

Hi, I am new to Ranorex and currently doing a trial. I am trying to reproduce tests we have created with another UI test tool with Ranorex, however the tools work very differently.

I am running Ranorex version 8.2.0 on a Windows 7 machine. The DUT is a NEXUS 6P running Android 8.1.0.

The app being tested is one that has a lot of security which means it cannot be tested un-obfuscated without triggering security checks and altering the app behaviour. As such I cannot use the Ranorex instrumentation. However I have found that if I install the app as usual on the phone I can interact with it using the 'Android OS automation'.

During our test cases we test things such as minimising and closing the app at different points to see what it remembers of where it was before hand but I am having trouble reproducing these now.

For minimise I can just do Mobile key press {HOME} - which I hope will work on the various app screens.

But for Close there are problems:

Using the Close Application-CloseWindow action doesn't have any affect on the app though the test seems to think it worked. I have tried selecting different Repository items from the 'AndroidOS' down to items on the app but none seem to have an effect. To check it was working I tried the CloseApplication with a different app which was instrumented and deployed through the tool and this essentially minimised it not closed it completely. Other apps on the phone but not instrumented also do not close.

Another solution would be to press the Android 'Recent Apps'/'Overview' button and close the app that way, however there doesn't seem to be a mobile key press action for this.

Can you please help me find a solution to this?

The Snapshot I have attached isn't for the app i am testing as that has confidential information on but another phone app which is showing the same behaviour. Also for some reason the end point in the snapshot isn't the one it is actually connected to - not sure why that is.

Regards,
Katie
You do not have the required permissions to view the files attached to this post.

User avatar
N612
Posts: 135
Joined: Mon Jul 11, 2016 4:01 pm

Re: Android OS automation and Close Application not working

Post by N612 » Thu Aug 09, 2018 3:06 am

Unfortunately, I do not think there is a way to use the Close Application action without instrumenting your app. Instrumenting the app gives Ranorex much more power to fully automate the application and will likely be required to do most functions.

Katie
Posts: 2
Joined: Tue Aug 07, 2018 4:55 pm

Re: Android OS automation and Close Application not working

Post by Katie » Thu Aug 09, 2018 4:58 pm

So if you are interacting with the Android OS and its apps - such as Settings, then you can't close it when you are done? I guess they rely on the home button which leaves it 'open' but essentially minimised.

What about the 'Recent Apps' Android hard key, is there a way to trigger that?

User avatar
N612
Posts: 135
Joined: Mon Jul 11, 2016 4:01 pm

Re: Android OS automation and Close Application not working

Post by N612 » Fri Aug 10, 2018 9:45 pm

At this time, there is no way to press the "Overview" button with Ranorex. Below is the list of available Android key presses. If this is truly needed, I recommend submitting a feature request.
You do not have the required permissions to view the files attached to this post.