You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@gump.apache.org by Eric Pugh <ep...@opensourceconnections.com> on 2004/11/02 13:14:27 UTC

Seeing results of Maven unit tests?

Hi all,

I notice that gump links in a lot of files that it generates, like the
project.properties etc.  However, the output from running unit tests is not
available.  Is there anyway to find this?

A couple of the Fulcrum projects are failing on their tests...

http://brutus.apache.org/gump/public/jakarta-turbine-fulcrum/fulcrum-cache/i
ndex.html

I wondered if I could see them by pulling up a directory like:

http://brutus.apache.org/gump/public/jakarta-turbine-fulcrum/fulcrum-cache/g
ump_file/target/test-reports

but no joy...

Eric


---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@gump.apache.org
For additional commands, e-mail: general-help@gump.apache.org


Re: Seeing results of Maven unit tests?

Posted by sebb <se...@gmail.com>.
On Wed, 3 Nov 2004 01:19:45 +0800, Niclas Hedhman <ni...@hedhman.org> wrote:
> On Wednesday 03 November 2004 01:08, Eric Pugh wrote:
> > I've seen this error periodically, and to be honest, I don't like this
> > test..  I don't really want to run it except on demand..   Is there any
> > environment variable that tells me I am running in Gump that I can get?
> > Anything like:
> >
> > if (System.getProperty("gump")==true)
> >  ignore test...

Not sure if this works with Maven builds, but you can set a property
in the project gump description file and test it using standard Ant.
For example, jakarta-jmeter.xml has the entry:

<ant target=...>
<property name="gump.run" value="true" /> 

