Font Size: a A A

The Research And Design Of Automatic Unit Testing Mock Platform In NodeJS

Posted on:2018-05-15Degree:MasterType:Thesis
Country:ChinaCandidate:S Y PanFull Text:PDF
GTID:2348330518996494Subject:Electronic Science and Technology
Abstract/Summary:PDF Full Text Request
With the rapid development of Internet technology and the advent of the Internet era, the application of Web will gradually replace the traditional PC software has become the most common way to access Internet users. In this context, the development and testing of Web application products occupy a more and more important position in the field of software testing. Because the Web application system has the characteristics of heterogeneous, distributed, concurrent and platform independent, it is more difficult to test the Web application system than the traditional program. In many Web application testing, unit testing as one of the most important testing methods, also faced with the need to improve to meet the urgent needs of the Web scene.Unit testing is in different stages of software development, write test cases according to the logical structure of the program, by focusing on for specific input, the object returned is normal to judge whether the object has a test method of program availability and stability. However, in some complex scenes, the existing unit testing framework can not meet the need of system logic verification. In this context, Mock technology was proposed in 2001 and has gradually become an indispensable part of the unit testing technology.Mock refers to the unit test, the test system meets the predefined rules by constructing a series of simulation objects (Mock Object) to interact with the unit under test, to determine the subjects in the normal logic unit, can work under pressure or abnormal logic, the output expected returns. Mock is an important idea in the field of software testing. Based on this idea, many excellent researchers and organizations in the industry have developed corresponding Mock testing tools for different application scenarios. However, in the case of Web application system has just started,there is no reliable Mock testing tool can be used for Web application scenarios mock automated testing.At first, this paper introduces the research background and development status at home and abroad, and describes the relevant knowledge of unit testing and automated testing. On this basis, this paper designed and developed a series of Mock testing system based on nodeJS,mockJS, React and other mainstream Web framework based on the characteristics of Web application system. The platform creatively designed a series of grammar rules to describe the data that the simulation object followed. According to the dynamic construction of the virtual router interface, the simulation data is returned.
Keywords/Search Tags:Web Application, Unit Test, Mock Test, Automatic Test
PDF Full Text Request
Related items