Feri73 / deep-gui

Deep-GUI is a tool for generating intelligent inputs to test UI-based applications, such as Android or web applications.
GNU General Public License v3.0
13 stars 4 forks source link

yaml.parser.ParserError caused by typo in monkey-test-configs.yaml #11

Closed RichardHoOoOo closed 2 years ago

RichardHoOoOo commented 2 years ago

Is there a bug in monkey-test-configs.yaml?

https://github.com/Feri73/deep-gui/blob/66e6a7fac9cf40e0895980dc13f86ff958c00406/configs/monkey-test-configs.yaml#L3

Should line 3 be - [2, [.7, .3], 0, 0, 0, 0, deep, c95s, e10]?

Currrently main.py is throwing an error

yaml.parser.ParserError: while parsing a flow sequence
  in "configs.yaml", line 3, column 5
expected ',' or ']', but got '<scalar>'
  in "configs.yaml", line 4, column 1

But changes to - [2, [.7, .3], 0, 0, 0, 0, deep, c95s, e10] throws another exception

Traceback (most recent call last):
  File "main.py", line 688, in <module>
    for i, probs_and_ops in enumerate(tester_option_probs_and_ops)]))
  File "main.py", line 688, in <listcomp>
    for i, probs_and_ops in enumerate(tester_option_probs_and_ops)]))
KeyError: 0
Feri73 commented 2 years ago

Hey, Yes it's a bug! Thanks for pointing it out. It should be this: [2, [.7, .3, 0, 0, 0, 0], deep, c95s, e10] Let me know if this solves the problem and I will commit the change.

RichardHoOoOo commented 2 years ago

Hi, it fixed the issue!

But may I ask another question about run_monkey.sh? https://github.com/Feri73/deep-gui/blob/66e6a7fac9cf40e0895980dc13f86ff958c00406/scripts/run_monkey.sh#L91-L102

In the above part, we start emulator at line 94, then install the apk at line 96, then launch the app at line 98. But why do we need to kill the emulator (line 100) and start it again (line 101)?

Feri73 commented 2 years ago

I am having a hard time remembering (I should have commented it :p) but I think the reason was that the first run of money always resulted in error so I run monkey, make sure it loads, then restart the phone and use monkey for testing.

RichardHoOoOo commented 2 years ago

I see. Thanks for your reply.