java - Avoid sleeping snail in swing unit tests -
i want avoid sleeping snail in swing unit tests, don't see way events. have somethink like
windowwithkeylistener window = new windowwithkeylistener(); robot robot = new robot(); robot.keypress(keyevent.vk_1); robot.keyrelease(keyevent.vk_1); asserttrue(window.key1pressed()); robot.keypress(keyevent.vk_2); robot.keyrelease(keyevent.vk_2); asserttrue(window.key2pressed());
this doesn't work without thread.sleep()
before assertions, events slow. how avoid thread.sleep()
here?
swing timers cannot executed in specific order. best approach testing here?
jemmy seems handle
org.netbeans.jemmy.operators.componentoperator.typekey(int)
seems waiting.
Comments
Post a Comment