2

Android monkey tool is great!
With one line of script, it launch your app and perform automation tests:

adb shell monkey -p my.greate.package + -c android.intent.category.LAUNCHER -s 123 --pct-touch 99 --throttle 20 -v 1000

You can configure it to do many things, in the above example I start an app by package name, restrict the monkey for touch events only. It will do 1000 touch events with 20 millisecond interval in between them.


However this tool is not enough for me. I need some thing without predefined or recorded tests, that I can just launch. But the monkey does not see the screen components, it clicks randomly on the screen, and some times there are buttons that it never finds.

I saw this site with lots of alternatives, but none that is instant launch without pre-configurations.

Help me out here, how do I make my monkey smarter or find a better alternative?

  • So you want to launch it, without any (predefined or recorded) tests? How will it get tested in that circumstance, and what kind of report are you hoping to see? – Ira Baxter Aug 4 '16 at 13:32
  • I got other tools for reporting, I just need it to be able to navigate threw the app, without knowing it. – Ilya Gazman Aug 4 '16 at 14:09
  • I don't understand. You want to exercise the application, without knowing how it works? If the application has any internal state, you can't do that. – Ira Baxter Aug 4 '16 at 15:33
  • @IraBaxter I want to maximize my success rate. Obviously there are apps that I want be able to navigate in. – Ilya Gazman Aug 4 '16 at 15:45
  • This sounds a lot like unit tests of a function with random arguments. The first few may different enough to cause different behaviors, but in general the input divides into many equivalence classes and most of the random argument values don't produce new behavior. Why do you think this works? – Ira Baxter Aug 6 '16 at 4:46
1

You can use Sikuli X to automate anything that you can see on your PC screen including using image recognition to find specific buttons to click on regardless of the actual position on the screen. This of course can include anything that is occurring on in the emulation environment or is repeated to the PC screen from an actual device.

You can click, double click, check results, type text into fields, etc., including launching programs.

It is script-able in python or java script.

  • This looks interesting. In my case I need to test a lot of applications that I didn't saw before. Do you think it will be useful for me? Because I am not sure what kind of script I can put there, except limiting the interaction area to my emulator screen. Can Sikuli X recognize buttons or shapes? – Ilya Gazman Jun 30 '16 at 8:26
  • Sikuli recognises anything on the screen and can be quickly and easily "trained" - it is amazingly easy to use. – Steve Barnes Jun 30 '16 at 8:55
  • Ok, I give it a try, tnx – Ilya Gazman Jun 30 '16 at 8:56
0

Ranorex is on the website you mentioned, but I think it does exactly what you want. You can use image-based recognition as well as XPath, a powerful identifier of UI elements. Ranorex contains a lot of useful test automation tools, for instance Ranorex Spy which might be very interesting for you since it allows you to create snapshot files from GUI elements.

  • It requires me to code the UI detection logic by my self, and then some how simulate event according to my detection results. So while there is some simplicity with XPath I will prefer opnecl for that task. But ultimately I prefer to use some thing that already does that... – Ilya Gazman Aug 4 '16 at 7:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.