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

Always the same view #134

Closed Gunkkk closed 2 years ago

Gunkkk commented 2 years ago

with the DFS policy, it will like that,

INFO:UtgGreedySearchPolicy:Current state: 32789d3d996e8e9b4275733c09df15a7
INFO:UtgGreedySearchPolicy:Trying an unexplored event.
Action: TouchEvent(state=32789d3d996e8e9b4275733c09df15a7, view=2e5a79d946f5b6610ad7f7bd678c5f31(MainActivity/RelativeLayout-))
INFO:UtgGreedySearchPolicy:Current state: 72219b5086f6764e085197bd91ddb568
INFO:UtgGreedySearchPolicy:Trying an unexplored event.
Action: TouchEvent(state=72219b5086f6764e085197bd91ddb568, view=2e5a79d946f5b6610ad7f7bd678c5f31(MainActivity/RelativeLayout-))
INFO:UtgGreedySearchPolicy:Current state: b410aa208c9a4c87f4f740f6505434df
INFO:UtgGreedySearchPolicy:Trying an unexplored event.
Action: TouchEvent(state=b410aa208c9a4c87f4f740f6505434df, view=2e5a79d946f5b6610ad7f7bd678c5f31(MainActivity/RelativeLayout-))
INFO:UtgGreedySearchPolicy:Current state: 55d55267c95814d7d95e2207a6d531ce
INFO:UtgGreedySearchPolicy:Trying an unexplored event.
Action: TouchEvent(state=55d55267c95814d7d95e2207a6d531ce, view=2e5a79d946f5b6610ad7f7bd678c5f31(MainActivity/RelativeLayout-))
INFO:UtgGreedySearchPolicy:Current state: c6dabb92048a99f4fa77d3f64ac35008
INFO:UtgGreedySearchPolicy:Trying an unexplored event.
Action: TouchEvent(state=c6dabb92048a99f4fa77d3f64ac35008, view=2e5a79d946f5b6610ad7f7bd678c5f31(MainActivity/RelativeLayout-))
INFO:UtgGreedySearchPolicy:Current state: e2613bf4b5844e1322a3422002d0b0fe
INFO:UtgGreedySearchPolicy:Trying an unexplored event.

and with bfs policy,

Action: KeyEvent(state=b1bedb413f4050725550b90b176c456e, name=BACK)
INFO:UtgGreedySearchPolicy:Current state: b1bedb413f4050725550b90b176c456e
INFO:UtgGreedySearchPolicy:Trying an unexplored event.
Action: TouchEvent(state=b47397f0818797fe2af30f9162f4d7bc, view=2e5a79d946f5b6610ad7f7bd678c5f31(MainActivity/RelativeLayout-))
INFO:UtgGreedySearchPolicy:Current state: b47397f0818797fe2af30f9162f4d7bc
INFO:UtgGreedySearchPolicy:Trying an unexplored event.
Action: KeyEvent(state=b47397f0818797fe2af30f9162f4d7bc, name=BACK)
INFO:UtgGreedySearchPolicy:Current state: ec0d841b2686ce13caf6b2d569596df6
INFO:UtgGreedySearchPolicy:Trying an unexplored event.
Action: KeyEvent(state=ec0d841b2686ce13caf6b2d569596df6, name=BACK)
INFO:UtgGreedySearchPolicy:Current state: ec0d841b2686ce13caf6b2d569596df6
INFO:UtgGreedySearchPolicy:Trying an unexplored event.
Action: TouchEvent(state=af133d9907f9d382a42627261cef2943, view=2e5a79d946f5b6610ad7f7bd678c5f31(MainActivity/RelativeLayout-))
INFO:UtgGreedySearchPolicy:Current state: af133d9907f9d382a42627261cef2943
INFO:UtgGreedySearchPolicy:Trying an unexplored event.
Action: KeyEvent(state=905ede3305a45b62b0b039e43214c339, name=BACK)
INFO:UtgGreedySearchPolicy:Current state: 905ede3305a45b62b0b039e43214c339
INFO:UtgGreedySearchPolicy:Trying an unexplored event.
Action: KeyEvent(state=905ede3305a45b62b0b039e43214c339, name=BACK)
INFO:UtgGreedySearchPolicy:Current state: c1b38ca365b262591a533e9d00b76fee
INFO:UtgGreedySearchPolicy:Trying an unexplored event.
Action: KeyEvent(state=c1b38ca365b262591a533e9d00b76fee, name=BACK)
INFO:UtgGreedySearchPolicy:Current state: c1b38ca365b262591a533e9d00b76fee
INFO:UtgGreedySearchPolicy:Trying an unexplored event.
Action: TouchEvent(state=9d22be5167402e8ac6b92ce4fe15882a, view=2e5a79d946f5b6610ad7f7bd678c5f31(MainActivity/RelativeLayout-))
INFO:UtgGreedySearchPolicy:Current state: 9d22be5167402e8ac6b92ce4fe15882a
INFO:UtgGreedySearchPolicy:Trying an unexplored event.

Does it work normally? Thanks!

Gunkkk commented 2 years ago

I think the view content is going to be different when a touch event happens, so the the state can be different. Although with the humanoid, the Droidbot seems work, the state judged by the view and all content of it maybe not reasonable. And is there any solution to solve that problem please?