Link to home
Start Free TrialLog in
Avatar of jedistar
jedistarFlag for Singapore

asked on

Junit Testing

I have seen junit on its website and read it, im still not sure how do i use it
if i have a program application. what kind of functions should i test for.
sample codes, desc, examples would be good, thanks.
Avatar of sciuriware
sciuriware

You should test a class.
A good approach is: download ECLIPSE and use the function JUNIT creation.
You indicate a class of yours and it builds a test class in which you only have to add the fine testing.
Easy living.

;JOOP!
Avatar of hoomanv
search the web, you'll find a lot about Junit
http://www.google.com/search?q=junit%20tutorial
Avatar of jedistar

ASKER

im using netbeans

ok i build a test class, what do i need to test?
how do i test it?
ASKER CERTIFIED SOLUTION
Avatar of hoomanv
hoomanv
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
still not helpin
>> ok i build a test class, what do i need to test?

Right-click on your project and say JUnit -> Generate test cases
what happens if i use "create junit tests" in netbeans?
Yes, that's what I meant. Sorry haven't worked on Netbeans since long :) so I forgot the menu-item's text.
cool what does that do exactly and how it helps
i did that, and all my tests failed, any idea?
when netbean auto creates the test classes for me, i remove the fail() and what else should i do