qspin / qtaste

[NEW RELEASE VERSION 3.0.0] The QTaste is an open-source functional and non-functional test environment offering services to developers and testers. It has been implemented following a data driven testing philosophy.
http://www.qtaste.org
GNU Lesser General Public License v3.0
6 stars 11 forks source link

JavaGUI action timeout mechanism too slow #64

Open dergo opened 11 years ago

dergo commented 11 years ago

JavaGUI clickOnButton() and other methods support a timeout before executing the action, in case the widget is not yet enabled or visible. Unfortunately, the current implementation will only check the widget state every second, which is pretty slow for an automated test system, because sometimes we need to do the action faster than 1 second!

It should check the widget at least every 100 ms or even better listen for the widget state changes and do the action as soon as possible.

Code implementing the timeout is in UpdateComponentCommander.executeCommand().

dergo commented 11 years ago

Maybe it's even a bad idea to hide this timeout mechanism because if a test fail, we don't know if the button has really been clicked or not.

I think a better solution would be to offer an explicit method to check the button state, and this would also allow to specify the timeout value. e.g. checkButtonClickable(int pTimeoutInMs)

simjan commented 11 years ago

That's means that all calls to the method clickOnButton have to be preceded by this check... If a button is set invisible in a GUI, the javagui controller is still able to "click" on it... Without this check, the test will not detect that the action is impossible for a user....

2013/10/8 dergo notifications@github.com

Maybe it's even a bad idea to hide this timeout mechanism because if a test fail, we don't know if the button has really been clicked or not.

I think a better solution would be to offer an explicit method to check the button state, and this would also allow to specify the timeout value. e.g. checkButtonClickable(int pTimeoutInMs)

— Reply to this email directly or view it on GitHubhttps://github.com/qspin/qtaste/issues/64#issuecomment-25889707 .

dergo commented 11 years ago

No, clickOnButton() can also check, without timeout, that the button is clickable before clicking on it.

So if the button should be immediately clickable, you just need to call clickOnButton(), otherwise you explicitely verify it, using a timeout.