CN112711421A - Cross-service Mock data sharing and using method, system, equipment and storage medium - Google Patents
Cross-service Mock data sharing and using method, system, equipment and storage medium Download PDFInfo
- Publication number
- CN112711421A CN112711421A CN202011583869.5A CN202011583869A CN112711421A CN 112711421 A CN112711421 A CN 112711421A CN 202011583869 A CN202011583869 A CN 202011583869A CN 112711421 A CN112711421 A CN 112711421A
- Authority
- CN
- China
- Prior art keywords
- service
- data
- mock
- rule
- mocker
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 63
- 230000008569 process Effects 0.000 claims abstract description 23
- 230000000977 initiatory effect Effects 0.000 claims description 7
- 238000012544 monitoring process Methods 0.000 claims description 7
- 238000004590 computer program Methods 0.000 claims description 5
- 238000004458 analytical method Methods 0.000 claims description 2
- 238000012423 maintenance Methods 0.000 abstract description 7
- 230000008859 change Effects 0.000 abstract description 5
- 238000012800 visualization Methods 0.000 abstract description 5
- 238000012545 processing Methods 0.000 description 7
- 230000003287 optical effect Effects 0.000 description 6
- 238000010586 diagram Methods 0.000 description 5
- 238000005516 engineering process Methods 0.000 description 3
- 230000007547 defect Effects 0.000 description 2
- 238000013461 design Methods 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 239000013307 optical fiber Substances 0.000 description 2
- 238000005457 optimization Methods 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 230000000644 propagated effect Effects 0.000 description 2
- 238000011160 research Methods 0.000 description 2
- 238000009825 accumulation Methods 0.000 description 1
- 238000003491 array Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 238000004088 simulation Methods 0.000 description 1
- 230000001131 transforming effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/40—Transformation of program code
- G06F8/41—Compilation
- G06F8/42—Syntactic analysis
- G06F8/427—Parsing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/17—Details of further file system functions
- G06F16/176—Support for shared access to files; File sharing support
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/25—Integrating or interfacing systems involving database management systems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/70—Software maintenance or management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Databases & Information Systems (AREA)
- Data Mining & Analysis (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a cross-service Mock data sharing and using method, a system, equipment and a storage medium, wherein the method comprises the following steps: acquiring the type of the rule and the return data in a mode of calling Mocker service through UI automatic engineering service; analyzing the type of the obtained rule and the return data to obtain content data with the rule being a Mock type; and calling the content data and using the content data in the process of writing and executing the UI automation use case. The invention can improve the execution efficiency of UI automation engineering, reduce the maintenance and management cost of redundant files, reduce the steps of automatic case compiling, change Mock data into visualization and enable the operation and the use to be simpler, more convenient and faster.
Description
Technical Field
The invention relates to the technical field of computers, in particular to a cross-service Mock data sharing and using method, a cross-service Mock data sharing and using system, cross-service Mock data sharing and using equipment and a cross-service Mock data sharing and using storage medium.
Background
Currently, when using Mock (simulation) data, UI automation stores the Mock data under a unified folder of an engineering directory, and needs to store, read and use the Mock data according to a unified storage rule. Once the Mock data accumulation becomes more and the data is huge, the Mock data not only occupies engineering resources and affects the execution efficiency, but also consumes certain manpower and resources for maintenance and application.
The above information is given as background information only to aid in understanding the present disclosure, and no determination or admission is made as to whether any of the above is available as prior art against the present disclosure.
Disclosure of Invention
The invention provides a cross-service Mock data sharing and using method, a cross-service Mock data sharing and using system, cross-service Mock data sharing and using equipment and a cross-service Mock data sharing and using storage medium, which are used for solving the defects of the prior art.
In order to achieve the above purpose, the present invention provides the following technical solutions:
in a first aspect, an embodiment of the present invention provides a method for sharing and using cross-service Mock data, where the method includes:
acquiring the type of the rule and the return data in a mode of calling Mocker service through UI automatic engineering service;
analyzing the type of the obtained rule and the return data to obtain content data with the rule being a Mock type;
and calling the content data and using the content data in the process of writing and executing the UI automation use case.
Further, in the method for sharing and using service Mock data, the step of obtaining the type of the rule and the return data by calling the Mocker service through the UI automation engineering service includes:
initiating an Http request by using UI automation engineering service to call a showRule () interface of the Mocker service so as to query a database of the Mocker service;
the type of the rule and the return data are obtained from a database of the Mocker service.
Further, in the method for sharing and using service Mock data, the step of calling and using the content data in the process of writing and executing the UI automation use case includes:
in the process of compiling and executing the UI automation use case, monitoring and intercepting an interface request of an interface needing to use Mock data through a proxy server, and transmitting the acquired content data to replace the intercepted return data;
and the UI automation use case checks the data and displays the UI by using the content data.
In a second aspect, an embodiment of the present invention provides a system for sharing and using cross-service Mock data, where the system includes:
the calling module is used for obtaining the type of the rule and the return data in a mode of calling Mocker service through UI automation engineering service;
the analysis module is used for analyzing the type of the obtained rule and the return data to obtain content data with the rule being a Mock type;
and the using module is used for calling and using the content data in the process of writing and executing the UI automation use case.
Further, in the cross-service Mock data sharing and using system, the calling module is specifically configured to:
initiating an Http request by using UI automation engineering service to call a showRule () interface of the Mocker service so as to query a database of the Mocker service;
the type of the rule and the return data are obtained from a database of the Mocker service.
Further, in the sharing and using system of cross-service Mock data, the using module is specifically configured to:
in the process of compiling and executing the UI automation use case, monitoring and intercepting an interface request of an interface needing to use Mock data through a proxy server, and transmitting the acquired content data to replace the intercepted return data;
and the UI automation use case checks the data and displays the UI by using the content data.
In a third aspect, an embodiment of the present invention provides a computer device, including a memory and a processor, where the memory stores a computer program, and the processor implements the method for sharing and using cross-service Mock data according to any one of the above aspects when executing the computer program.
In a fourth aspect, an embodiment of the present invention provides a storage medium containing computer-executable instructions, which are executed by a computer processor, to implement the method for shared use of cross-service Mock data according to any one of the above aspects.
The cross-service Mock data sharing and using method, the system, the equipment and the storage medium provided by the embodiment of the invention can improve the execution efficiency of UI automation engineering, reduce the maintenance and management cost of redundant files, reduce the steps of automatic case compiling, change Mock data into visualization and enable the operation and the use to be simpler, more convenient and faster.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without inventive exercise.
Fig. 1 is a schematic flowchart of a cross-service Mock data sharing method according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of a cross-service Mock data sharing and using method according to a second embodiment of the present invention;
fig. 3 is a schematic flowchart of a cross-service Mock data sharing and using method according to a third embodiment of the present invention;
fig. 4 is a functional module schematic diagram of a cross-service Mock data sharing and using system according to a fourth embodiment of the present invention.
Fig. 5 is a schematic structural diagram of a computer device according to a fifth embodiment of the present invention.
Detailed Description
In order to make the objects, features and advantages of the present invention more obvious and understandable, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the embodiments described below are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In the description of the present invention, it is to be understood that when an element is referred to as being "connected" to another element, it can be directly connected to the other element or intervening elements may also be present. When a component is referred to as being "disposed on" another component, it can be directly on the other component or intervening components may also be present.
Furthermore, the terms "long", "short", "inner", "outer", and the like indicate orientations or positional relationships based on those shown in the drawings, and are only for convenience of describing the present invention, but do not indicate or imply that the referred devices or elements must have the specific orientations, be configured to operate in the specific orientations, and thus are not to be construed as limitations of the present invention.
The technical scheme of the invention is further explained by the specific implementation mode in combination with the attached drawings.
Example one
In view of the defects of the prior art, the inventor of the invention actively researches and innovates based on abundant practical experience and professional knowledge in many years of the industry and by matching with the application of theory, so as to create a feasible cross-service Mock data sharing and using technology, and the technology has higher practicability. After continuous research, design and repeated trial and improvement, the invention with practical value is finally created.
Referring to fig. 1, fig. 1 is a schematic flowchart of a cross-service Mock data sharing and using method according to an embodiment of the present invention, where the method is suitable for a scenario where remote Mock data is shared and implemented, and the method is executed by a cross-service Mock data sharing and using system, which may be implemented by software and/or hardware and integrated inside a computer. As shown in fig. 1, the method for sharing and using cross-service Mock data may include the following steps:
s101, acquiring the type of the rule and the return data in a mode of calling Mocker service through UI automation engineering service.
Wherein the return data is Response.
It should be noted that the UI automation project calls the Mocker service through a specified parameter (rule ID ).
In addition, invoking the Mocker service specifically refers to invoking an interface of the Mocker service to be able to access and query a database of the Mocker service. The type of rule and the return data are stored in a database of the Mocker service.
S102, analyzing the type of the obtained rule and the return data, and obtaining content data with the rule being a Mock type.
Specifically, in this step, a rule with a Type equal to Mock is identified, and then content data with a current rule of Mock Type is acquired.
S103, calling and using the content data in the process of writing and executing the UI automation use case.
It should be noted that, in the step, specifically, in the process of writing and executing the UI automation use case, if there is Mock data that needs to be used, the obtained content data of Type — Mock is directly called for use.
The embodiment supports simultaneous use of single Mock data and multiple Mock data in one UI automation use case design, and also supports acquisition of Mock rule contents of Get and Post request modes.
The cross-service Mock data sharing and using method provided by the embodiment of the invention can improve the execution efficiency of UI automation engineering, reduce the maintenance and management cost of redundant files, reduce the steps of automatic case compiling, change Mock data into visualization and enable the operation and the use to be simpler, more convenient and faster.
Example two
As shown in fig. 2, the method for sharing and using cross-service Mock data according to the second embodiment of the present invention is further optimized in step S101 "obtaining the type of the rule and the return data in a manner of invoking the Mock service through the UI automation engineering service". Explanations of the same or corresponding terms as those of the above embodiments are omitted. Namely:
initiating an Http request by using UI automation engineering service to call a showRule () interface of the Mocker service so as to query a database of the Mocker service;
the type of the rule and the return data are obtained from a database of the Mocker service.
Based on the above optimization, as shown in fig. 2, the method for sharing and using cross-service Mock data provided by this embodiment may include the following steps:
s201, initiating an Http request through the UI automation engineering service to call a showRule () interface of the Mocker service so as to query a database of the Mocker service.
The Mocker service specifically refers to Appmocker, and the calling mode is that a UI automation program transmits a rule id.
S202, obtaining the type of the rule and the return data from the database of the Mocker service.
S203, analyzing the type of the obtained rule and the return data to obtain content data with the rule being a Mock type.
And S204, calling and using the content data in the process of writing and executing the UI automation use case.
The cross-service Mock data sharing and using method provided by the embodiment of the invention can improve the execution efficiency of UI automation engineering, reduce the maintenance and management cost of redundant files, reduce the steps of automatic case compiling, change Mock data into visualization and enable the operation and the use to be simpler, more convenient and faster.
EXAMPLE III
As shown in fig. 3, the method for sharing and using cross-service Mock data according to the third embodiment of the present invention is further optimized in step S103 "call and use the content data in the process of writing and executing UI automation use case" based on the technical solution provided in the first embodiment. Explanations of the same or corresponding terms as those of the above embodiments are omitted. Namely:
in the process of compiling and executing the UI automation use case, monitoring and intercepting an interface request of an interface needing to use Mock data through a proxy server, and transmitting the acquired content data to replace the intercepted return data.
And the UI automation use case checks the data and displays the UI by using the content data.
Based on the above optimization, as shown in fig. 3, the method for sharing and using cross-service Mock data provided by this embodiment may include the following steps:
s301, acquiring the type of the rule and the return data in a mode of calling Mocker service through UI automation engineering service.
S302, analyzing the type of the obtained rule and the return data, and obtaining content data with the rule being a Mock type.
S303, in the process of compiling and executing the UI automation use case, monitoring and intercepting an interface request of an interface needing to use Mock data through a proxy server, and transmitting the acquired content data to replace the intercepted return data.
The proxy server specifically refers to AppProxy.
And S304, the UI automation use case uses the content data to check data and display the UI.
The cross-service Mock data sharing and using method provided by the embodiment of the invention can reduce the maintenance of project local files, the data of a multi-service public database, interface the Mock data, update and check the Mock data in real time, facilitate the debugging of problems, improve the efficiency of executing automatic use cases and reduce the use of project resources.
Example four
Referring to fig. 4, fig. 4 is a diagram illustrating a cross-service Mock data sharing and using system according to a fourth embodiment of the present invention, where the system is adapted to execute the cross-service Mock data sharing and using method according to the fourth embodiment of the present invention. The system specifically comprises the following modules:
the calling module 401 is used for obtaining the type of the rule and the return data in a mode of calling the Mocker service through the UI automation engineering service;
an analyzing module 402, configured to analyze the type of the obtained rule and the returned data, and obtain content data of which the rule is a Mock type;
and the using module 403 is used for calling and using the content data in the process of writing and executing the UI automation use case.
Preferably, the invoking module 401 is specifically configured to:
initiating an Http request by using UI automation engineering service to call a showRule () interface of the Mocker service so as to query a database of the Mocker service;
the type of the rule and the return data are obtained from a database of the Mocker service.
Preferably, the using module 403 is specifically configured to:
in the process of compiling and executing the UI automation use case, monitoring and intercepting an interface request of an interface needing to use Mock data through a proxy server, and transmitting the acquired content data to replace the intercepted return data;
and the UI automation use case checks the data and displays the UI by using the content data.
The cross-service Mock data sharing and using system provided by the embodiment of the invention can improve the execution efficiency of UI automation engineering, reduce the maintenance and management cost of redundant files, reduce the steps of automatic case compiling, change Mock data into visualization and enable the operation and the use to be simpler, more convenient and faster.
The product can execute the method provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method.
EXAMPLE five
Fig. 5 is a schematic structural diagram of a computer device according to a fifth embodiment of the present invention. FIG. 5 illustrates a block diagram of an exemplary computer device 12 suitable for use in implementing embodiments of the present invention. The computer device 12 shown in FIG. 5 is only an example and should not bring any limitations to the functionality or scope of use of embodiments of the present invention.
As shown in FIG. 5, computer device 12 is in the form of a general purpose computing device. The components of computer device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that couples various system components including the system memory 28 and the processing unit 16.
The system memory 28 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM)30 and/or cache memory 32. Computer device 12 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 34 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 5, and commonly referred to as a "hard drive"). Although not shown in FIG. 5, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 18 by one or more data media interfaces. Memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
A program/utility 40 having a set (at least one) of program modules 42 may be stored, for example, in memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. Program modules 42 generally carry out the functions and/or methodologies of the described embodiments of the invention.
The processing unit 16 executes various functional applications and data processing by running programs stored in the system memory 28, for example, implementing a shared use method of cross-service Mock data provided by the embodiment of the present invention.
That is, the processing unit implements, when executing the program: acquiring the type of the rule and the return data in a mode of calling Mocker service through UI automatic engineering service; analyzing the type of the obtained rule and the return data to obtain content data with the rule being a Mock type; and calling the content data and using the content data in the process of writing and executing the UI automation use case.
EXAMPLE six
The sixth embodiment of the present invention provides a computer-readable storage medium, on which computer-executable instructions are stored, and when the instructions are executed by a processor, the method for sharing and using cross-service Mock data according to the embodiments of the present invention includes:
that is, the processing unit implements, when executing the program: transforming a plug-in of a Clang compiler; acquiring the type of the rule and the return data in a mode of calling Mocker service through UI automatic engineering service; analyzing the type of the obtained rule and the return data to obtain content data with the rule being a Mock type; and calling the content data and using the content data in the process of writing and executing the UI automation use case.
Any combination of one or more computer-readable media may be employed. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The foregoing description of the embodiments has been presented for the purposes of illustration and description. It is not intended to be exhaustive or to limit the disclosure. Individual elements or features of a particular embodiment are generally not limited to that particular embodiment, but, where applicable, are interchangeable and can be used in a selected embodiment, even if not specifically shown or described. The same elements or features may also vary in many respects. Such variations are not to be regarded as a departure from the disclosure, and all such modifications are intended to be included within the scope of the disclosure.
Example embodiments are provided so that this disclosure will be thorough and will fully convey the scope to those skilled in the art. Numerous details are set forth, such as examples of specific parts, devices, and methods, in order to provide a thorough understanding of embodiments of the present disclosure. It will be apparent to those skilled in the art that specific details need not be employed, that example embodiments may be embodied in many different forms and that neither should be construed to limit the scope of the disclosure. In certain example embodiments, well-known processes, well-known device structures, and well-known technologies are not described in detail.
The terminology used herein is for the purpose of describing particular example embodiments only and is not intended to be limiting. As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. The terms "comprises" and "comprising" are intended to be inclusive and therefore specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof. The method steps, processes, and operations described herein are not to be construed as necessarily requiring their performance in the particular order discussed and illustrated, unless explicitly indicated as an order of performance. It should also be understood that additional or alternative steps may be employed.
When an element or layer is referred to as being "on" … … "," engaged with "… …", "connected to" or "coupled to" another element or layer, it can be directly on, engaged with, connected to or coupled to the other element or layer, or intervening elements or layers may also be present. In contrast, when an element or layer is referred to as being "directly on … …," "directly engaged with … …," "directly connected to" or "directly coupled to" another element or layer, there may be no intervening elements or layers present. Other words used to describe the relationship of elements should be interpreted in a similar manner (e.g., "between … …" and "directly between … …", "adjacent" and "directly adjacent", etc.). As used herein, the term "and/or" includes any and all combinations of one or more of the associated listed items. Although the terms first, second, third, etc. may be used herein to describe various elements, components, regions, layers and/or sections, these elements, components, regions, layers and/or sections should not be limited by these terms. These terms may be only used to distinguish one element, component, region or section from another element, component, region or section. Unless clearly indicated by the context, use of terms such as the terms "first," "second," and other numerical values herein does not imply a sequence or order. Thus, a first element, component, region, layer or section discussed below could be termed a second element, component, region, layer or section without departing from the teachings of the example embodiments.
Spatially relative terms, such as "inner," "outer," "below," "… …," "lower," "above," "upper," and the like, may be used herein for ease of description to describe a relationship between one element or feature and one or more other elements or features as illustrated in the figures. Spatially relative terms may be intended to encompass different orientations of the device in addition to the orientation depicted in the figures. For example, if the device in the figures is turned over, elements described as "below" or "beneath" other elements or features would then be oriented "above" the other elements or features. Thus, the example term "below … …" can encompass both an orientation of facing upward and downward. The device may be otherwise oriented (rotated 90 degrees or at other orientations) and the spatially relative descriptors used herein interpreted.
Claims (8)
1. A method for sharing and using cross-service Mock data is characterized by comprising the following steps:
acquiring the type of the rule and the return data in a mode of calling Mocker service through UI automatic engineering service;
analyzing the type of the obtained rule and the return data to obtain content data with the rule being a Mock type;
and calling the content data and using the content data in the process of writing and executing the UI automation use case.
2. The method for sharing and using cross-service Mock data according to claim 1, wherein said step of obtaining the type of the rule and the return data by means of invoking the Mocker service by the UI automation engineering service comprises:
initiating an Http request by using UI automation engineering service to call a showRule () interface of the Mocker service so as to query a database of the Mocker service;
the type of the rule and the return data are obtained from a database of the Mocker service.
3. The method for sharing and using cross-service Mock data according to claim 1, wherein said step of calling and using said content data in the process of writing and executing UI automation use case comprises:
in the process of compiling and executing the UI automation use case, monitoring and intercepting an interface request of an interface needing to use Mock data through a proxy server, and transmitting the acquired content data to replace the intercepted return data;
and the UI automation use case checks the data and displays the UI by using the content data.
4. A system for shared use of cross-service Mock data, the system comprising:
the calling module is used for obtaining the type of the rule and the return data in a mode of calling Mocker service through UI automation engineering service;
the analysis module is used for analyzing the type of the obtained rule and the return data to obtain content data with the rule being a Mock type;
and the using module is used for calling and using the content data in the process of writing and executing the UI automation use case.
5. The system for sharing and using cross-service Mock data according to claim 4, wherein the calling module is specifically configured to:
initiating an Http request by using UI automation engineering service to call a showRule () interface of the Mocker service so as to query a database of the Mocker service;
the type of the rule and the return data are obtained from a database of the Mocker service.
6. The system for sharing and using cross-service Mock data according to claim 4, wherein said usage module is specifically configured to:
in the process of compiling and executing the UI automation use case, monitoring and intercepting an interface request of an interface needing to use Mock data through a proxy server, and transmitting the acquired content data to replace the intercepted return data;
and the UI automation use case checks the data and displays the UI by using the content data.
7. A computer device comprising a memory and a processor, the memory storing a computer program, wherein the processor when executing the computer program implements the method for shared use of cross-service Mock data according to any of claims 1 to 3.
8. A storage medium containing computer executable instructions for execution by a computer processor to implement the method of shared use of cross-service Mock data according to any of claims 1 to 3.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011583869.5A CN112711421B (en) | 2020-12-28 | 2020-12-28 | Cross-service Mock data sharing use method, system, equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011583869.5A CN112711421B (en) | 2020-12-28 | 2020-12-28 | Cross-service Mock data sharing use method, system, equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112711421A true CN112711421A (en) | 2021-04-27 |
CN112711421B CN112711421B (en) | 2024-04-19 |
Family
ID=75545936
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011583869.5A Active CN112711421B (en) | 2020-12-28 | 2020-12-28 | Cross-service Mock data sharing use method, system, equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112711421B (en) |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120254258A1 (en) * | 2011-03-31 | 2012-10-04 | International Business Machines Corporation | Initializing a multi-tenant database |
CN106528400A (en) * | 2016-09-22 | 2017-03-22 | 深圳峰创智诚科技有限公司 | MOCK testing method and device |
CN108268570A (en) * | 2017-01-04 | 2018-07-10 | 武汉斗鱼网络科技有限公司 | A kind of method and device of development interface |
CN108345543A (en) * | 2018-03-02 | 2018-07-31 | 财付通支付科技有限公司 | A kind of data processing method, device, equipment and storage medium |
CN109768951A (en) * | 2018-08-17 | 2019-05-17 | 付东光 | Remote analog data method and remote dummy server |
CN110147326A (en) * | 2019-05-23 | 2019-08-20 | 四川新网银行股份有限公司 | Micro services automated testing method based on Redis database |
CN110716919A (en) * | 2019-09-23 | 2020-01-21 | 贝壳技术有限公司 | Mock testing method, Mock testing device and storage medium |
CN111324525A (en) * | 2018-12-14 | 2020-06-23 | 北京奇虎科技有限公司 | Method and device for processing Mock service and Mock service system |
-
2020
- 2020-12-28 CN CN202011583869.5A patent/CN112711421B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120254258A1 (en) * | 2011-03-31 | 2012-10-04 | International Business Machines Corporation | Initializing a multi-tenant database |
CN106528400A (en) * | 2016-09-22 | 2017-03-22 | 深圳峰创智诚科技有限公司 | MOCK testing method and device |
CN108268570A (en) * | 2017-01-04 | 2018-07-10 | 武汉斗鱼网络科技有限公司 | A kind of method and device of development interface |
CN108345543A (en) * | 2018-03-02 | 2018-07-31 | 财付通支付科技有限公司 | A kind of data processing method, device, equipment and storage medium |
CN109768951A (en) * | 2018-08-17 | 2019-05-17 | 付东光 | Remote analog data method and remote dummy server |
CN111324525A (en) * | 2018-12-14 | 2020-06-23 | 北京奇虎科技有限公司 | Method and device for processing Mock service and Mock service system |
CN110147326A (en) * | 2019-05-23 | 2019-08-20 | 四川新网银行股份有限公司 | Micro services automated testing method based on Redis database |
CN110716919A (en) * | 2019-09-23 | 2020-01-21 | 贝壳技术有限公司 | Mock testing method, Mock testing device and storage medium |
Non-Patent Citations (1)
Title |
---|
邓仲哲: "基于 HTTP 请求拦截,快速解决跨域和代理 Mock", pages 1 - 6, Retrieved from the Internet <URL:《https://mp.weixin.qq.com/s/a9mEHf8syb9zF4f-Op-ViA》> * |
Also Published As
Publication number | Publication date |
---|---|
CN112711421B (en) | 2024-04-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108140007B (en) | Securely deploying applications across deployment locations | |
CN109413140B (en) | Remote automatic upgrading method for PACS server | |
CN113515271B (en) | Service code generation method and device, electronic equipment and readable storage medium | |
CN113419740B (en) | Program data stream analysis method and device, electronic equipment and readable storage medium | |
CN111694866A (en) | Data searching and storing method, data searching system, data searching device, data searching equipment and data searching medium | |
CN112256406B (en) | Operation flow platformization scheduling method | |
CN113010542A (en) | Service data processing method and device, computer equipment and storage medium | |
CN113962597A (en) | Data analysis method and device, electronic equipment and storage medium | |
CN116244387A (en) | Entity relationship construction method, device, electronic equipment and storage medium | |
CN111949484A (en) | Information processing method, information processing apparatus, electronic device, and medium | |
CN115712422A (en) | Form page generation method and device, computer equipment and storage medium | |
CN113625998B (en) | Request processing method and device | |
CN113076224B (en) | Data backup method, data backup system, electronic device and readable storage medium | |
CN114116509A (en) | Program analysis method, program analysis device, electronic device, and storage medium | |
CN117271122A (en) | Task processing method, device, equipment and storage medium based on separation of CPU and GPU | |
CN116450723A (en) | Data extraction method, device, computer equipment and storage medium | |
CN114237765B (en) | Functional component processing method, device, electronic equipment and medium | |
CN112711421B (en) | Cross-service Mock data sharing use method, system, equipment and storage medium | |
CN113392014B (en) | Test case generation method, device, electronic equipment and medium | |
CN115033634A (en) | Data acquisition method, data acquisition device, electronic equipment and medium | |
CN115562662A (en) | Application page creating method and device, computer equipment and storage medium | |
CN113391903A (en) | Method and device for establishing schedulability model, electronic equipment and storage medium | |
CN114201508A (en) | Data processing method, data processing apparatus, electronic device, and storage medium | |
CN114371886A (en) | Front-end frame assembly conversion method and device, computer equipment and storage medium | |
CN112711566B (en) | Cross-service modification data sharing use method, system, equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |