Parsoft Jtest: Anyone use it?

A

Andrew McDonagh

Wibble said:
Anyone using parasoft jtest?

It writes unit tests for you. Too good to be true?

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
 
W

Wibble

Andrew 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
I always write tests for my code, but most of the developers on
my team wont. Our management is looking for a silver bullet
because they dont want to tell people to write tests.
It makes no sense to me either.

They asked me to look at jtest since I'm always saying we need
unit tests. I'm assuming that if they buy it, it may do some
good, but more likely just provide an excuse not to write
tests at all.

Somebody wake me up. This dream is too stupid.
 

Ask a Question

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.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,682
Members
48,796
Latest member
Greg L.

Latest Threads

Top