Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » Library.xml not exist in swtbot 2.1(Library.xml not exist in swtbot 2.1)
Library.xml not exist in swtbot 2.1 [message #1058212] Mon, 13 May 2013 08:56 Go to next message
gourav mehta is currently offline gourav mehtaFriend
Messages: 9
Registered: June 2012
Junior Member
Library.xml not exist in swtbot 2.1.

I installed swtbot 2.1 from latest update site in Juno 4.2 but there is no extracted folder of "org.eclipse.swtbot.eclipse.junit.headless_2.1.0.201302221524" to read library.xml for running headless. Do anyone has any idea how to run test cases headless in juno with latest version of swtbot.
Re: Library.xml not exist in swtbot 2.1 [message #1058229 is a reply to message #1058212] Mon, 13 May 2013 09:32 Go to previous messageGo to next message
Mickael Istria is currently offline Mickael IstriaFriend
Messages: 865
Registered: July 2009
Location: Grenoble, France
Senior Member

Library.xml is not necessary to use SWTBot headless with Ant.
You can get more details here:
http://wiki.eclipse.org/SWTBot/Automate_test_execution#Installing_headless_Testing_Framework

The library.xml is still in org.eclipse.swtbot.eclipse.junit.headless ,
but you'll need to unjar the bundles if you want to use it.
--
Mickael Istria
JBoss, by Red Hat
My blog: http://mickaelistria.wordpress.com
My Tweets: http://twitter.com/mickaelistria
Re: Library.xml not exist in swtbot 2.1 [message #1058234 is a reply to message #1058212] Mon, 13 May 2013 09:57 Go to previous messageGo to next message
gourav mehta is currently offline gourav mehtaFriend
Messages: 9
Registered: June 2012
Junior Member
Thanks Mickael for your prompt reply. I extracted the bundle and run the test cases through ant script but i am getting below error

java.lang.RuntimeException: Application "org.eclipse.swtbot.eclipse.junit4.headless.swtbottestapplication" could not be found in the registry. The applications available are: org.eclipse.ant.core.antRunner, org.eclipse.ant.ui.antRunner, org.eclipse.datatools.connectivity.console.profile.StorageFileEditor, org.eclipse.e4.ui.workbench.swt.E4Application, org.eclipse.e4.ui.workbench.swt.GenTopic, org.eclipse.emf.codegen.CodeGen, org.eclipse.emf.codegen.JMerger, org.eclipse.emf.codegen.ecore.Generator, org.eclipse.emf.importer.ecore.Ecore2GenModel, org.eclipse.emf.importer.java.Java2GenModel, org.eclipse.emf.importer.rose.Rose2GenModel, org.eclipse.equinox.app.error, org.eclipse.equinox.p2.director, org.eclipse.equinox.p2.garbagecollector.application, org.eclipse.equinox.p2.publisher.InstallPublisher, org.eclipse.equinox.p2.publisher.EclipseGenerator, org.eclipse.equinox.p2.publisher.ProductPublisher, org.eclipse.equinox.p2.publisher.FeaturesAndBundlesPublisher, org.eclipse.equinox.p2.reconciler.application, org.eclipse.equinox.p2.repository.repo2runnable, org.eclipse.equinox.p2.repository.metadataverifier, org.eclipse.equinox.p2.artifact.repository.mirrorApplication, org.eclipse.equinox.p2.metadata.repository.mirrorApplication, org.eclipse.equinox.p2.updatesite.UpdateSitePublisher, org.eclipse.equinox.p2.publisher.UpdateSitePublisher, org.eclipse.equinox.p2.publisher.CategoryPublisher, org.eclipse.help.base.infocenterApplication, org.eclipse.help.base.helpApplication, org.eclipse.help.base.indexTool, org.eclipse.jdt.apt.core.aptBuild, org.eclipse.jdt.core.JavaCodeFormatter, org.eclipse.jdt.core.JavaIndexer, org.eclipse.pde.build.Build, org.eclipse.pde.junit.runtime.uitestapplication, org.eclipse.pde.junit.runtime.legacytestapplication, org.eclipse.pde.junit.runtime.coretestapplication, org.eclipse.pde.junit.runtime.coretestapplicationnonmain, org.eclipse.pde.junit.runtime.nonuithreadtestapplication, org.eclipse.ui.ide.workbench, org.eclipse.wst.jsdt.core.JavaCodeFormatter, org.eclipse.wst.server.preview.preview, org.eclipse.swtbot.eclipse.core.swtbottestapplication, org.eclipse.swtbot.eclipse.junit.headless.swtbottestapplication.
at org.eclipse.equinox.internal.app.EclipseAppContainer.startDefaultApp(EclipseAppContainer.java:248)
at org.eclipse.equinox.internal.app.MainApplicationLauncher.run(MainApplicationLauncher.java:29)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
at org.eclipse.equinox.launcher.Main.main(Main.java:1414)
at org.eclipse.core.launcher.Main.main(Main.java:34)
Re: Library.xml not exist in swtbot 2.1 [message #1058245 is a reply to message #1058212] Mon, 13 May 2013 10:38 Go to previous messageGo to next message
gourav mehta is currently offline gourav mehtaFriend
Messages: 9
Registered: June 2012
Junior Member
I have changed in library.xml file from
org.eclipse.swtbot.eclipse.junit4.headless.swtbottestapplication
to
org.eclipse.swtbot.eclipse.junit.headless.swtbottestapplication

Now i m getting some other message in logs:
Caused an ERROR
java.lang.Exception: Could not find plugin "com.testing.test"
org.eclipse.swtbot.eclipse.junit.headless.EclipseTestRunner$TestFailedException: java.lang.Exception: Could not find plugin "com.testing.test"
at org.eclipse.swtbot.eclipse.junit.headless.EclipseTestRunner.runFailed(EclipseTestRunner.java:289)
at org.eclipse.swtbot.eclipse.junit.headless.EclipseTestRunner.getTest(EclipseTestRunner.java:242)
at org.eclipse.swtbot.eclipse.junit.headless.EclipseTestRunner.<init>(EclipseTestRunner.java:222)
at org.eclipse.swtbot.eclipse.junit.headless.EclipseTestRunner.run(EclipseTestRunner.java:206)
at org.eclipse.swtbot.eclipse.junit.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:662)
Caused by: java.lang.Exception: Could not find plugin "com.testing.test"
at org.eclipse.swtbot.eclipse.junit.headless.EclipseTestRunner.loadSuiteClass(EclipseTestRunner.java:303)
at org.eclipse.swtbot.eclipse.junit.headless.EclipseTestRunner.getTest(EclipseTestRunner.java:239)

But com.testing.test.jar is already in plugins folder.

Any clue ?

[Updated on: Mon, 13 May 2013 10:39]

Report message to a moderator

Re: Library.xml not exist in swtbot 2.1 [message #1058395 is a reply to message #1058245] Mon, 13 May 2013 21:39 Go to previous messageGo to next message
Mickael Istria is currently offline Mickael IstriaFriend
Messages: 865
Registered: July 2009
Location: Grenoble, France
Senior Member

On 05/13/2013 12:38 PM, gourav mehta wrote:
> I have changed in library.xml file from
> org.eclipse.swtbot.eclipse.junit4.headless.swtbottestapplication
> to org.eclipse.swtbot.eclipse.junit.headless.swtbottestapplication

That was the right move. You should consider contributing that change to
SWTBot: http://wiki.eclipse.org/SWTBot/Contributing

>
> Now i m getting some other message in logs:
> Caused an ERROR
> java.lang.Exception: Could not find plugin "com.testing.test"
> org.eclipse.swtbot.eclipse.junit.headless.EclipseTestRunner$TestFailedException:

Is com.testing.test your test bundle? If yes, did you make sure it's
available in the instance of Eclipse you're using to test? Ideally, you
should have it installed in your test app using p2 director so you get
sure it's installed with all its dependencies.

--
Mickael Istria
JBoss, by Red Hat
My blog: http://mickaelistria.wordpress.com
My Tweets: http://twitter.com/mickaelistria
Re: Library.xml not exist in swtbot 2.1 [message #1058430 is a reply to message #1058395] Tue, 14 May 2013 05:34 Go to previous messageGo to next message
gourav mehta is currently offline gourav mehtaFriend
Messages: 9
Registered: June 2012
Junior Member
yes "com.testing.test" is my swtbot test plugin. I exported the same and copy "com.testing.test_1.0.jar" to eclipse/plugins folder but no luck. Still getting the same exception:

java.lang.Exception: Could not find plugin "com.testing.test"
Re: Library.xml not exist in swtbot 2.1 [message #1059265 is a reply to message #1058430] Wed, 15 May 2013 15:06 Go to previous message
Mickael Istria is currently offline Mickael IstriaFriend
Messages: 865
Registered: July 2009
Location: Grenoble, France
Senior Member

On 05/14/2013 07:34 AM, gourav mehta wrote:
> yes "com.testing.test" is my swtbot test plugin. I exported the same and
> copy "com.testing.test_1.0.jar" to eclipse/plugins folder but no luck.
> Still getting the same exception:
>
> java.lang.Exception: Could not find plugin "com.testing.test"

Copying is not the right way to install stuff in an Eclipse. You should
either use p2 director to install, or try to put it in the dropins folder.
--
Mickael Istria
JBoss, by Red Hat
My blog: http://mickaelistria.wordpress.com
My Tweets: http://twitter.com/mickaelistria
Previous Topic:SWTBot headless testing
Next Topic:SWTBot 2.0.5 is unable to find toolbar button on Eclipse juno 4.2
Goto Forum:
  


Current Time: Tue Mar 19 08:15:55 GMT 2024

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

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

Back to the top