Dr. Subhendu Ghatak

Subodh Bandhawarkar

 

Unit Testing with JUnit

   
 

Unit testing in a development project ensures that the code is solid before it moves forward to integration and system testing. Test-driven development (TDD) is a paradigm where a test is written and executed once before coding is done. The test will fail initially. The test is run again after coding – it should now pass. TDD provides powerful motivation to developers to ensure that all tests pass before the code is handed over for integration. Open source unit test frameworks make TDD feasible and economic. For writing effective unit tests, knowledge of possible failure modes is necessary, many errors occur at the boundary conditions. When the code depends on other systems outside our control, mock objects are used to mimic that object’s behaviour. Finally, program build and unit test should be automated to the extent possible, so that we can check that the existing code functions as intended.

JUnit is one of the xUnit family of open source frameworks for unit testing. Using JUnit, one can incrementally build a unit test suite for measuring progress and spotting unwanted side effects in Java programs. The JUnit framework is simple and easy to use. The framework provides assertions to check actual results against expected results, fixtures for sharing common test data and for putting the test environment in a known state before and after each test, and test runners for running tests and reporting the test results. Participants should preferably have a basic knowledge of Java programming. The Junit home page is www.junit.org.

   

Speaker's Background

Dr. Subhendu Ghatak is a consultant at Tata Consultancy Services (TCS). He obtained his B.Tech in Computer Science from I.I.T. Kharagpur in 1985. He completed a Ph.D. in Computer Network Management from the University of Tennessee, Knoxville in 1992 and joined TCS in 1993. He has wide experience in software development and testing. He has also worked in the area of software process development. He is a certified Project Management Professional (PMP). Dr. Ghatak is a life member of Computer Society of India (CSI) and Institution of Electronics and Telecommunication Engineers (IETE).

Subodh Bandhawakar is an Assistant Consultant at Tata Consultancy Services (TCS). He has more than 7.5 years of IT industry experience. He has obtained his B. Tech in Mechanical Engineering from Institute of Technology, Banaras Hindu University in 1999. He has extensive experience in the realm of Application Development and Maintenance, System Software Development, Maintenance and Testing and has driven a number of Quality & Testing initiatives inside TCS.

He has executed projects in the areas of Banking and Financial Services, System Software, Kernel and OS maintenance and Product Testing. He has delivered consulting services in the area of Test Management, Test Process, Test Case Design and Test Environment Setup.

Subodh is a Certified Software Quality Assurance professional from QAI, USA. He has also represented TCS in 4th International Software Testing Conference of QAI in 2004 and presented a paper on “Testing Network Attached Storage Devices”.