RE: Problem implementing automated tests

"David Leangen" <[email protected]>
Newsgroups gmane.comp.jakarta.avalon.user
Message-ID <[email protected]>
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?


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 ---------------------------------------------------------------
java.lang.IllegalStateException: don't know what to do yet
org.apache.avalon.merlin.unit.AbstractMerlinTestCase.getCacheDirectory(Abstr
actMerlinTestCase.java:331)
org.apache.avalon.merlin.unit.AbstractMerlinTestCase.getHomeDirectory(Abstra
ctMerlinTestCase.java:319)
org.apache.avalon.merlin.unit.AbstractMerlinTestCase.setUp(AbstractMerlinTes
tCase.java:139)
junit.framework.TestCase.runBare(TestCase.java:125)
junit.framework.TestResult$1.protect(TestResult.java:106)
junit.framework.TestResult.runProtected(TestResult.java:124)
junit.framework.TestResult.run(TestResult.java:109)
junit.framework.TestCase.run(TestCase.java:118)
junit.framework.TestSuite.runTest(TestSuite.java:208)
junit.framework.TestSuite.run(TestSuite.java:203)
junit.framework.TestSuite.runTest(TestSuite.java:208)
junit.framework.TestSuite.run(TestSuite.java:203)
junit.framework.TestSuite.runTest(TestSuite.java:208)
junit.framework.TestSuite.run(TestSuite.java:203)
junit.framework.TestSuite.runTest(TestSuite.java:208)
junit.framework.TestSuite.run(TestSuite.java:203)
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRu
nner.java:421)
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.
java:305)
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner
.java:186)
----------------------------------------------------------------------------
----

	at
org.apache.avalon.merlin.unit.AbstractMerlinTestCase.setUp(AbstractMerlinTes
tCase.java:231)
	at junit.framework.TestCase.runBare(TestCase.java:125)
	at junit.framework.TestResult$1.protect(TestResult.java:106)
	at junit.framework.TestResult.runProtected(TestResult.java:124)
	at junit.framework.TestResult.run(TestResult.java:109)
	at junit.framework.TestCase.run(TestCase.java:118)
	at junit.framework.TestSuite.runTest(TestSuite.java:208)
	at junit.framework.TestSuite.run(TestSuite.java:203)
	at junit.framework.TestSuite.runTest(TestSuite.java:208)
	at junit.framework.TestSuite.run(TestSuite.java:203)
	at junit.framework.TestSuite.runTest(TestSuite.java:208)
	at junit.framework.TestSuite.run(TestSuite.java:203)
	at junit.framework.TestSuite.runTest(TestSuite.java:208)
	at junit.framework.TestSuite.run(TestSuite.java:203)
	at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRu
nner.java:421)
	at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.
java:305)
	at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner
.java:186)









> Normally when merlin deploys a component that has a dependency on
> something like composition-impl, the dependencies will be included in
> the classloader defined in the container.  It sounds like your including
> composition-impl in the test classes which in turn means that you
> pushing these classes up in the classloader stack which will result in a
> class not found exception if you do not include all other dependencies
> of composition-impl.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.