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 14:27, Mickael Istria wrote:
> I think that the issue can be caused by the order in which one tests are
> run (which is not guaranteed by JUnit and can depend on the JVM
> implementation). If SWTBotShellTest runs first, the Workbench is still
> open and confuses the test. I can reproduce the same issue as yours
> simply by running the SWTBotShellTest

Mh... why is the workbench open with SWTBotShellTest?  That test should
be still run as a plain Junit test, and it does not seem to open the
Workbench itself, or did I miss something?

> 
> On 10/24/2013 01:01 PM, Lorenzo Bettini wrote:
>> I think that an alternative way of writing that specific test is as follows:
>>
>> 	@Test
>> 	public void getsAllShells() throws Exception {
>> 		//assertEquals(2, bot.shells().length);
>> 		bot.shell("Address Book - Untitled");
>> 		bot.shell("Find");
>> 	}
>>
>> Does it sound reasonable?
> I think the purpose of this test is to test the bot.shells() method, so
> your suggestion reduces relevance of this test. It would probably be
> better to have all shells closed in a setUp or setUpBeforeClass method
> to make sure the test is well isolated.

I agree :)

but I didn't succeed in closing the Workbench (because of the
confirmation dialog)...  do you want me to open a bug and a first gerrit
push so that we can work on that?

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