You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Tim Brazil <br...@sendmail.com> on 2004/12/03 01:25:58 UTC

running a separate set of tests other than the unitTests

Hi

I am new to the list and also new to Maven. I have unitTests setup and 
running well however I also want to have a separate goal that will run 
my functional tests (in conjunction with jcoverage). I currently have a 
cludge in my maven.xml which defines a test:functional goal. This starts 
my application and runs test:match against my FuncTest.

  <goal name="test:functional" description="start server, run functional 
tests, stop server">
    <j:thread>
      <attainGoal name="start"/>
    </j:thread>
    <sleep seconds="${mmi.progname.functest.startDelay}"/>
    <j:set var="testmatch" value="*FuncTest"/>
    <attainGoal name="test:match"/>
    <attainGoal name="stop"/>
  </goal>

I want to be able to have a separate goal that will execute my tests 
using jcoverage. It is not clear to me how to do this since running the 
jcoverage goal runs off the unitTest entries in the product.xml. I'm 
quite understanding everything in the jcoverage plugin.jelly. I read 
about some discussions on this list (dated 2003) related to 
integrationUnitTest. Has anyone had to solve a similar problem? How did 
you accomplish this?

Thanks
Tim




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: running a separate set of tests other than the unitTests

Posted by Brett Porter <br...@gmail.com>.
jcoverage is pretty tricky to use. You really have to fork your tests
because it does all its stuff with a system shutdown hook. It could
definitely be improved, but the project there seems dead.

I'd recommend setting up a separate project that contains the
functional tests and includes the code as a dependency, then test:test
should do what you need on that project so jcoverage should work

clover works a bit better in this regard, so you might like to
investigate it (though you have to buy it after trying it).

HTH,
Brett

On Thu, 02 Dec 2004 16:25:58 -0800, Tim Brazil <br...@sendmail.com> wrote:
> Hi
> 
> I am new to the list and also new to Maven. I have unitTests setup and
> running well however I also want to have a separate goal that will run
> my functional tests (in conjunction with jcoverage). I currently have a
> cludge in my maven.xml which defines a test:functional goal. This starts
> my application and runs test:match against my FuncTest.
> 
>   <goal name="test:functional" description="start server, run functional
> tests, stop server">
>     <j:thread>
>       <attainGoal name="start"/>
>     </j:thread>
>     <sleep seconds="${mmi.progname.functest.startDelay}"/>
>     <j:set var="testmatch" value="*FuncTest"/>
>     <attainGoal name="test:match"/>
>     <attainGoal name="stop"/>
>   </goal>
> 
> I want to be able to have a separate goal that will execute my tests
> using jcoverage. It is not clear to me how to do this since running the
> jcoverage goal runs off the unitTest entries in the product.xml. I'm
> quite understanding everything in the jcoverage plugin.jelly. I read
> about some discussions on this list (dated 2003) related to
> integrationUnitTest. Has anyone had to solve a similar problem? How did
> you accomplish this?
> 
> Thanks
> Tim
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org