|
|
|
Re: How to launch my SWTbot tests from console? [message #1066558 is a reply to message #1066453] |
Wed, 03 July 2013 07:32 |
|
I see several issues here, which show you did not really use the
documentation ;)
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
> -application
> org.eclipse.pde.junit.runtime.nonuithreadtestapplication ^
I generally use the
org.eclipse.swtbot.eclipse.junit4.headless.swtbottestapplication (as
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
> C:\Tools\Orc\Desk\plugins.
> 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 [1]
to install your jar in the Eclipse instance which is hosting your test
execution. Alternatively, you can use the dropins/ folder [2].
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 [3] and check whether bundles are available/installed/started.
HTH
[1]
http://help.eclipse.org/juno/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Fguide%2Fp2_director.html&resultof=%22p2%22%20%22director%22
[2]
http://help.eclipse.org/juno/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Freference%2Fmisc%2Fp2_dropins_format.html
[3] http://www.ibm.com/developerworks/library/os-ecl-osgiconsole/
--
Mickael Istria
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 11:44 |
Lycris Ras Messages: 16 Registered: July 2013 |
Junior Member |
|
|
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 :
test:
[echo] test
doxygen:
[echo] Debut target doxygen
[doxygen:doxygen] Exec: doxygen -s -g D:\Temp\t0145268\4\doxygen7905175840261711
258.cfg
[doxygen:doxygen] Exec: doxygen D:\Temp\t0145268\4\doxygen7905175840261711258.cf
g
listen:
[echo] Debut target listen
[java] Listening on port 1104 for test suite taskBox.AllTests results ...
execute:
[echo] Debut target execute
Then it stays there.
Here is the target "execute" from build.xml below (almost the same file like above) :
<target name="execute">
<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">
<classpath>
<fileset dir="${orchestra.plugins}">
<include name="org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar" />
</fileset>
</classpath>
<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" />
</java>
</target>
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
Lycris
[Updated on: Thu, 22 August 2013 11:54] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.06183 seconds