INTERNATIONAL JOURNAL OF SCIENTIFIC DEVELOPMENT AND RESEARCH International Peer Reviewed & Refereed Journals, Open Access Journal ISSN Approved Journal No: 2455-2631 | Impact factor: 8.15 | ESTD Year: 2016
open access , Peer-reviewed, and Refereed Journals, Impact factor 8.15
Implementation of Mocks in UT Framework Development
Authors Name:
Rahul Kundu
, Ms. P Devaki
Unique Id:
IJSDR1805020
Published In:
Volume 3 Issue 5, May-2018
Abstract:
Developers consider Unit testing as a basic and common practice where they can develop test cases along with regular source code. In modern Software development era testing is one of the essential part in terms of the quality of the system along with low maintenance cost. During the development phase of the unit tests, we often have deal with major problems. One among them is the replacement of existing dependencies which forces to replace or modify the source code itself. Generally, we add an extra constructor function in the source code or use the concept of template specialization to meet the needs. In C++, Unit test codes are generally bind together with the unit of source code we want to test. The goal is to explain the different types of techniques that prevent to minimal modification of the source code while writing the tests and how to develop a good unit test framework to maintain the quality of code with low cost and maintenance. To avoid the dependencies, we make use of Mocking technique in which we hide the basic code implementation and mocks the dependent function. This helps in easy testing and checks only the small unit of source code functionality we need to test as a single unit. Thus, verifying and validating all the possible combinations of the source code that is needed to be tested. Thus, It is important to be sure that one feature is tested at a time and should be notified if any error occurs at that point of time only. A technique of Mock objects and test Helpers is proposed that replaces source code with fake code implementations that simulate the real code.
Keywords:
Mock Objects, Unit Testing, C++, Test Helpers, Low Cost and Maintenance, Constructor functions, Templates, Dependencies.
Cite Article:
"Implementation of Mocks in UT Framework Development ", International Journal of Science & Engineering Development Research (www.ijsdr.org), ISSN:2455-2631, Vol.3, Issue 5, page no.118 - 120, May-2018, Available :http://www.ijsdr.org/papers/IJSDR1805020.pdf
Downloads:
000337071
Publication Details:
Published Paper ID: IJSDR1805020
Registration ID:180221
Published In: Volume 3 Issue 5, May-2018
DOI (Digital Object Identifier):
Page No: 118 - 120
Publisher: IJSDR | www.ijsdr.org
ISSN Number: 2455-2631
Facebook Twitter Instagram LinkedIn