This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Testing and the fly likes How easy is to write test cases in JUnit?? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » Testing
Bookmark "How easy is to write test cases in JUnit??" Watch "How easy is to write test cases in JUnit??" New topic
Author

How easy is to write test cases in JUnit??

Srinivasan Mani
Ranch Hand

Joined: Apr 03, 2002
Posts: 36
Im new to JUnit.How easy is to write test cases in JUnit.Is it possible for us to record our actions and convert them as test cases??
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
How easy is to write test cases in JUnit.
Very easy. You can time how long does it take you to read this tutorial
Is it possible for us to record our actions and convert them as test cases??
Now you're confusing unit tests with functional tests. There are separate tools for recording user actions. JUnit is a framework for writing unit tests, although some recording tools might produce JUnit-compatible classes as output.


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Karthik Guru
Ranch Hand

Joined: Mar 06, 2001
Posts: 1209
A basic question:
Does testing a Struts Action qualify as a unit test/functional test.
Say the action provides the basic functionality of creating a tender
CreateTenderAction
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
Yes, testing an Action would be unit testing.
 
Consider Paul's rocket mass heater.
 
subject: How easy is to write test cases in JUnit??
 
Similar Threads
testcases
Test-Driven Development
how to write and run junit test cases in eclipse?
Build a file in Memory
Can we perform unit testing with JUnit for Struts1 application