Font Size: a A A

Design And Application Of Unit Testing Framework In C++Wireless Basestation Management System

Posted on:2015-11-07Degree:MasterType:Thesis
Country:ChinaCandidate:W HuangFull Text:PDF
GTID:2308330473954621Subject:Software engineering
Abstract/Summary:PDF Full Text Request
In computer programming, unit testing is a highly effective way to verify whether a block of code or a module of a system is working alright. A number of software enterprises have taken it as criteria for allowing the distribution of a new application or publish an update. More importantly, unit testing could in some degree, locate the source of error, helping software developers to fix the bug, and improving software quality.The first thing before software testing is to build a testing framework. Currently, although there have already been some of unit testing frameworks in the industry,which are mature enough to help us implement a unit testing framework that is specific to our needs. Majority of the existing testing framework are not working very well with the system under tested, lack of extensibility and hard to maintain. This thesis describes the way to desing a unified communication platform and an idea of global stub module.This new communication platform, by utilizing Singleton of design patterns, creates two system wide registries, one is dynamical and the other is statical at the initialization phrase of the application. Statical registry defines identities for all the compatible sub-modules and while dynamical registry is responsible for recording all the runtime instances and memory addresses of sub-modules. During initialization process, every sub-module registers itself into the registry. In a result, each of the sub-module is able to check and access all the other instances through these two registries. In addition, this communication process is completely transparent to its clients.Global stub module takes advantage of call back funtions of C++, takes a stub module only as a container, instead of the instance impletes detailed logic. Under this mechanism, stub module reserves the ability to communicate with the application, and maintain a feedback function list at the time. All the reaction code is capsulated into functions, saved into a list, and loaded at proper time.In summary, the testing framework desined in this paper has a concice code logic and great extensibility. The test cases are easier to write, and also in a unified fashion.
Keywords/Search Tags:unit testing, testing framework, C++ testing, design patterns
PDF Full Text Request
Related items