honeynet / droidbot

A lightweight test input generator for Android. Similar to Monkey, but with more intelligence and cool features!
MIT License
791 stars 230 forks source link

how to gather coverage while running droidbot? #153

Closed shiyuanxiang closed 1 year ago

shiyuanxiang commented 1 year ago

I want to gather the coverage of the running apk, thanks!

yuanchun-li commented 1 year ago

A simple way is to compute the "activity coverage". You can obtain a list of all activities through the app.activities field, and obtain the visited activities by checking the json file of reached states.

Getting method coverage or line coverage is harder. I used to have another project (see this) for method coverage, but it hasn't been maintained for a long time.