Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » Using "Headless Testing Framework" feature in a product
Using "Headless Testing Framework" feature in a product [message #485670] Mon, 14 September 2009 12:31 Go to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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
Re: Using "Headless Testing Framework" feature in a product [message #485789 is a reply to message #485670] Tue, 15 September 2009 02:12 Go to previous message
Ketan Padegaonkar is currently offline Ketan PadegaonkarFriend
Messages: 873
Registered: July 2009
Senior Member
The eclipse test feature was not intended to be used this way.

The intended use was to extract this on top of the eclipse directory in
the pre 3.4 era.

It does make sense to split this into 2 features for junit 3.x and 4.x
so as to avoid the hassle and reduce setup time for new comers.

Await for this with the next build of swtbot.

--
Ketan
http://studios.thoughtworks.com/twist | http://twitter.com/ketanpkr

On 14/09/09 6:01 PM, Cédric Chabanois wrote:
> 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édric
>
>
Previous Topic:typeText not accepting typeText ("\"\");
Next Topic:MouseEvents with SWTBot
Goto Forum:
  


Current Time: Fri Apr 19 22:47:38 GMT 2024

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

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

Back to the top