Monkeyrunner vs instrumentation - which is better for functional testing?

I want to create a couple of functional tests for an Android application to run them on a continuous integration server. As far as I understand, there are two main approaches: monkeyrunner and test cases using tools.

I don't see any monkeyrunner benefits at the moment, but I might be missing out on something. What is this good for?

+4
source share
2 answers

I like to use MonkeyRunner because it is really portable (Linux, Mac and Windows), it is easy to configure and can easily work with many different devices and emulators. In addition, sometimes with the toolkit you get crashes that are not related to the application, but rather because of the implementation of the toolkit. With MonkeyRunner, you'll find out what caused the crash.

+4
source

In my experience, testing monkeys is really useful for detecting application flaws in terms of:

  • Memory leaks: sometimes it is not possible to track scenarios that generate excessive memory usage (for example, fast, fast rotation, subsequent button presses, etc.).
  • The monkey also helps identify test cases; inadvertent, weird use of applications that end up crashing.
  • Using monkey tests, you can also somehow measure the performance of the application when it is used by "heavy" users.

I would say that testing monkeys does not contradict unit / tool testing, but this is another way to verify that your application is working as intended.

Of course, this also depends on what software is going to be tested, but, in my opinion, it is not always easy to determine what will happen if your button is pressed and then the 9px button is pressed above the button, and ultimately the phone’s activity starts. :) What tests monkeys for ...

0
source

All Articles