> -----Original Message----- > From: David Leangen [mailto:[EMAIL PROTECTED] > Sent: 14 September 2004 06:55 > To: [EMAIL PROTECTED] > Subject: RE: Problem implementing automated tests > > > Ok, you're right... I got rid of the avalon resources in my index file, > and > the build worked fine. > > However... my tests were not run during the build. > > The only things "special" I noticed in the Hello tutorial are that: > > 1. the test case must derive from > org.apache.avalon.merlin.unit.AbstractMerlinTestCase > 2. the test method throws Exception > > Other than these two observations, what do I need to do to get the tests > running when I run my build?
If you running Magic from about a week ago then you have to name you test cases so that they match the pattern *UnitTest.java. A recent update has relaxed that to *Test.java and also the patterens for includes and excludes can not be modified via properties. Also make sure you test classes are in the direcotory src/test. > Another question... > > org.apache.avalon.merlin.unit.AbstractMerlinTestCase breaks the JUnit > implementation in Eclipse. This is the error that is thrown: > > > > java.lang.Exception: ---- runtime exception > report -------------------------------------------------- > Exception: java.lang.IllegalStateException > Message: don't know what to do yet > ---- stack > trace --------------------------------------------------------------- This is due to missing properties (resulting from running outside of magic and the reason for the message). Basically you testcases (using the current implementation of the abstract unit test and current magic) need to be supplied with the following two properties: ${project.dir} - should point to the equivalent of ${basedir}/target/test ${project.repository.cache.path} - the repository directory Cheers, Steve. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]