Mock test method and system for business logic interface
A business logic and testing method technology, applied in the field of software automation testing, can solve the problems such as the inability to quickly construct and maintain data in the automated interface test, the low efficiency of automated execution, and the inability to perceive and analyze the abnormality of the returned packets of the interface in a timely and effective manner. , to achieve the effect of shortening time, improving efficiency and reducing costs
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0060] Such as figure 1 As shown, the business logic interface mock testing method involved in this embodiment includes the following steps:
[0061] S101. Receive an SOA request of a business logic interface, and return test data corresponding to the business logic interface as expected data from a test tool.
[0062] In the specific implementation, test the SOA request of the business logic interface through the test tool, so as to obtain the test data corresponding to the business logic interface, and then use the test data as the expected data of the business logic interface, so that the business logic interface can be obtained through the test tool The expected values corresponding to each scenario of the test, and then save these expected values in the expected results of the automated test script.
[0063] S102. Obtain mock data corresponding to the service logic interface from the distributed cache as result data according to the service logic interface.
[0064]...
Embodiment 2
[0087] Such as Figure 5 As shown, the business logic interface mock test system involved in this embodiment includes a first acquisition module 1 , a second acquisition module 2 , a comparison module 3 and an assertion module 4 . Wherein, the first acquisition module 1 is used to receive the SOA request of the business logic interface, and returns the test data corresponding to the business logic interface as expected data from the test tool; the second acquisition module 2 is used to obtain The mock data corresponding to the business logic interface is obtained from the distributed cache as the result data; the comparison module 3 is used to compare the result data with the expected data; the assertion module 4 is used to output the comparison result according to the comparison module 3 Return the assertion corresponding to the business logic interface, the assertion includes that the result data matches the expected data, or the result data does not match the expected data,...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 