and the project build.xml then can use it to control the build
(however at present it's not actually used in the jmeter builds).

BTW, the Ant <concat> element can be used to display the contents of
log and other files produced by a test run, so if you know where the
test output goes you can copy it to the Gump output. [This technique
is used in the JMeter build files.]

> 
> Would setting the "goal" attribute in the <maven> element to something like
> "jar" work??
> I think that you can also tell Maven not to report testcase failures as errors
> with a property. Then the question is if that property can be fed through the
> Maven element, and I think so.
> 
> Cheers
> Niclas
> --
> 
> 
>    +------//-------------------+
>   / http://www.bali.ac        /
>  / http://niclas.hedhman.org /
> +------//-------------------+
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: general-unsubscribe@gump.apache.org
> For additional commands, e-mail: general-help@gump.apache.org
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@gump.apache.org
For additional commands, e-mail: general-help@gump.apache.org


RE: Seeing results of Maven unit tests?

Posted by Eric Pugh <ep...@opensourceconnections.com>.
I just finished adding the propery to the Gump descriptor file if you get a
chance to check it out.  I have the output of the unit tests coming in the
log, so we can look for the property to verify it being picked up.

Eric

> -----Original Message-----
> From: Eric Pugh [mailto:epugh@opensourceconnections.com]
> Sent: Wednesday, November 03, 2004 11:45 AM
> To: Gump code and data
> Subject: RE: Seeing results of Maven unit tests?
>
>
> Great..   and I can pull that up in Java using System.getProperty!  cool..
>
> > -----Original Message-----
> > From: Niclas Hedhman [mailto:niclas@hedhman.org]
> > Sent: Wednesday, November 03, 2004 10:43 AM
> > To: Gump code and data
> > Subject: Re: Seeing results of Maven unit tests?
> >
> >
> > On Wednesday 03 November 2004 17:13, Eric Pugh wrote:
> > > Unfortunantly they are all work
> > > arounds to the fact that I can't see the unit test results.
> > But also, it
> > > is because in fulcrum cache we have two unit tests.  One is a
> > quick "is it
> > > working" and another is a
> > > longer running "test the cache for 2 minutes" test.
> >
> > Ok. If you want a property to be set, just set it;
> > <maven>
> >   <property name="gump.isRunning" value="true" />
> > </maven>
> >
> > should work.
> >
> > Cheers
> > Niclas
> > --
> >    +------//-------------------+
> >   / http://www.bali.ac        /
> >  / http://niclas.hedhman.org /
> > +------//-------------------+
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: general-unsubscribe@gump.apache.org
> > For additional commands, e-mail: general-help@gump.apache.org
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: general-unsubscribe@gump.apache.org
> For additional commands, e-mail: general-help@gump.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@gump.apache.org
For additional commands, e-mail: general-help@gump.apache.org


RE: Seeing results of Maven unit tests?

Posted by Eric Pugh <ep...@opensourceconnections.com>.
Great..   and I can pull that up in Java using System.getProperty!  cool..

> -----Original Message-----
> From: Niclas Hedhman [mailto:niclas@hedhman.org]
> Sent: Wednesday, November 03, 2004 10:43 AM
> To: Gump code and data
> Subject: Re: Seeing results of Maven unit tests?
> 
> 
> On Wednesday 03 November 2004 17:13, Eric Pugh wrote:
> > Unfortunantly they are all work
> > arounds to the fact that I can't see the unit test results.   
> But also, it
> > is because in fulcrum cache we have two unit tests.  One is a 
> quick "is it
> > working" and another is a
> > longer running "test the cache for 2 minutes" test.  
> 
> Ok. If you want a property to be set, just set it;
> <maven>
>   <property name="gump.isRunning" value="true" />
> </maven>
> 
> should work.
> 
> Cheers
> Niclas
> -- 
>    +------//-------------------+
>   / http://www.bali.ac        /
>  / http://niclas.hedhman.org / 
> +------//-------------------+
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: general-unsubscribe@gump.apache.org
> For additional commands, e-mail: general-help@gump.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@gump.apache.org
For additional commands, e-mail: general-help@gump.apache.org


Re: Seeing results of Maven unit tests?

Posted by Niclas Hedhman <ni...@hedhman.org>.
On Wednesday 03 November 2004 17:13, Eric Pugh wrote:
> Unfortunantly they are all work
> arounds to the fact that I can't see the unit test results.   But also, it
> is because in fulcrum cache we have two unit tests.  One is a quick "is it
> working" and another is a
> longer running "test the cache for 2 minutes" test.  

Ok. If you want a property to be set, just set it;
<maven>
  <property name="gump.isRunning" value="true" />
</maven>

should work.

Cheers
Niclas
-- 
   +------//-------------------+
  / http://www.bali.ac        /
 / http://niclas.hedhman.org / 
+------//-------------------+


---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@gump.apache.org
For additional commands, e-mail: general-help@gump.apache.org


RE: Seeing results of Maven unit tests?

Posted by Eric Pugh <ep...@opensourceconnections.com>.
These are all very good suggestions..  Unfortunantly they are all work
arounds to the fact that I can't see the unit test results.   But also, it
is because in fulcrum cache we have two unit tests.  One is a quick "is it
working" and another is a
longer running "test the cache for 2 minutes" test.  I can imagine that
there are lots of situations where you wouldn't wan to run certain tests
under gump...   Things that might put undue strain on the hardware for
example.

Being able to pick up some sort of system property would be perfect. I still
want Gump to fail my cache code if the quick easy test fails..   But not to
even run the more comprehensive test...

I'll definitly play with the unit test failure ignores setting...

Eric

> -----Original Message-----
> From: Niclas Hedhman [mailto:niclas@hedhman.org]
> Sent: Tuesday, November 02, 2004 6:20 PM
> To: Gump code and data
> Subject: Re: Seeing results of Maven unit tests?
>
>
> On Wednesday 03 November 2004 01:08, Eric Pugh wrote:
> > I've seen this error periodically, and to be honest, I don't like this
> > test..  I don't really want to run it except on demand..   Is there any
> > environment variable that tells me I am running in Gump that I can get?
> > Anything like:
> >
> > if (System.getProperty("gump")==true)
> >  ignore test...
>
> Would setting the "goal" attribute in the <maven> element to
> something like
> "jar" work??
> I think that you can also tell Maven not to report testcase
> failures as errors
> with a property. Then the question is if that property can be fed
> through the
> Maven element, and I think so.
>
> Cheers
> Niclas
> --
>    +------//-------------------+
>   / http://www.bali.ac        /
>  / http://niclas.hedhman.org /
> +------//-------------------+
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: general-unsubscribe@gump.apache.org
> For additional commands, e-mail: general-help@gump.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@gump.apache.org
For additional commands, e-mail: general-help@gump.apache.org


Re: Seeing results of Maven unit tests?

Posted by Niclas Hedhman <ni...@hedhman.org>.
On Wednesday 03 November 2004 01:08, Eric Pugh wrote:
> I've seen this error periodically, and to be honest, I don't like this
> test..  I don't really want to run it except on demand..   Is there any
> environment variable that tells me I am running in Gump that I can get?
> Anything like:
>
> if (System.getProperty("gump")==true)
>  ignore test...

Would setting the "goal" attribute in the <maven> element to something like 
"jar" work??
I think that you can also tell Maven not to report testcase failures as errors 
with a property. Then the question is if that property can be fed through the 
Maven element, and I think so.

Cheers
Niclas
-- 
   +------//-------------------+
  / http://www.bali.ac        /
 / http://niclas.hedhman.org / 
+------//-------------------+


---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@gump.apache.org
For additional commands, e-mail: general-help@gump.apache.org


RE: Seeing results of Maven unit tests?

Posted by Eric Pugh <ep...@opensourceconnections.com>.
I've seen this error periodically, and to be honest, I don't like this
test..  I don't really want to run it except on demand..   Is there any
environment variable that tells me I am running in Gump that I can get?
Anything like:

if (System.getProperty("gump")==true)
 ignore test...

Eric

> -----Original Message-----
> From: Niclas Hedhman [mailto:niclas@hedhman.org]
> Sent: Tuesday, November 02, 2004 5:19 PM
> To: Gump code and data
> Subject: Re: Seeing results of Maven unit tests?
>
>
> On Tuesday 02 November 2004 23:18, Eric Pugh wrote:
> > Cool, it is GUMP-87.  So, the files output by gump are not located
> > someplace that I can browse via HTTP then huh..   Anyway I could get
> > permissions to logon to the box and see?
>
> It is not for me to grant, so meanwhile here is the relevant (I
> hope) section
> of the TEST-org.apache.fulcrum.cache.CacheTest.txt
>
> [DEBUG] Starting container...
> [DEBUG] Loading the service container class
> org.apache.fulcrum.yaafi.framework.container.ServiceContainerImpl
> [DEBUG] Instantiating the service container class
> org.apache.fulcrum.yaafi.framework.container.ServiceContainerImpl
> [DEBUG] Setting applicationRootDir to
> /home/gump/workspaces2/public/workspace/jakarta-turbine-fulcrum/cache
> [DEBUG] Service Framework is starting up
> [DEBUG] Using the following applicationRootDir :
> /home/gump/workspaces2/public/workspace/jakarta-turbine-fulcrum/cache
> [DEBUG] Using the following tempRootDir : /tmp
> [DEBUG] Looking for src/test/TestComponentConfig.xml in the application
> directory
> [DEBUG] Successfully located src/test/TestComponentConfig.xml
> [DEBUG] Looking for src/test/TestRoleConfig.xml in the
> application directory
> [DEBUG] Successfully located src/test/TestRoleConfig.xml
> [DEBUG] Looking for /parameters.properties as absolute file location
> [DEBUG] Looking for /parameters.properties using the class loader
> [WARNING] Unable to locate /parameters.properties
> [DEBUG] Loading the implementation class for cache
> [DEBUG] Instantiating the implementation class for cache
> [DEBUG] Incarnating the service cache
> [DEBUG] LogEnabled.enableLogging() for cache
> [DEBUG] Configurable.configure() for cache
> [DEBUG] Initializable.initialize() for cache
> [DEBUG] Service Framework is up and running
> [INFO] YaffiContainer ready.
> [DEBUG] Disposing of container...
> [INFO] Disposing all services
> [DEBUG] All services are disposed
> [INFO] YaffiContainer has been disposed.
> ------------- ---------------- ---------------
> Testcase:
> testRefreshableTimeToLive(org.apache.fulcrum.cache.CacheTest):
> FAILED
> Received unexpected ObjectExpiredException exception when retrieving
> refreshable object after ( 6001 millis)
> junit.framework.AssertionFailedError: Received unexpected
> ObjectExpiredException exception when retrieving refreshable
> object after (
> 6001 millis)
>         at
> org.apache.fulcrum.cache.CacheTest.testRefreshableTimeToLive(Cache
> Test.java:476)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorIm
> pl.java:39)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAc
> cessorImpl.java:25)
>
>
> --
>    +------//-------------------+
>   / http://www.bali.ac        /
>  / http://niclas.hedhman.org /
> +------//-------------------+
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: general-unsubscribe@gump.apache.org
> For additional commands, e-mail: general-help@gump.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@gump.apache.org
For additional commands, e-mail: general-help@gump.apache.org


