Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [swtbot-dev] problems running swtbot test suite in some configurations

On 24/10/2013 11:00, Mickael Istria wrote:
> On 10/23/2013 07:29 PM, Lorenzo Bettini wrote:
>> I'm also trying to "debug" what's going wrong by inserting println
>>
>> 	@Test
>> 	public void getsAllShells() throws Exception {
>> 		for (SWTBotShell s : bot.shells())
>> 			System.out.println("shell: " + s.getText());
>> 		assertEquals(2, bot.shells().length);
>> 	}
> You can debug by setting a "-DdebugPort=8000" property and then use
> Eclipse to bind debugger on port 8000.
> 

OK, thanks to the debugger I think I tracked down where the problem is:
the "Resource" additional shell (see my previous email) is the Eclipse
workbench itself:

http://imageshack.us/a/img401/9094/v0nk.png

and by the way, trying to closing it in the setup method brings the
additional problem of another dialog which comes up:

http://imageshack.us/a/img849/2182/h608.png

Now, if I understand correctly from the readme file of that project:
http://git.eclipse.org/c/swtbot/org.eclipse.swtbot.git/tree/org.eclipse.swtbot.swt.finder.test/README.txt
the tests in that project must be run as plain Junit tests and NOT
Plug-in Junit tests... by the way, I can reproduce the problem of that
failing test in Eclipse if I run
/org.eclipse.swtbot.swt.finder.test/src/org/eclipse/swtbot/swt/finder/SWTBotTest.java
as a "Plug-in Junit Test", instead of "Junit Test".  Having said that,
shouldn't the pom.xml in that plugin run the tests without surefire and
use standard maven tests?  Please let me stress that I'm not a
maven/tycho expert at all (not to mention that I don't like it either ;)

hope to hear from you soon
cheers
	Lorenzo

-- 
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
HOME: http://www.lorenzobettini.it
Xtext Book:
http://www.packtpub.com/implementing-domain-specific-languages-with-xtext-and-xtend/book



Back to the top