Link to home
Start Free TrialLog in
Avatar of chima
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.AssertionFailedError: No tests found in a.b.c.FooTest

Could I use TestCase without having to apply @Test?

Avatar of chaitu chaitu
chaitu chaitu
Flag of India image

yeah you can use TestCase without having to apply @Test?
Avatar of chima
chima

ASKER

chaituu, that is re-assuring.  Why is it that I am getting that message that I have to use @Test?
ASKER CERTIFIED SOLUTION
Avatar of chaitu chaitu
chaitu chaitu
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of chima

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.AssertionFailedError: Class com.comcast.cable.sit.sams.xmlSchema.Validator has no public constructor TestCase(String name) or TestCase()
      at junit.framework.Assert.fail(Assert.java:47)
      at junit.framework.TestSuite$1.runTest(TestSuite.java:90)
      at junit.framework.TestCase.runBare(TestCase.java:130)
      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:120)
      at junit.framework.TestSuite.runTest(TestSuite.java:230)
      at junit.framework.TestSuite.run(TestSuite.java:225)
      at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
      at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)

Any suggestions?
error says you can't add these constructors TestCase(String name) or TestCase() in your testcase
Avatar of chima

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()
can you send the testcase that you have written?
Avatar of chima

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.