Testcase fail when run grouped, but not in a single way

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

Testcase fail when run grouped, but not in a single way

Postby JLomin » Mon May 07, 2007 5:55 am

Have somebody experienced problems when running grouped tests that doesn't fail when are executed individually?

thanks
JLomin
 
Posts: 11
Joined: Mon Feb 05, 2007 11:40 pm

Postby gnebling » Mon May 07, 2007 7:22 am

Did you mean like a Testsuite? What errors do you get?

Do your tests have these lines of code?

ui.click(new MenuItemLocator("&File/E&xit"));
ui.wait(new ShellDisposedCondition("Eclipse SDK"));

If so, comment them out. If you leave these lines in, the first test kills the workbench and then you get and exception, "root must not be null" exception when trying to run the subsequent test(s).
gnebling
Moderator
 
Posts: 243
Joined: Tue Aug 22, 2006 7:49 am

Postby JLomin » Tue May 08, 2007 2:33 am

gnebling wrote:Did you mean like a Testsuite?

- Correct.

gnebling wrote:What errors do you get?

- Several types: WaitTimedOut, WidgetNotFound etc. Its difficult for me at this moment to answer to this question with more precission.

gnebling wrote:Do your tests have these lines of code?

ui.click(new MenuItemLocator("&File/E&xit"));
ui.wait(new ShellDisposedCondition("Eclipse SDK"));

If so, comment them out. If you leave these lines in, the first test kills the workbench and then you get and exception, "root must not be null" exception when trying to run the subsequent test(s).

- No, they doesn't. I know this issue.

Thank you anyway. I expected that someone else have also experienced this problem ...
JLomin
 
Posts: 11
Joined: Mon Feb 05, 2007 11:40 pm

Postby Mac » Tue May 08, 2007 5:30 am

Hi,

I sometimes experienced those failure due to unequal start conditions.
For example the last action of a test was to click a certain TreeItem.
Now the second test failed, because this Treeitem was still selected, which was not the case, when the second test has been started stand-alone.

So maybe you have to make sure that every test in your suite starts with the same conditions
Mac
 
Posts: 14
Joined: Thu Apr 05, 2007 4:19 am

Postby JLomin » Tue May 08, 2007 5:44 am

Mac wrote:Hi,

I sometimes experienced those failure due to unequal start conditions.
For example the last action of a test was to click a certain TreeItem.
Now the second test failed, because this Treeitem was still selected, which was not the case, when the second test has been started stand-alone.

So maybe you have to make sure that every test in your suite starts with the same conditions


This is a good point ... but I've yet make an effort in that direction.
So, I customized and save a convenience perspective, and each testcase opens it before doing anything else.

Code: Select all
ui.click(new MenuItemLocator("&Window/&Open Perspective/&Other..."));
ui.wait(new ShellShowingCondition("Open Perspective"));
ui.click(new TableItemLocator("OUR_PERSPECTIVE"));
ui.click(new ButtonLocator("OK"));
ui.wait(new ShellDisposedCondition("Open Perspective"));
JLomin
 
Posts: 11
Joined: Mon Feb 05, 2007 11:40 pm

Postby Mac » Fri May 11, 2007 6:33 am

did it work?
Mac
 
Posts: 14
Joined: Thu Apr 05, 2007 4:19 am


Return to Window Tester

Who is online

Users browsing this forum: No registered users and 1 guest