Data AccessCore JavaApp FrameworksViewTestingBuildingDeploymentDev ToolsSecurityOpinions

Tuesday, June 23, 2009

junit.framework.AssertionFailedError: No tests found in

If you ever get the above error and you think your test class is set up and implemented correctly, you may have one more thing to check.

Your test method names need to start with 'test'.

For example:

public class name extent TestCase{
public void method1() {}
public void method1() {}
}


Will result in an error. Change the method names to...

public class name extent TestCase{
public void testMethod1() {}
public void testMethod1() {}
}


You should be good to go!

21 comments:

  1. Thanx a lot for this Post, it is short and very useful.

    ReplyDelete
  2. Thanks Man to usefull

    ReplyDelete
  3. helped me, easy but forgetful

    Thanks

    ReplyDelete
  4. Thanks a lot!!!!!!!!!!

    ReplyDelete
  5. thanks a lot.. was stuck because of this for long.. thanks

    ReplyDelete
  6. Thanks it did worked and clarified how the test needs to run. It saved a lot of time.

    ReplyDelete
  7. Helped a lot!! Thank you so much!!!

    ReplyDelete
  8. It helped me a lot. Thank you :)

    ReplyDelete
  9. Many thanks. It finally worked!!

    ReplyDelete
  10. Thankyou this is really helping

    ReplyDelete
  11. thanks allot...saved my day....

    ReplyDelete




  12. do you want to study in abroad today or in the next intake. we are the best and top rated study abroad consultancies in india with good visa assurance usa foreign education consultants in hyderabad we help you in filing the f1 visa for you in very less time. we are also help you with information needed to apply for the college university.

    ReplyDelete