Question

I would like to run monkey on Jenkins but after use configuration: https://wiki.jenkins-ci.org/pages/viewpage.action?pageId=57181910

I see in monkey.txt file:

No activities found to run, monkey aborted.

$ E:\server\AndroidSDK/platform-tools/adb.exe -s localhost:46881 shell monkey -v -v -p package.name -s 0 --throttle 0 50

$E:\server\AndroidSDK/platform-tools/adb.exe disconnect localhost:46881 [android] Stopping Android emulator [android] Archiving emulator log

I run this command on my PC, but I cannot run it on server. If I run the command: adb shell monkey -v -v 50 -p package.name -s --throttle 0 on cmd on server it will work.

How can I configure Jenkins to run monkey properly?

I'm using the newest plugins for Jenkins.

Était-ce utile?

La solution

Are you really using "package.name" in the monkey command line rather than your actual package name?

Did you ensure the APK was installed on the emulator before running monkey?

Otherwise, is there any output in the logcat.txt which indicates what's going wrong?

Also, I'm not sure why you linked to a really old version of the Android Emulator Plugin wiki page, but since then there's a Jenkins build step that will run monkey for you, without you having to manually write it into a batch script step.

Autres conseils

Like Thomas pointed out in Christopher's comment: You also have to think about installing the apk to the smartphone.

This can be done by using the "install android package" build step before "Run android monkey tester". After that you can add another build step "uninstall android package"

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top