jeudi 16 mars 2017

perform incremental monkey test on android app, obtain partial profile, 599xxx lines profile

I'm (black-box) testing some Android applications using Monkey. The procedure works as follows:

    1. run emulator or connect a phone via USB (in debug mode) 
    2. start profiling: `adb shell am profile start <package> /data/local/tmp/profile`
    3. run monkey (with throttle ranging from 50 to 300, random seed, and from 500 to 10000 events)
    4. stop profiling: `adb shell am profile stop <package>`
    5. pull profile file: `adb pull /data/local/tmp/profile ./pulled-profile`
    6. "translate" profile file: `dmtracedump -o pulled-profile > dmdumped-profile`

I've tested this procedure on Linux (Ubuntu) or MacOS, using Jadb (Java implementation of adb) or adb from shell. No matter what I do, or which app that I test, or how many (but >100) events Monkey sends to the app, the pulled-profile is 599xxx lines long and 8.x MB.

So, I guess that the profiling phase (am) has a buffer limited to 8M has mentioned in 2012 in this post. I checked the buffer (for profiling) size of ddms and it's set to 8M but I can modify it.

I don't see any option to modify the buffer using am, is it hidden somewhere? Does anybody knows if there's still the 8MB limit for am profile? Any workaround?

PS. I've also tried to manually analyze the app (instead of using Monkey) and I have the same issue.

Aucun commentaire:

Enregistrer un commentaire