Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » SWTBot: issue while using headless
SWTBot: issue while using headless [message #1006795] Sat, 02 February 2013 00:20 Go to next message
Shabari shetty is currently offline Shabari shetty
Messages: 5
Registered: December 2012
Junior Member
hi all,

I am facing an issue while running a swtbot test as headless..

I have attached the java class(MyTest.java) which I am trying to run from the ant script.

Please find below the build.xml entry
<?xml version="1.0" encoding="UTF-8" ?>
<project name="testsuite" default="run" basedir=".">
<property name="eclipse-home" value="C:/swtbot/Boreas_GA/GA"/>
<property name="plugin-name" value="mytest" />
<property name="test-classname" value="test.MyTest"/>
<property name="library-file" value="${eclipse-home}/plugins/org.eclipse.swtbot.eclipse.junit4.headless_2.0.5.20111003_1754-3676ac8-dev-e36/library.xml"/>
<target name="suite">

<property name="jvmOption" value=""/>
<property name="temp-workspace" value="workspace4"/>
<delete dir="${temp-workspace}" quiet="true"/>
<ant target="swtbot-test" antfile="${library-file}" dir="${eclipse-home}" >
<property name="data-dir" value="${temp-workspace}"/>
<property name="plugin-name" value="${plugin-name}"/>
<property name="os" value="win32"/>
<property name="ws" value="win32"/>
<property name="arch" value="x86_64"/>
<property name="classname" value="${test-classname}"/>
<property name="vmargs" value="-Xms128M -XX:MaxPermSize=512M"/>
</ant>

</target>
<target name="cleanup" />
<target name="run" depends="suite,cleanup">
</target>
</project>

When I run the build script using ant command it does launch the workbench. But it doesnt execute MyTest class.

I see the below error in test.MyTest.xml file which is under results folder

<testcase classname="test.MyTest" name="initializationError" time="0.016">
<error message="No runnable methods" type="java.lang.Exception">java.lang.Exception: No runnable methods
at org.eclipse.swtbot.eclipse.junit4.headless.EclipseTestRunner.getTest(EclipseTestRunner.java:259)
at org.eclipse.swtbot.eclipse.junit4.headless.EclipseTestRunner.&lt;init&gt;(EclipseTestRunner.java:222)
at org.eclipse.swtbot.eclipse.junit4.headless.EclipseTestRunner.run(EclipseTestRunner.java:206)
at org.eclipse.swtbot.eclipse.junit4.headless.UITestApplication.runTests(UITestApplication.java:116)
at org.eclipse.ui.internal.testing.WorkbenchTestable$1.run(WorkbenchTestable.java:71)
at java.lang.Thread.run(Thread.java:722)
</error>

Could you please help. I am trying to use org.eclipse.swtbot.eclipse.junit4.headless_2.0.5.20111003_1754-3676ac8-dev-e36 on juno 3.8 build.

Thanks in advance.

Regards,
Shabari
  • Attachment: MyTest.java
    (Size: 1.33KB, Downloaded 76 times)

[Updated on: Sat, 02 February 2013 00:31]

Report message to a moderator

Re: SWTBot: issue while using headless [message #1007190 is a reply to message #1006795] Mon, 04 February 2013 21:29 Go to previous messageGo to next message
Shabari shetty is currently offline Shabari shetty
Messages: 5
Registered: December 2012
Junior Member
any pointers anyone Sad
Re: SWTBot: issue while using headless [message #1020894 is a reply to message #1007190] Tue, 19 March 2013 06:15 Go to previous message
pawan garia is currently offline pawan garia
Messages: 39
Registered: February 2013
Member
Shabari,
Can you please check for the Test class you have written and the Junit version you are using.
Because this is the Problem with the Test class or junit is not able to run the Test.

Thanks
Pawan Garia
Previous Topic:Unable to Enter Text in a Tree Cell
Next Topic:Where is 2.1.0??
Goto Forum:
  


Current Time: Fri Oct 24 11:20:08 GMT 2014

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

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