|Re: How to launch my SWTbot tests from console? [message #1066558 is a reply to message #1066453]
||Wed, 03 July 2013 03:32
|| Mickael Istria
Registered: July 2009
Location: Grenoble, France
I see several issues here, which show you did not really use the |
On 07/02/2013 09:27 PM, Lycris Ras wrote:
> -Dorg.eclipse.swtbot.generator.enable=true ^
You should not set this to execute automated tests
> org.eclipse.pde.junit.runtime.nonuithreadtestapplication ^
I generally use the
described in documentation), and I don't know much about the
configuration of the nonuithreadtestapplication
> I put the .jar of test (com.yahourt.tp.TEST.jar) in
> When I run this script, the RCP is launching but I cannot see any tests
> running. Moreover nothing in TOTO.TXT mentions my "com.yahourt.tup.TEST"
> package. My clue may be that I miss one option after "-testApplication"...
It seems to me that your jar is not correctly installed, so classes
can't be found. Directly copying bundles in plugins/ is something that
has been deprecated for years. Instead, you should use p2 director 
to install your jar in the Eclipse instance which is hosting your test
execution. Alternatively, you can use the dropins/ folder .
Most people reporting issues with SWTBot test execution actually have
issues to set up a right Eclipse configuration for their test and fail
to install their own bundles. To debug that, you can use the OSGi
console  and check whether bundles are available/installed/started.
JBoss, by Red Hat
My blog: http://mickaelistria.wordpress.com
My Tweets: http://twitter.com/mickaelistria
|Re: How to launch my SWTbot tests from console? [message #1092149 is a reply to message #1067118]
||Thu, 22 August 2013 07:44
| Lycris Ras
Registered: July 2013
Hi again, |
I need to move my build.xml file outside the original workspace (broken the dependence with it). This file executes a rcp application and tests it with Junit/SWTBOT. I deployed rcp and test plugins (jar files) in a special directory where I want to move the build.xml.
The problem is when I move this ant script, the rcp application does not want to be launched anymore. The other targets work perfectly.
This is what I get when I launch the build outside the wp :
[echo] Debut target doxygen
[doxygen:doxygen] Exec: doxygen -s -g D:\Temp\t0145268\4\doxygen7905175840261711
[doxygen:doxygen] Exec: doxygen D:\Temp\t0145268\4\doxygen7905175840261711258.cf
[echo] Debut target listen
[java] Listening on port 1104 for test suite taskBox.AllTests results ...
[echo] Debut target execute
Then it stays there.
Here is the target "execute" from build.xml below (almost the same file like above) :
<echo>Debut target execute</echo>
<java classname="org.eclipse.core.launcher.Main" fork="true" output="reports/com.obs.out.txt" error="reports/com.obs.err.txt">
<include name="org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar" />
<jvmarg value="-Dcom.yahourt.tup.context=N:/ldp_ATEST" />
<jvmarg value="-Dcom.yahourt.tup.productline=TestLDP" />
<jvmarg value="-DTEMP=D:/temp/T0145268" />
<jvmarg value="-Xms40M" />
<jvmarg value="-Xmx512M" />
<jvmarg value="-XX:MaxPermSize=256M" />
<arg line="-os win32" />
<arg line="-ws win32" />
<arg line="-arch x86" />
<arg line="-application org.eclipse.pde.junit.runtime.nonuithreadtestapplication" />
<arg line="-classNames launcher.AllTests" />
<arg line="-testpluginname com.yahourt.tup.TEST" />
<arg line="-version 3" />
<arg line="-testLoaderClass org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestLoader" />
<arg line="-loaderpluginname org.eclipse.jdt.junit.runtime" />
<arg line="-defaultLoadProject=N:/ATEST" />
<arg line="-testApplication com.yahourt.orc.desk.orchestra" />
<arg line="-perspective com.yahourt.cofa.perspectiveDesk" />
<arg line="-dev file:N:/testSpace/dev.properties" />
<arg line="-configuration N:/testSpace/" />
<arg line="-port 1104" />
<arg line="-pdelaunch" />
<arg line="-data N:/junit-workspace" />
<arg line="-debug" />
<arg line="-consolelog" />
More precisely my question is (maybe i'm wrong), is it possible to launch RCP with its tests without using -configuration -dev flags to unleash the dependence with the workspace ? Did I forget an important flag ?
I already tried to use the librairy.xml in org.eclipse.swtbot.eclipse.junit.headless which using the same process with ant.
For information, my eclipse launcher cannot be updated with other plugins (server in a restricted area and offline). All my plugin is in the form of library in the test plugin.
Thanks for your help
[Updated on: Thu, 22 August 2013 07:54]
Report message to a moderator
Powered by FUDForum
. Page generated in 0.02443 seconds