a problem while debugging windowtester-generated junit test

WindowTester allows you to easily create and run unit tests for every GUI they build. It can also be used to generate system level tests.

Moderators: gnebling, Eric Clayberg, Dan Rubel, keertip, Phil Quitslund

a problem while debugging windowtester-generated junit test

Postby izzetgezer » Tue Jun 16, 2009 2:08 pm

Hi,

i am very new to this product. while i am debugging the junit test which is genareted by the recording-tool, sometimes when i click anywhere in the source code in eclipse, my swing application lose focus and my java code becomes dirty.( tool writes in my codes instead of writing in JTextField in my swing application)
can i take any precaution? is it necessary to set up a special debug configuration?

please help, thanks
izzetgezer
 
Posts: 4
Joined: Tue Jun 16, 2009 1:50 pm

Re: a problem while debugging windowtester-generated junit test

Postby Phil Quitslund » Wed Jun 17, 2009 7:28 pm

WindowTester requires the application under test to maintain keyboard focus (and mouse control). This means you cannot interact with the mouse or keyboard during test execution (and not getting undesired effects).

Hope this helps!
--
Phil Quitslund
Software Engineer
Google, Inc.
Phil Quitslund
Moderator
 
Posts: 491
Joined: Fri Apr 28, 2006 6:26 am

Re: a problem while debugging windowtester-generated junit test

Postby izzetgezer » Thu Jun 25, 2009 3:56 pm

You are right but,
with a little difficulties, i saw that debugging is possible. while i am trying to catch the mouse icon, it is runnig away from me. it is mouse , i am cat :)
Philip can you tell me a way for seeting the abbot Robot.IDLE_TIMEOUT long variable? This protected long variable has no setter in the Robot's class API.
is there a configuration file? thanks a lot
izzetgezer
 
Posts: 4
Joined: Tue Jun 16, 2009 1:50 pm

Re: a problem while debugging windowtester-generated junit test

Postby Phil Quitslund » Fri Jun 26, 2009 8:35 am

Why do you want to set the timeout?

In any event, it looks like that is set with a system property, like so:

Code: Select all
protected static long IDLE_TIMEOUT = Integer.getInteger("abbot.robot.idle_timeout", 10000).intValue();
--
Phil Quitslund
Software Engineer
Google, Inc.
Phil Quitslund
Moderator
 
Posts: 491
Joined: Fri Apr 28, 2006 6:26 am

Re: a problem while debugging windowtester-generated junit test

Postby izzetgezer » Sun Jun 28, 2009 12:51 pm

protected static long IDLE_TIMEOUT = Integer.getInteger("abbot.robot.idle_timeout", 10000).intValue();

this means that while i am debugging, I have only 10 seconds to watch some variables. after 10 seconds debug stops automatically.I need longer time.
so ı have to change default 10000 value to anather.
one way may be change the above code in Robot.java and recompile this class. i tried it. vut i couldn' succeed.

thanks for your help. i will search this subject further.
izzetgezer
 
Posts: 4
Joined: Tue Jun 16, 2009 1:50 pm

Re: a problem while debugging windowtester-generated junit test

Postby Phil Quitslund » Mon Jun 29, 2009 9:47 am

Thanks for sharing your context. Let us know how it goes!

-phil
--
Phil Quitslund
Software Engineer
Google, Inc.
Phil Quitslund
Moderator
 
Posts: 491
Joined: Fri Apr 28, 2006 6:26 am

Re: a problem while debugging windowtester-generated junit test

Postby izzetgezer » Wed Jul 01, 2009 10:17 am

hi,

i solved the problem.
i suspend the thread while i am watching the variable. so no timeout exception.
it was quite easy :)

thanks
izzetgezer
 
Posts: 4
Joined: Tue Jun 16, 2009 1:50 pm

Re: a problem while debugging windowtester-generated junit test

Postby Phil Quitslund » Mon Jul 06, 2009 12:50 pm

Good deal. Thanks for letting us know!
--
Phil Quitslund
Software Engineer
Google, Inc.
Phil Quitslund
Moderator
 
Posts: 491
Joined: Fri Apr 28, 2006 6:26 am


Return to Window Tester

Who is online

Users browsing this forum: No registered users and 1 guest