ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marcus" <marc...@criticalpointsoftware.com>
Subject Re: junit specify system properties
Date Thu, 27 Dec 2001 17:38:59 GMT
ok, i got it so it now accepts the parameters, but:
Cannot instantiate test case: testSubmitQueryMThread

junit.framework.AssertionFailedError: Cannot instantiate test case:
testSubmitQueryMThread
at junit.framework.Assert.fail(Assert.java:143)
at junit.framework.TestSuite$1.runTest(TestSuite.java:178)
at junit.framework.TestCase.runBare(TestCase.java:129)
at junit.framework.TestResult$1.protect(TestResult.java:100)
at junit.framework.TestResult.runProtected(TestResult.java:117)
at junit.framework.TestResult.run(TestResult.java:103)
at junit.framework.TestCase.run(TestCase.java:120)
at junit.framework.TestSuite.run(TestSuite.java:144)
at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRu
nner.java:231)
at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestR
unner.java:409)

thx
-mez
----- Original Message -----
From: "Erik Hatcher" <jakarta-ant@ehatchersolutions.com>
To: "Ant Users List" <ant-user@jakarta.apache.org>
Sent: Wednesday, December 26, 2001 6:13 PM
Subject: Re: junit specify system properties


> As I've mentioned to you in private mail, you're example is way too
> convoluted to make much sense out of it.  Please try and simplify it down
to
> a barebones test case that gets a property from System.getProperty and
uses
> that as a filename.  Create a contrived example that will eliminate all
your
> domain specific property names and post what you have back for us if you
> still have issues.
>
> Typically the act of creating a contrived working example will shed light
on
> the actual problem though.
>
> More comments below....
>
> >       <sysproperty key="mdb.properties.file1"
> > value="mdb.properties.file1.properties"/>
>
> Ok, so you've got this set and being fed into JUnit...
>
> > i have a file mdb.properties.file1.properties that has teh following
line:
> > minitest QUESTIONFILE_minimetanet questionfile 1
>
> Ok, again we're getting convoluted here... simplify!
>
> > here is the output:
> > which are parameters that i pass in for my unit test.
> >     [junit] Running cp_test.system.TestSubmitQueryMThread
> >     [junit] Executing:
> > p:\thirdparty\win32\runnable\jdk\13\jre\..\bin\java.exe -
> >
>
Dmdb.properties.file=mdb.testsubmitqueryMthread.properties -Dmdb.properties.
> > file
> > 1=mdb.properties.file1.properties
>
> Ok, you can clearly see that your property is being sent into Ant's
> JUnitTestRunner.
>
> >     [junit] TEST cp_test.system.TestSubmitQueryMThread FAILED
>
> So the failure is in your test case from what your output is showing.
> Without seeing those details (and we don't need to see them if you create
a
> trivial example showing the problem) we can't tell why its failing.
>
> > BUILD SUCCESSFUL
>
> And *never ever* let a build finish successfully if tests failed!!!!!  :))
>
>     Erik
>
>
>
>
> --
> To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message