Font Size: a A A

Design And Realization Of The Test Framework Of Interface Based On Junit

Posted on:2016-07-12Degree:MasterType:Thesis
Country:ChinaCandidate:Y JiangFull Text:PDF
GTID:2308330482975164Subject:Software engineering
Abstract/Summary:PDF Full Text Request
Interface testing is an important technique to test interfaces between components of a system. It has a good capability to detect faults with a low cost, compared to the traditional test techniques. It plays an increasingly important role in the field of software testing. In this paper, an interface testing framework for the C/S architecture projects was designed based on JUnit testing framework. Our framework mainly includes the following functions:separating test data and test methods, collecting performance data, supporting interface testing asynchronously and customizing assert methods for common java data types. Specifically, the main works completed by the author include:1) Design and implementation of the data-driven module. In details, this module implemented the data-driven function by using java annotation technique, which separates test data and test method. We also developed naming conventions of data files and interface testing classes in order to process automatic data reading and parameters analyzing.2) Design and implementation of the asynchronous interfaces testing module. The execution and call back of a procedure often consume a certain amount of time. By adopting the strategy of timing and waiting, we implemented the feature of verifying callback results.3) Design and implementation of the performance data collection module. The performance module calculates the performance data of interface testing and generates the results. The total time, average time, variance and squares for interface testing are computed using time logs. The results are sent to the project runner by a continuous integration platform.4) Design and implementation of the assertion module. We developed an assertion module based on Hamcrest framework, and implemented assertion methods for common Java data types with customizing match rules.Our framework has been applied to interface testing for projects based on a C/S architecture in Tencent. The results shows the efficiency and automation of interface testing has been improved significantly.
Keywords/Search Tags:Software testing, interface testing, performance testing, test automation
PDF Full Text Request
Related items