Re: Seeing results of Maven unit tests?

Posted by Niclas Hedhman <ni...@hedhman.org>.
On Tuesday 02 November 2004 23:18, Eric Pugh wrote:
> Cool, it is GUMP-87.  So, the files output by gump are not located
> someplace that I can browse via HTTP then huh..   Anyway I could get
> permissions to logon to the box and see?

It is not for me to grant, so meanwhile here is the relevant (I hope) section 
of the TEST-org.apache.fulcrum.cache.CacheTest.txt

[DEBUG] Starting container...
[DEBUG] Loading the service container class 
org.apache.fulcrum.yaafi.framework.container.ServiceContainerImpl
[DEBUG] Instantiating the service container class 
org.apache.fulcrum.yaafi.framework.container.ServiceContainerImpl
[DEBUG] Setting applicationRootDir to 
/home/gump/workspaces2/public/workspace/jakarta-turbine-fulcrum/cache
[DEBUG] Service Framework is starting up
[DEBUG] Using the following applicationRootDir : 
/home/gump/workspaces2/public/workspace/jakarta-turbine-fulcrum/cache
[DEBUG] Using the following tempRootDir : /tmp
[DEBUG] Looking for src/test/TestComponentConfig.xml in the application 
directory
[DEBUG] Successfully located src/test/TestComponentConfig.xml
[DEBUG] Looking for src/test/TestRoleConfig.xml in the application directory
[DEBUG] Successfully located src/test/TestRoleConfig.xml
[DEBUG] Looking for /parameters.properties as absolute file location
[DEBUG] Looking for /parameters.properties using the class loader
[WARNING] Unable to locate /parameters.properties
[DEBUG] Loading the implementation class for cache
[DEBUG] Instantiating the implementation class for cache
[DEBUG] Incarnating the service cache
[DEBUG] LogEnabled.enableLogging() for cache
[DEBUG] Configurable.configure() for cache
[DEBUG] Initializable.initialize() for cache
[DEBUG] Service Framework is up and running
[INFO] YaffiContainer ready.
[DEBUG] Disposing of container...
[INFO] Disposing all services
[DEBUG] All services are disposed
[INFO] YaffiContainer has been disposed.
------------- ---------------- ---------------
Testcase: testRefreshableTimeToLive(org.apache.fulcrum.cache.CacheTest):       
FAILED
Received unexpected ObjectExpiredException exception when retrieving 
refreshable object after ( 6001 millis)
junit.framework.AssertionFailedError: Received unexpected 
ObjectExpiredException exception when retrieving refreshable object after ( 
6001 millis)
        at 
