Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How is UNIT TESTING performed

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions
View previous topic :: :: View next topic  
Author Message
mf_karthik

New User


Joined: 26 Jul 2005
Posts: 55

PostPosted: Wed Aug 03, 2005 7:56 am    Post subject: How is UNIT TESTING performed
Reply with quote

HI
HOW IS UNIT TESTING PERFORMED?
EXPLAIN IT CLEARLY WITH PROCEDURES AND SMALL EXAMPLES
Back to top
View user's profile Send private message

sriteja

New User


Joined: 25 Jul 2005
Posts: 15
Location: Hyderabad

PostPosted: Wed Aug 03, 2005 1:56 pm    Post subject:
Reply with quote

Karthik,

Unit Testing tests a subroutine, module, or class i.e the smallest unit of functional code.
For example say you have a date routine in your cobol program.
Giving test cases and testing for all valid and invalid values of dates you test the date routine.
Say you also have a module in COBOL that accepts data from the JCL via SYSIN. You may want to test how different data (valid and invalid) is being accepted by your cobol program.
So basically Unit testing is testing the smallest functional lines of code.
You can use Xpeditor, File-Aid as tools for unit testing.

Hope this answers your question.

Regards
Sri
Back to top
View user's profile Send private message
EnjoyMF

New User


Joined: 27 May 2005
Posts: 88

PostPosted: Wed Aug 03, 2005 2:00 pm    Post subject: Re: UNIT TESTING HELP PLZ
Reply with quote

hi friend

it would be nice if u can get this information from an working professional directly
************************************************************8
in simple sense
unit testing is nothing but to test ur code by using the testcase that u had written

different input data is given from the input file and then program is checked to see that it is getting the expected output in the output file.
********************************************************88

Unit Testing
The primary goal of unit testing is to take the smallest piece of testable software in the application, isolate it from the remainder of the code, and determine whether it behaves exactly as you expect. Each unit is tested separately before integrating them into modules to test the interfaces between modules. Unit testing has proven its value in that a large percentage of defects are identified during its use.

The most common approach to unit testing requires drivers and stubs to be written. The driver simulates a calling unit and the stub simulates a called unit. The investment of developer time in this activity sometimes results in demoting unit testing to a lower level of priority and that is almost always a mistake. Even though the drivers and stubs cost time and money, unit testing provides some undeniable advantages. It allows for automation of the testing process, reduces difficulties of discovering errors contained in more complex pieces of the application, and test coverage is often enhanced because attention is given to each unit.

For example, if you have two units and decide it would be more cost effective to glue them together and initially test them as an integrated unit, an error could occur in a variety of places:

Is the error due to a defect in unit 1?
Is the error due to a defect in unit 2?
Is the error due to defects in both units?
Is the error due to a defect in the interface between the units?
Is the error due to a defect in the test?
Finding the error (or errors) in the integrated module is much more complicated than first isolating the units, testing each, then integrating them and testing the whole.

Drivers and stubs can be reused so the constant changes that occur during the development cycle can be retested frequently without writing large amounts of additional test code. In effect, this reduces the cost of writing the drivers and stubs on a per-use basis and the cost of retesting is better controlled.
*************************************************************
if time permits check these

http://en.wikipedia.org/wiki/Unit_testing

http://radio.weblogs.com/0100190/stories/2002/07/25/sixRulesOfUnitTesting.html

http://www.testingfaqs.org
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts UNIT=AFF for Easytrieve code gandikk JCL & VSAM 7 Wed Jul 12, 2017 11:42 pm
No new posts Testing rerad cursor for status with ... John F Dutcher DB2 8 Fri May 19, 2017 9:35 pm
No new posts Testing for equality himanshu_pant COBOL Programming 6 Fri Jul 10, 2015 9:19 pm
This topic is locked: you cannot edit posts or make replies. Job Opening for Mainframe Testing Pro... gaurav.rajvanshi Mainframe Jobs 0 Thu Mar 19, 2015 2:23 pm
No new posts ADABAS to DB2 Data migration Testing Ashish.Srivastava.123 DB2 0 Fri Mar 06, 2015 2:13 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us