chima
asked on
Junit.framework.AssertionFailedError: No tests found in a.b.c.FooTest
I am using "extends TestCase" and it is requiring that I use @Test. This is where the error is explained:
http://java.syntaxerrors.info/index.php?
Junit.framework.AssertionF ailedError : No tests found in a.b.c.FooTest
Could I use TestCase without having to apply @Test?
http://java.syntaxerrors.info/index.php?
Junit.framework.AssertionF
Could I use TestCase without having to apply @Test?
yeah you can use TestCase without having to apply @Test?
ASKER
chaituu, that is re-assuring. Why is it that I am getting that message that I have to use @Test?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I'm trying to sent up my java files to use "extended TestCase." I have changed it to JUnit 3.
Now I am getting this error (see below). I have added TestCase() constructors, yet I am still getting the error.
junit.framework.AssertionF ailedError : Class com.comcast.cable.sit.sams .xmlSchema .Validator has no public constructor TestCase(String name) or TestCase()
at junit.framework.Assert.fai l(Assert.j ava:47)
at junit.framework.TestSuite$ 1.runTest( TestSuite. java:90)
at junit.framework.TestCase.r unBare(Tes tCase.java :130)
at junit.framework.TestResult $1.protect (TestResul t.java:106 )
at junit.framework.TestResult .runProtec ted(TestRe sult.java: 124)
at junit.framework.TestResult .run(TestR esult.java :109)
at junit.framework.TestCase.r un(TestCas e.java:120 )
at junit.framework.TestSuite. runTest(Te stSuite.ja va:230)
at junit.framework.TestSuite. run(TestSu ite.java:2 25)
at org.eclipse.jdt.internal.j unit.runne r.junit3.J Unit3TestR eference.r un(JUnit3T estReferen ce.java:13 0)
at org.eclipse.jdt.internal.j unit.runne r.TestExec ution.run( TestExecut ion.java:3 8)
at org.eclipse.jdt.internal.j unit.runne r.RemoteTe stRunner.r unTests(Re moteTestRu nner.java: 460)
at org.eclipse.jdt.internal.j unit.runne r.RemoteTe stRunner.r unTests(Re moteTestRu nner.java: 673)
at org.eclipse.jdt.internal.j unit.runne r.RemoteTe stRunner.r un(RemoteT estRunner. java:386)
at org.eclipse.jdt.internal.j unit.runne r.RemoteTe stRunner.m ain(Remote TestRunner .java:196)
Any suggestions?
Now I am getting this error (see below). I have added TestCase() constructors, yet I am still getting the error.
junit.framework.AssertionF
at junit.framework.Assert.fai
at junit.framework.TestSuite$
at junit.framework.TestCase.r
at junit.framework.TestResult
at junit.framework.TestResult
at junit.framework.TestResult
at junit.framework.TestCase.r
at junit.framework.TestSuite.
at junit.framework.TestSuite.
at org.eclipse.jdt.internal.j
at org.eclipse.jdt.internal.j
at org.eclipse.jdt.internal.j
at org.eclipse.jdt.internal.j
at org.eclipse.jdt.internal.j
at org.eclipse.jdt.internal.j
Any suggestions?
error says you can't add these constructors TestCase(String name) or TestCase() in your testcase
ASKER
chaituu, might you be able to add more detail to your comment?
Are you saying that the files I have, and the way they are set up, that I can not use "extends TestCase?" Initially it gave this error: xmlSchema.ValidatorTest has no public constructor TestCase(String name) or TestCase()
Are you saying that the files I have, and the way they are set up, that I can not use "extends TestCase?" Initially it gave this error: xmlSchema.ValidatorTest has no public constructor TestCase(String name) or TestCase()
can you send the testcase that you have written?
ASKER
I figure that I had to have started with the proper test framework and not try to "automatically" convert the existing java files to Junit testing. I have another set of files where the convertion did work.