org.apache.fulcrum.cache.CacheTest.testRefreshableTimeToLive(CacheTest.java:476)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)


-- 
   +------//-------------------+
  / http://www.bali.ac        /
 / http://niclas.hedhman.org / 
+------//-------------------+


---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@gump.apache.org
For additional commands, e-mail: general-help@gump.apache.org


RE: Seeing results of Maven unit tests?

Posted by Eric Pugh <ep...@opensourceconnections.com>.
Cool, it is GUMP-87.  So, the files output by gump are not located someplace
that I can browse via HTTP then huh..   Anyway I could get permissions to
logon to the box and see?

ERic

> -----Original Message-----
> From: Stefano Mazzocchi [mailto:stefano@apache.org]
> Sent: Tuesday, November 02, 2004 3:16 PM
> To: Gump code and data
> Subject: Re: Seeing results of Maven unit tests?
>
>
> Eric Pugh wrote:
>
> > Hi all,
> >
> > I notice that gump links in a lot of files that it generates, like the
> > project.properties etc.  However, the output from running unit
> tests is not
> > available.  Is there anyway to find this?
> >
> > A couple of the Fulcrum projects are failing on their tests...
> >
> >
> http://brutus.apache.org/gump/public/jakarta-turbine-fulcrum/fulcr
um-cache/i
> ndex.html
>
> I wondered if I could see them by pulling up a directory like:
>
>
http://brutus.apache.org/gump/public/jakarta-turbine-fulcrum/fulcrum-cache/g
> ump_file/target/test-reports
>
> but no joy...

add it as a feature request in the issue tracking system otherwise it
will be los.

--
Stefano.



---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@gump.apache.org
For additional commands, e-mail: general-help@gump.apache.org


Re: Seeing results of Maven unit tests?

Posted by Stefano Mazzocchi <st...@apache.org>.
Eric Pugh wrote:

> Hi all,
> 
> I notice that gump links in a lot of files that it generates, like the
> project.properties etc.  However, the output from running unit tests is not
> available.  Is there anyway to find this?
> 
> A couple of the Fulcrum projects are failing on their tests...
> 
> http://brutus.apache.org/gump/public/jakarta-turbine-fulcrum/fulcrum-cache/i
> ndex.html
> 
> I wondered if I could see them by pulling up a directory like:
> 
> http://brutus.apache.org/gump/public/jakarta-turbine-fulcrum/fulcrum-cache/g
> ump_file/target/test-reports
> 
> but no joy...

add it as a feature request in the issue tracking system otherwise it 
will be los.

-- 
Stefano.