Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Test method and device based on Mock and server

A test method and test device technology, applied in software test/debugging, instrumentation, error detection/correction, etc., can solve problems such as data loss, inaccurate test results, and inability of the next-level service module to truly reflect performance, etc., to achieve The effect of accurate test results

Inactive Publication Date: 2017-11-07
KINGSOFT
View PDF5 Cites 25 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

In practical applications, the data of the upper-level server module may be abnormal, or data loss may occur during the call process. If the data of the upper-level service module called by the interface is unstable, the data based on the call When the next-level service module is tested, it often has a greater impact on the test results of the next-level service module. The test results of the lower-level service module obtained cannot truly reflect its performance, resulting in inaccurate test results.

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Test method and device based on Mock and server
  • Test method and device based on Mock and server
  • Test method and device based on Mock and server

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0071] Embodiments of the present invention are described in detail below, examples of which are shown in the drawings, wherein the same or similar reference numerals designate the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by referring to the figures are exemplary and are intended to explain the present invention and should not be construed as limiting the present invention.

[0072] The Mock-based testing method and device of the embodiment of the present invention will be described below with reference to the accompanying drawings.

[0073] figure 1 It is a schematic flow chart of a mock-based testing method provided by an embodiment of the present invention. Such as figure 1 As shown, the Mock-based testing method includes the following steps:

[0074] S101. Receive a data request for acquiring test data sent by a target interface; the data request carries a service identifier for identifying a s...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention provides a test method and device based on Mock and a server. The method includes the steps that a data request used for requesting and obtaining test data of a test service module and sent by a target interface is received, wherein the data request carries a service identifier for indentifying the test service module; a value of the service identifier is obtained from the data request, and target test data corresponding to the value of the service identifier is obtained from a local database, and is sent to the target interface. Test data can be preset for different service modules in the local database, the Mock server can provide stable test data corresponding to the test service module for the interface, it is guaranteed that the obtained test data conforms to anticipation of a next service module, an error of the testing result of the next service module can be thus avoided, automatic testing of all the service modules is more independent, and the testing result is more accurate.

Description

technical field [0001] The invention relates to the field of automated testing, in particular to a mock-based testing method, device and server. Background technique [0002] As the software system becomes more and more complex, developers need to test the developed modules or units during the development process or after the development is completed, so as to find errors in time and repair them in time to ensure the correctness and stability of the developed programs. . [0003] At present, each service module in the Linux background service system is relatively independent of each other. Therefore, in the process of testing each service module through the automated test framework, it is often possible to call the data of other service modules through the interface, and then based on the call to The data is used to test the next-level service module. In practical applications, the data of the upper-level server module may be abnormal, or data loss may occur during the cal...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F11/36
CPCG06F11/3688
Inventor 崔晗谢文艳李建健
Owner KINGSOFT
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products