Paper Title

Implementation of Mocks in UT Framework Development

Authors

Rahul Kundu , Ms. P Devaki

Keywords

Mock Objects, Unit Testing, C++, Test Helpers, Low Cost and Maintenance, Constructor functions, Templates, Dependencies.

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.

How To Cite

"Implementation of Mocks in UT Framework Development ", IJSDR - International Journal of Scientific Development and Research (www.IJSDR.org), ISSN:2455-2631, Vol.3, Issue 5, page no.118 - 120, May-2018, Available :https://ijsdr.org/papers/IJSDR1805020.pdf

Issue

Volume 3 Issue 5, May-2018

Pages : 118 - 120

Other Publication Details

Paper Reg. ID: IJSDR_180221

Published Paper Id: IJSDR1805020

Downloads: 000347236

Research Area: Engineering

Country: Bangalore, Karnataka, India

Published Paper PDF: https://ijsdr.org/papers/IJSDR1805020

Published Paper URL: https://ijsdr.org/viewpaperforall?paper=IJSDR1805020

About Publisher

ISSN: 2455-2631 | IMPACT FACTOR: 9.15 Calculated By Google Scholar | ESTD YEAR: 2016

An International Scholarly Open Access Journal, Peer-Reviewed, Refereed Journal Impact Factor 9.15 Calculate by Google Scholar and Semantic Scholar | AI-Powered Research Tool, Multidisciplinary, Monthly, Multilanguage Journal Indexing in All Major Database & Metadata, Citation Generator

Publisher: IJSDR(IJ Publication) Janvi Wave

Article Preview

academia
publon
sematicscholar
googlescholar
scholar9
UGC Care
maceadmic
Microsoft_Academic_Search_Logo
elsevier
researchgate
ssrn
mendeley
Crossref
orcid
sitecreex