Loading ...
Sorry, an error occurred while loading the content.

Re: [junit] get Message "Could not invoke the suite() method" from JUnit Testrunner

Expand Messages
  • Jason Rogers
    Could not invoke suite method could happen for several reasons. As Kumar said, it could be a classpath issue which boils down to a NoClassDefFoundError...
    Message 1 of 4 , Mar 5, 2003
    View Source
    • 0 Attachment
      "Could not invoke suite method" could happen for several reasons. As
      Kumar said, it could be a classpath issue which boils down to a
      NoClassDefFoundError... but I think you generally would see that in the
      stack trace somewhere. The other thing that could be happening is that
      an object can't be instantiated for some reason - static
      initializations, error in ctors, etc. This will all be masked by the
      ambiguous "Could not invoke suite method".

      The thing to do would be to run it in the textui which will generally
      print out the full stack trace.

      I concur with Kumar though that it is probably a classpath issue. So I
      would start there by checking your classpath against the sum of VAJ's
      workspace classpath and the right-click-properties-classpath of the
      class in the workspace.

      =jason

      On Wed, 2003-03-05 at 06:34, Kumar Aravamudhan wrote: Wolfgang:

      I use JUnit with Ant. I had encountered a similar
      error message earlier. I had to add the right
      classpath.

      I guess you may have the same problem.

      You may want to check your classpath (inside VisualAge
      and your environmental setting in your PC).

      Kumar

      --- "J. B. Rainsberger" <jbrains@...> wrote:
      > Can you show us the source of your test?
      >
      > Thanks.
      >
      > So said wolleontour <wolfgang.weber@...> on
      > 3/3/2003 --------------------
      >
      > >Hi folks!
      > >
      > >While using Visual Age I developped code to test
      > software using
      > >JUnit. I used the command
      > >
      > >Testrunner.run(Testtreiber.class)
      > >
      > >to start JUnit inside my code.
      > >
      > >Everything is fine that means the software is
      > running well, but only
      > >when I run it inside Visual Age. (JDK 2.2)
      > >
      > >After having exported my files, I try
      > (unfortunately without success)
      > >to start the same code from the command line using
      > the command
      > >
      > >java -cp
      > xercesImpl.jar;JUnit.jar;testtreiberNom.jar
      > >testexercise.Testtreiber (here I used JDK 1.3.1_02)
      > >
      > >where testtreiberNom.jar is the jar-file I created
      > by myself and
      > >testexercise.Testtreiber is the class to execute.
      > >
      > >Junit comes up with the well-known Result-Window,
      > but doesn't start
      > >to work because of the fatal message above: could
      > not invole the suite
      > >() method!
      > >
      > >What's wrong here? I need help! Thank you for your
      > support
      > >
      > >Regards
      > >
      > >Wolfgang
      > >
      > >
      > >
      > >
      > >
      > >
      > >
      > >
      > >To unsubscribe from this group, send an email to:
      > >junit-unsubscribe@yahoogroups.com
      > >
      > >
      > >Your use of Yahoo! Groups is subject to
      > http://docs.yahoo.com/info/terms/
      >
      >
      > J. B. Rainsberger,
      > President, Diaspar Software Services
      > Let's write software that people understand.
      > http://www.diasparsoftware.com/
      > telephone: +1 416 791-8603
      > All correspondence (c) 2002 Diaspar Software
      > Services.
      > If you want to use it, just ask; don't steal.
      >
      >


      __________________________________________________
      Do you Yahoo!?
      Yahoo! Tax Center - forms, calculators, tips, more
      http://taxes.yahoo.com/



      Yahoo! Groups Sponsor
      ADVERTISEMENT


      To unsubscribe from this group, send an email to:
      junit-unsubscribe@yahoogroups.com


      Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
    Your message has been successfully submitted and would be delivered to recipients shortly.