Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » Different test results when running headless SWTBot(Failed test are shown as errors)
Different test results when running headless SWTBot [message #665610] Fri, 15 April 2011 09:22
nester  is currently offline nester Friend
Messages: 1
Registered: March 2011
Junior Member
I have a problem with the reported tests results when running them headless. The test that should be reported as failed are reported as errors when running them headless. The same tests are correctly reported when run directly form Eclipse.

For example this assertion is shown as an error:
assertTrue(" Test should be failed ", false);

This is reported:
test2 Error Test should be failed :

java.lang.AssertionError: Test should be failed:
at com.btc.swtbottests.TestWizard.test2(TestWizard.java:72)
at org.eclipse.swtbot.swt.finder.junit.SWTBotJunit4ClassRunner. run(SWTBotJunit4ClassRunner.java:54)
at org.eclipse.swtbot.eclipse.junit4.headless.EclipseTestRunner .run(EclipseTestRunner.java:350)
at org.eclipse.swtbot.eclipse.junit4.headless.EclipseTestRunner .run(EclipseTestRunner.java:208)
at org.eclipse.swtbot.eclipse.junit4.headless.UITestApplication .runTests(UITestApplication.java:116)
at org.eclipse.ui.internal.testing.WorkbenchTestable$1.run(Work benchTestable.java:71)
at java.lang.Thread.run(Unknown Source)


So practicably assertions cause tests to be Error not Failed when running them headless, when running from Eclipse the same test are correctly reported .
I can't figure out why.

[Updated on: Fri, 15 April 2011 09:28]

Report message to a moderator

Previous Topic:error/warning marker "decorations"?
Next Topic:SwtBotTree's getNode/getAllItems problem
Goto Forum:
  


Current Time: Thu Dec 18 13:33:28 GMT 2014

Powered by FUDForum. Page generated in 0.01685 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software