uds-se / droidmate

DroidMate-2: A Platform for Android Test Generation
http://www.boxmate.org/
GNU General Public License v3.0
28 stars 14 forks source link

Adjusting frequency of actions #5

Closed DennisTsiang closed 5 years ago

DennisTsiang commented 5 years ago

Hi there, your project seem very useful to me. I was wondering if there is an option to adjust the frequency of the actions via a command line parameter? Looking at ConfigurationBuilder.kt I can see deviceOperationDelay but I am unsure if this is what I am looking for.

If such an option does not exist, could you point me to where in the codebase I could make this extension?

natanieljr commented 5 years ago

Hi,

Could you elaborate on what you mean by frequency of the actions?

Do you want to introduce a fixed delay between the actions or do you want to have the actions triggered at specific times?

DennisTsiang commented 5 years ago

Yes, I meant a fixed delay between the actions. For example, 2 seconds between each button press

natanieljr commented 5 years ago

Right,

So, the actions have the possibility of a fixed delay, which we are now using as 0 by default.

I could have a look on this problem next week or if you want to give it a try, you could add a delay parameter to this availableActions function and have it also as a parameter on the RandomWidget class, with a default value of 0 not to affect any running item.

DennisTsiang commented 5 years ago

Thanks, I'd appreciate it if you'd take a look at it. Probably will be quicker than me trying to implement it myself.

In the meantime though, I will try out your suggestions and see if I can get it working.

natanieljr commented 5 years ago

Update pushed to the DEV branch.

You can use the command line parameter --Exploration-widgetActionDelay=<DELAY> if you are using DM's default strategies, otherwise you can use the parameter on your custom strategy.