W
Wibble
Anyone using parasoft jtest?
It writes unit tests for you. Too good to be true?
It writes unit tests for you. Too good to be true?
Wibble said:Anyone using parasoft jtest?
It writes unit tests for you. Too good to be true?
I always write tests for my code, but most of the developers onAndrew said:It writes unit tests for the code you already have.
It does not write tests you need for the code you dont have.
e.g.
You have a Calculator class that does division.
class Calculator {
public double divide(double num1, double num2){
return num1 / num2;
}
}
Now it will generate tests for every combination that can be induced
from that code.
It can't test that the calculator is not supposed to allow 0 divided by 0.
unless of course, you edit the code.
Its not a great tool IMHO, but better than nothing!
Its far better to write the tests yourself - before the code to be
tested. For many many reasons, but not least, it forces your code to be
testable!
These tools are great for applying to legacy code bases (where legacy
means any code without unit tests)
Andrew
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.