Using "Headless Testing Framework" feature in a product [message #485670] |
Mon, 14 September 2009 12:31 |
Eclipse User |
|
|
|
Originally posted by: cedric.chabanois.entropysoft.net
Hi !
I have two products, one for production and one for tests.
The test product is the same than production one except that it adds the
following features :
<feature id="net.entropysoft.cetl.test.feature"/>
<feature id="net.entropysoft.cetl.testcomponents.feature"/>
<feature id="org.eclipse.swtbot"/>
<feature id="org.eclipse.swtbot.eclipse"/>
<feature id="org.eclipse.swtbot.eclipse.test"/>
I also added
"
-application
org.eclipse.swtbot.eclipse.junit4.headless.swtbottestapplica tion
formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJU nitResultFormatter,junit-results.xml
-testPluginName
net.entropysoft.cetl.plugin.test
-className
net.entropysoft.AllTestsSuite
"
to the program arguments
What i want for the test product is to run all the tests when launched and
generate a junit-results.xml (without further configuration or parameters)
It works except that it depends on org.eclipse.swtbot.eclipse.test feature
and so I need to delete org.eclipse.swtbot.eclipse.junit3.headless and
org.eclipse.swtbot.ant.optional.junit3 plugins from the test product.
(I can't delete them from my target platform (aka baseLocation) otherwise my
test product would not build)
I think it would be better to have two features :
- one with org.eclipse.swtbot.ant.optional.junit4_2.0.0.*-e35.jar and
org.eclipse.swtbot.eclipse.junit4.headless_2.0.0.*-e35
- one with org.eclipse.swtbot.ant.optional.junit3_2.0.0.*-e35.jar and
org.eclipse.swtbot.eclipse.junit3.headless_2.0.0.*-e35
Thanks,
C
|
|
|
Re: Using "Headless Testing Framework" feature in a product [message #485694 is a reply to message #485670] |
Mon, 14 September 2009 14:06 |
Eclipse User |
|
|
|
Originally posted by: cedric.chabanois.entropysoft.net
When building the test product (headless build), I have the following error
:
"
[java] [echo] !MESSAGE Invalid action syntax:
addProgramArg(programArg:formatter=org.apache.tools.ant.task defs.optional.junit.XMLJUnitResultFormatter,junit-results.xm l).
[java] [echo] !STACK 0
[java] [echo] java.lang.IllegalArgumentException: Invalid action syntax:
addProgramArg(programArg:formatter=org.apache.tools.ant.task defs.optional.junit.XMLJUnitResultFormatter,junit-results.xm l).
[java] [echo] at
org.eclipse.equinox.internal.p2.engine.InstructionParser.par seAction(InstructionParser.java:97)
"
It seems that equinox p2 engine transforms the arguments in a series of
action strings :
"addProgramArg(programArg:<the program args>)"
where
* addProgramArg is the action name
* programArg is the first parameter key
* <the program args> is the first parameter value
However as I use a coma in
" org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultF ormatter,junit-results.xml "
:
"junit-results.xml" is considered as the second parameter but equinox p2
engine cannot find ':' so it throws an IllegalArgumentException
C
|
|
|
|
Powered by
FUDForum. Page generated in 0.03427 seconds