Re: JUNIT questions



"Taria" <mchew02@xxxxxxxxxxx> writes:

Did it? Well, sorta. The red bar flashes at me and I am clueless how
to go about debugging an error that JUNIT has found. All the
tutorials I have gone through usually addresses the green bar but not
what to do when the method is not functioning properly. My experience
with past debuggers is that some step you thru the program's execution
and you are able to set up breaks, examine values of variables, etc.
So, how do you use JUNIT the same way? Am I looking at JUNIT the
wrong way?

JUnit's not a debugger; it runs tests suites, and reports
on whether they pass or fail.

If they fail, JUnit can report which test failed, along with
the difference between the expected value and the actual value
or the exception that was thrown. (I run JUnit from Ant, so
I don't know how you'd get that information in your IDE.)

If you'd like to use a debugger to fix the failure, you're
welcome to do it, but you need to go find a debugger. After
you've made your changes, use JUnit to re-run your tests.

--
Mark Jeffcoat
Austin, TX
.



Relevant Pages

  • Re: JUNIT questions
    ... how do you use JUNIT the same way? ... If you'd like to use a debugger to fix the failure, ... public static int add(int first, int second) { ...
    (comp.lang.java.programmer)
  • Re: JUNIT questions
    ... I thought it wasn't...thank you for confirming my suspicion. ... use JUnit to re-run your tests. ... I'm happy to use a debugger because a debugger has always been my ... Andrew for that hint how to use JUNIT without using a debugger. ...
    (comp.lang.java.programmer)
  • Re: bug in junit assertions?
    ... Roy Smith wrote: ... > I have a junit test case fail recently, but instead of printing out the ... the end of the actual string. ...
    (comp.lang.java.help)
  • PHP Unit Test - Code Coverage - Continuous Intergration?
    ... I¹m just not getting into unit testing and was wondering what tools are out ... there that will automatically run unit tests continuously and make reports ... I¹m using Hudson, ant, Junit, and Coberatura. ...
    (php.general)