Hi,

We use <junit> in a separate "test.xml" file to run all tests in certain
packages. Our build process is controlled by a shell script and basically
consists of:

0) Stop the appserver <wlstop>
1) Grab latest code from Perforce (our source code control system)
  a platfrom specific "build.properties" file is mapped out using p4 client
specs from the repository - I don't think you can do this type of thing in
CVS ?
2) Build using standard Ant tasks <javac> <ejbjar> etc., with the specific
props defined above.
3) Copy and filter properties files from the build env to the test env,
using copy and a home rolled deployer task. We use NFS for copying builds
between boxes although a tar pipe over ssh has alos been used.
4) start the app server - not using <wlrun> as this blocks the build...doh!
5) Run our Junit scripts against the appserver.
6) Since the logs have been captured using XMLLogger we then style them into
nice looking, corporate branded reports.
7) check the reports in & deploy to the build website (I've rolled a hacked
version of Tomcat into our build system to act as a single point for build
reports)
8) Finally, send Email and SMS (mobile phone text message) notifications,
again using a custom buildmonitor.

Phew......

Some links - 
http://www.c2.com/cgi/wiki?JavaUnit
http://www.martinfowler.com/articles/continuousIntegration.html 


Bye,

Les


> -----Original Message-----
> From: Ioan Mitrea [mailto:[EMAIL PROTECTED]]
> Sent: 15 January 2001 20:13
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: ant as a test harness ?
> 
> 
> Hi,
> 
> I'm a newbie with ant and probably like a lot of newbies, I am amazed
> at how many things you can do with ant and how easy it seems 
> to use it.
> 
> Thanks to the contributors for creating/enabling such a vibrant
> community.
> 
> I've been following the ant lists for a week or so and I saw 
> many people
> mentioning doing
> "everything" with ant which was also my first desire.
> 
> I would like to get more details about how people do 
> "everything", about
> the 
> design of their automated develop/build/distribute/deploy/test system
> and about the common
> pitfalls. I imagine this is quite a popular question, so I 
> hope someone
> has written some docs with guidelines...
> 
> I am particularly interested in using ant in order to 
> integrate testing
> with the build process.
> I would like to get feedback and experience about what kind 
> of tests can
> be integrated with ant
> and what testing frameworks people use.
> 
> I have seen two frameworks used  so far ( and already 
> integrated in ant)
> 
> 1. JUnit for running unit tests
> 2. the testlet framework from the avalon project which can be invoked
> through the <test> task
> 
> I would like to know how the second one is different from the first,
> what are the use cases for the two of them respectively ( Well, i can
> see differences by myself by looking at the code, but I don't have the
> experience with either of them to be able to understand what 
> the issues
> are)
> 
> It seems that both of them are quite lightweight and exetensible.
> Does anyone know of projects that build extensions on top of these
> frameworks ? or of other testing frameworks ?
> 
> What can be used to automate running other kinds of tests which would
> not be restricted to testing one single class... integration tests/
> system tests... ?
> Basically any process can be viewed as a test ? 
> Can ant be used to build a test harness/framework which would run any
> kind of test and be able to
> collect/report/publish results in a meaningful way ?
> Probably not... it seems that the logic that can be embedded in an ant
> buildfile is limited since it was 
> intended precisely to be just a buildfile?
> But where would the border be? What are the test-related tasks which
> make sense to be implemented as ant projects/subprojects and which are
> the tasks better implemented in a more heavy-weight java harness ?
> 
> Again, I'm quite a newbie so  please excuse me if my questions are
> naive/obvious/... ?
> 
> Thanks, Ioan
> 

Reply via email to