The example tests "org.rcpmail.test" of SWT Bot fail if I run them in Eclipse
(see below) because of NullPointerException and WidgetNotFoundException. Only
one test method in the AllTests suite runs green ("testThisPasses").
It seems that the tests don't start the GUI of org.rcpmail because I see no GUI
when running the above tests. So I think it has to do something with it. The
other tests start the GUI first and automatically.
What is wrong? It's not just because of the example, we have an RCP application
to test and I wanted to learn how to do it by looking at the RCP example. But
it fails.
java.lang.NullPointerException
at net.sf.swtbot.eclipse.finder.SWTEclipseBot.views(SWTEclipseBot.java:86)
at org.rcpmail.MessageCreateTest.viewCount(MessageCreateTest.java:59)
at
org.rcpmail.MessageCreateTest.testCreatesAnotherMessageWindow(MessageCreateTest.java:19)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at junit.framework.TestCase.runTest(TestCase.java:164)
at junit.framework.TestCase.runBare(TestCase.java:130)
at net.sf.swtbot.SWTBotTestCase.runBare(SWTBotTestCase.java:203)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:120)
at junit.framework.TestSuite.runTest(TestSuite.java:230)
at junit.framework.TestSuite.run(TestSuite.java:225)
at junit.framework.TestSuite.runTest(TestSuite.java:230)
at junit.framework.TestSuite.run(TestSuite.java:225)
at
org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
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