Unlock instant, AI-driven research and patent intelligence for your innovation.

MOCK system and data testing method based on MOCK system

A database and test data technology, applied in electrical digital data processing, software testing/debugging, error detection/correction, etc., can solve problems such as high maintenance cost, data redundancy, and inability to associate upstream and downstream interfaces, and achieve improved efficiency. Effect

Pending Publication Date: 2021-08-24
PINGAN YIQIANBAO E COMMERCE CO LTD
View PDF0 Cites 1 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, the shortcomings of this method are also obvious: the upstream and downstream interfaces cannot be associated, and the return is controlled simply by writing JS logic code in the mock data; when there are many data in a single interface, the data will be very redundant, and the maintenance cost is high; the time is long Finally, if the back-end interface changes, the previous data needs to be reorganized, which consumes a lot of energy

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
  • MOCK system and data testing method based on MOCK system
  • MOCK system and data testing method based on MOCK system

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0044] read on figure 1 , shows a schematic diagram of program modules of Embodiment 1 of the MOCK system of the present invention. In this embodiment, the MOCK system 10 may include or be divided into one or more program modules, one or more program modules are stored in a storage medium and executed by one or more processors to complete this invention. The program module referred to in the embodiment of the present invention refers to a series of computer program instruction segments capable of completing specific functions, which is more suitable for describing the execution process of the MOCK system 10 in the storage medium than the program itself. The following description will specifically introduce the functions of each program module of the present embodiment:

[0045] The first server 100 is configured to receive a query request for test data sent by the front end, and send the query request to the calling server.

[0046] In an exemplary embodiment, the test data...

Embodiment 2

[0070] In this embodiment, the MOCK system 10 can also have the following functions:

[0071] Exemplarily, the log server 140 is also used for:

[0072] Acquiring target scene parameters in the test data; querying candidate history logs including the target scene parameters through the query interface. Calculating the similarity value between each candidate history log including the target scene parameter and the target scene data; obtaining the candidate history log whose similarity value is greater than a preset threshold as the historical target log. When there are multiple historical target logs, the multiple historical target logs are respectively processed according to preset rules to obtain multiple interface data; the multiple interface data are sent to the first server to obtain Make the first server transmit a plurality of the interface data to the front end for page display.

[0073] In an exemplary embodiment, when the historical logs queried by the search engine...

Embodiment 3

[0081] refer to figure 2 , shows a flow chart of the steps of the data testing method based on the MOCK system in Embodiment 3 of the present invention. It can be understood that the flowchart in this method embodiment is not used to limit the sequence of execution steps. The MOCK system includes a first server, an invocation server, a log server, a MOCK server and a second server, which will be described exemplarily below. details as follows.

[0082] Step S200, the first server receives a test data query request sent by the front end, and sends the query request to the calling server.

[0083]In an exemplary embodiment, the test data that needs to be simulated is received through the front-end page of the first server, the test data may be a URL, such as a Taobao order request URL, and the target scenario parameter is a Taobao order. The front end generates a query request according to the test data, so that the first server can query the history log corresponding to the...

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 discloses an MOCK system, and the system comprises a first server which is used for receiving a test data query request transmitted by a front end, and transmitting the query request to a call server; a calling server used for receiving the query request, calling a query interface according to the query request, and sending the test data to the query interface, so that the query interface queries a historical target log corresponding to the test data according to the test data; a log server used for acquiring the historical target log and processing the historical target log according to a preset rule to obtain target interface data corresponding to the test data; an MOCK server used for acquiring the target interface data and performing MOCK processing on the target interface data to obtain a target MOCK interface; and a second server used for performing the MOCK test according to the target MOCK interface and the test data to obtain a test result. According to the embodiment of the invention, the interface testing efficiency is improved.

Description

technical field [0001] The embodiment of the present invention relates to the technical field of data testing, and in particular to a MOCK system and a data testing method based on the MOCK system. Background technique [0002] In the research and development mode where front-end and back-end are separated, front-end and back-end developers jointly agree on the request and response information of each interface, and then develop independently, and finally perform functional joint debugging based on the local request agent of the front-end engineering environment. The front-end engineering environment performs separate management for resource requests and interface requests. Resource requests access the local area, and interface requests are sent to the joint debugging target server, forming a cross-environment and cross-device joint debugging experience for the front and rear ends. Compared with the joint debugging mode driven by the back-end Be efficient. At present, when ...

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
Patent Type & Authority Applications(China)
IPC IPC(8): G06F11/36
CPCG06F11/3672
Inventor 曾干
Owner PINGAN YIQIANBAO E COMMERCE CO LTD