Font Size: a A A

The Design And Implementation Of Mock In Software Testing

Posted on:2017-11-19Degree:MasterType:Thesis
Country:ChinaCandidate:Y ChenFull Text:PDF
GTID:2518304844959479Subject:Master of Engineering
Abstract/Summary:PDF Full Text Request
Nowadays,software is becoming larger and more complicated.There are so many modules in the system called by each other.Frequent interactions with thirdparty softwares and strong dependence on external system have brought certain influence on the quality assurance work.When the execution results are beyond expectation,error location turns to be a problem.One common situation is that when we expect for some desired messages from third-party environment,the environment is not available,or can't meet requirements.This problem may incur the test work postponed until the environment is available.Therefore,how to reduce the influence of modules or third-party resources on the tested module in system is one of the important issues.We have analyzed the demand of modules in this thesis.Besides we design and implement a common and extensible mock combining the application of mock technology in today's program,which supports multiple protocols.This mock can serve as a substitute for associated module or a third-party environment.And the "substitute" returns some predefined messages according to what we send to it.By using this mock,we can reduce the influence of external factors on the module,and makes the subsequent testing process smoothly.In summary,the main content includes the following aspects:(1)This thesis studies the development and application of mock technology,and then introduces the background and the scenario that the mock can be used,especially the coarse-grained mock technology used in integration testing.This thesis also discusses the development pattern based on socket protocols and plug-in framework.(2)This thesis analyzes the background and advantages/disadvantages of several kinds of mocks.According to the mentioned requirement of mock,we choose one of the architectural designs and finish the defination of each module and data structure design;(3)This thesis also analyzes usages of several kinds of common strategies,designs and gives the implementation.With the comparison of "without mock","regular message mock" and "one protocol mock",we find that our mock has presented high efficiency.
Keywords/Search Tags:Mock, Framework, Strategy, Protocol
PDF Full Text Request
Related items