At the end of each test method you need to remember not to leave any  
dialogs active, so that the next test can begin 'clean'.

I've added  this code to the tearDown() method in my tests which  
closes all dialogs open except for the first(which is the application  
shell).

public void tearDown () throws Exception() {
for (int i = bot.shells().length -1; i>0; i--){
     bot.shells()[i].close();
}
}

It seems to work well with our increasing number of RCP app tests -  
hope it's useful.


-- 
Dr Richard Adams
Senior Software Developer,
Computational Systems Biology Group,
University of Edinburgh
Tel: 0131 650 8281
email : [EMAIL PROTECTED]

-- 
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.



-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
SWTBot-users mailing list
SWTBot-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/swtbot-users
http://swtbot.org/ - a functional testing tool for SWT/Eclipse

Reply via email to