CN117493359A - Mock data updating method and device, storage medium and computer equipment - Google Patents

Mock data updating method and device, storage medium and computer equipment Download PDF

Info

Publication number
CN117493359A
CN117493359A CN202311440138.9A CN202311440138A CN117493359A CN 117493359 A CN117493359 A CN 117493359A CN 202311440138 A CN202311440138 A CN 202311440138A CN 117493359 A CN117493359 A CN 117493359A
Authority
CN
China
Prior art keywords
data
mock data
mock
condition
updated
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.)
Pending
Application number
CN202311440138.9A
Other languages
Chinese (zh)
Inventor
林俊杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Pinwei Software Co Ltd
Original Assignee
Guangzhou Pinwei Software Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Guangzhou Pinwei Software Co Ltd filed Critical Guangzhou Pinwei Software Co Ltd
Priority to CN202311440138.9A priority Critical patent/CN117493359A/en
Publication of CN117493359A publication Critical patent/CN117493359A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • G06F16/2379Updates performed during online database operations; commit processing
    • G06F16/2386Bulk updating operations
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application provides a Mock data updating method, a Mock data updating device, a storage medium and computer equipment, wherein the method comprises the following steps: acquiring each preset update triggering condition; judging whether a Mock data set is required to be updated according to each update triggering condition, wherein the Mock data set comprises a plurality of original Mock data; if the Mock data set needs to be updated, determining a data composition rule according to each original Mock data, capturing data meeting the data composition rule from the online as each target Mock data, and replacing each original Mock data by each target Mock data. By adopting the scheme, the Mock data can be automatically updated in batches, so that the data maintenance efficiency can be improved, and the data updating efficiency can be improved.

Description

Mock data updating method and device, storage medium and computer equipment
Technical Field
The present disclosure relates to the field of application testing technologies, and in particular, to a Mock data updating method, a Mock data updating device, a storage medium, and a computer device.
Background
When the application program is formally online or the problem is subjected to traceability analysis, the application program can be tested through a plurality of pieces of Mock data, the performance of the application program on each piece of Mock data is obtained, and then the program test is realized. In order to simulate the actual scenario in the test to get the performance of the application in the actual application, the Mock data should meet certain interface specification requirements.
In order to avoid inaccurate test results caused by the fact that the Mock data is maintained unchanged, the Mock data needs to be updated in the actual process, so that the Mock data can be changed. Because of the large amount of Mock data, it is highly desirable to provide a scheme that can efficiently update Mock data.
Disclosure of Invention
The object of the present application is to solve at least one of the above technical drawbacks, in particular the technical drawbacks of the prior art, such as the low update efficiency.
In a first aspect, an embodiment of the present application provides a Mock data updating method, where the method includes:
acquiring each preset update triggering condition;
judging whether a Mock data set is required to be updated according to each update triggering condition, wherein the Mock data set comprises a plurality of original Mock data;
if the Mock data set needs to be updated, determining a data composition rule according to each original Mock data, capturing data meeting the data composition rule from the online as each target Mock data, and replacing each original Mock data by each target Mock data.
In one embodiment, the step of determining the data composition rule according to each original Mock data includes:
determining target API interface identifiers corresponding to the original Mock data, and determining the data composition rule according to at least one target API interface identifier; and the data composition rule is used for judging whether the API interface identifier corresponding to the data is the at least one target API interface identifier.
In one embodiment, the step of replacing each of the original Mock data with each of the target Mock data includes:
and determining to-be-replaced Mock data with the same API interface identification corresponding to the target Mock data in each original Mock data aiming at each target Mock data, and replacing the to-be-replaced Mock data with the target Mock data.
In one embodiment, the step of determining whether the Mock dataset needs to be updated according to each update triggering condition includes:
when the total condition number of each update trigger condition is greater than or equal to 2, determining the priority of each update trigger condition;
and if the update triggering condition with the highest priority is not met, determining that the Mock data set does not need to be updated.
In one embodiment, the step of determining whether the Mock dataset needs to be updated according to each update triggering condition further includes:
if the update triggering condition with the highest priority is met, determining that the Mock data set needs to be updated; or,
and if the update trigger condition with the highest priority is met, determining that the Mock data set needs to be updated under the condition that the rest update trigger conditions are met.
In one embodiment, the update trigger condition includes any one or any combination of the following:
the updating time condition is used for judging whether the current time is later than a preset starting updating time and earlier than a preset ending updating time;
the updated time length condition is used for judging whether the current updated time length is smaller than a preset time length threshold value or not;
the interface condition to be updated is used for judging whether at least one original Mock data corresponds to a first preset API interface identifier or not;
and the start-stop interface condition is used for starting updating when the data corresponding to the second preset API interface identifier is grabbed from the line and stopping updating when the data corresponding to the third preset API interface identifier is grabbed from the line.
In one embodiment, the method further comprises:
and returning to the current Mock data set under the condition of receiving a Mock data set acquisition request.
In a second aspect, an embodiment of the present application provides a Mock data updating apparatus, where the apparatus includes:
the condition acquisition module is used for acquiring each preset update triggering condition;
the judging module is used for judging whether a Mock data set needs to be updated according to each update triggering condition, wherein the Mock data set comprises a plurality of original Mock data;
and the data replacement module is used for determining a data composition rule according to each original Mock data under the condition that the Mock data set needs to be updated, capturing data meeting the data composition rule from the line as each target Mock data, and replacing each original Mock data by each target Mock data.
In a third aspect, embodiments of the present application provide a storage medium having stored therein computer readable instructions that, when executed by one or more processors, cause the one or more processors to perform the steps of the Mock data updating method described in any of the above embodiments.
In a fourth aspect, embodiments of the present application provide a computer device, comprising: one or more processors, and memory;
the memory has stored therein computer readable instructions which, when executed by the one or more processors, perform the steps of the Mock data updating method of any of the embodiments described above.
In the Mock data updating method, the Mock data updating device, the storage medium and the computer equipment, the computer equipment can acquire each preset updating triggering condition and judge whether the Mock data set needs to be updated according to each updating triggering condition. If the data needs to be updated, the computer equipment can grasp the data meeting the data composition rule from the line as target Mock data according to the determined data composition rule, and replace the original Mock data in the Mock data set by adopting the target Mock data. Therefore, the Mock data can be automatically updated in batches, so that the data maintenance efficiency can be improved, and the data updating efficiency can be improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive faculty for a person skilled in the art.
FIG. 1 is a flow chart of a method for updating Mock data in one embodiment;
FIG. 2 is a schematic diagram of a Mock data updating device according to an embodiment;
FIG. 3 is an internal block diagram of a computer device in one embodiment.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
In one embodiment, the Mock data updating method provided by the embodiment of the application can be applied to computer equipment. Computer devices as described herein refer to devices of specific data processing functionality, and may be, but are not limited to, various servers, personal computers, and notebook computers.
In one embodiment, as shown in fig. 1, the present application provides a Mock data updating method, which specifically may include the following steps:
s102: acquiring each preset update triggering condition;
s104: judging whether a Mock data set is required to be updated according to each update triggering condition, wherein the Mock data set comprises a plurality of original Mock data;
s106: if the Mock data set needs to be updated, determining a data composition rule according to each original Mock data, capturing data meeting the data composition rule from the online as each target Mock data, and replacing each original Mock data by each target Mock data.
The condition content of each update triggering condition may be preset by a technician, and the number of each update triggering condition may be one or more, which is not specifically limited herein.
Specifically, the computer device may determine, according to each preset update trigger condition, whether data update is required for the Mock data set, that is, whether the original Mock data in the Mock data set needs to be replaced with new Mock data. If the data needs to be updated, the computer equipment can determine the data composition rule according to each original Mock data in the Mock data set. The data composition rule is used to indicate a data composition requirement of the target Mock data for replacing the original Mock data. The computer equipment can grab online data in real time, namely grab the current data on the online, and take the data meeting the requirement of the data composition as target Mock data. Further, if the fetched inline data does not meet the data composition requirements, it may be discarded.
After the target Mock data is obtained, the computer equipment can replace the original Mock data in the Mock data set with the target Mock data so as to realize batch updating of the Mock data. In one embodiment, the Mock data updating method of the present application further includes: and returning to the current Mock data set under the condition of receiving a Mock data set acquisition request. That is, when the front-end device requests to acquire a Mock dataset, the computer device may return the updated Mock dataset to the front-end device.
In the application, the computer device may acquire each preset update triggering condition, and determine whether the Mock dataset needs to be updated according to each update triggering condition. If the data needs to be updated, the computer equipment can grasp the data meeting the data composition rule from the line as target Mock data according to the determined data composition rule, and replace the original Mock data in the Mock data set by adopting the target Mock data. Therefore, the Mock data can be automatically updated in batches, so that the data maintenance efficiency can be improved, and the data updating efficiency can be improved.
In one embodiment, the step of determining a data composition rule according to each of the original Mock data includes: determining target API interface identifiers corresponding to the original Mock data, and determining the data composition rule according to at least one target API interface identifier; and the data composition rule is used for judging whether the API interface identifier corresponding to the data is the at least one target API interface identifier.
Specifically, considering that the test objects, test data structures, response data structures and/or test logic corresponding to different API interface identifiers are somewhat different, in the process of updating the Mock data, the process needs to be performed in combination with the API interface identifier corresponding to the original Mock data, so as to improve the capturing efficiency of the target Mock data.
Specifically, the computer device may determine an API interface identifier corresponding to each original Mock data in the Mock data set, and use the API interface identifier corresponding to each original Mock data as the target API interface identifier. The computer device may determine a data composition rule according to each target API interface identifier, so as to determine, according to the data composition rule, whether the API interface identifier corresponding to the data captured on the line is the same as one of the target API interface identifiers, and further determine whether the data captured on the line is target Mock data.
It should be noted that the computer device may select one or more target API interfaces to generate a data composition rule, in which case the data composition rule may be used to determine whether the data captured from the online is the same as one of the selected target API interfaces. If yes, the data can be determined to meet the data composition rule, otherwise, the data is determined to not meet the data composition rule.
In one embodiment, the step of replacing each of the original Mock data with each of the target Mock data includes: and determining to-be-replaced Mock data with the same API interface identification corresponding to the target Mock data in each original Mock data aiming at each target Mock data, and replacing the to-be-replaced Mock data with the target Mock data.
Specifically, considering that the test objects, test data structures, response data structures and/or test logic corresponding to different API interface identifiers are somewhat different, when data is replaced, the original Mock data before replacement and the target Mock data after replacement should correspond to the same API interface identifier, so as to avoid affecting the accuracy of subsequent test results due to erroneous replacement of test data.
Whenever target Mock data conforming to the data composition rule is grabbed from the line, the computer device may determine original Mock data corresponding to the same API interface identifier as the target Mock data in the Mock data set, and use the original Mock data as Mock data to be replaced. Further, if the Mock data set has a plurality of original Mock data corresponding to the same API interface identifier with the target Mock data, one of the original Mock data may be selected as the Mock data to be replaced according to the time information corresponding to each of the original Mock data. For example, the original Mock data that was added earliest to the Mock data set or whose time information was earliest may be used as the Mock data to be replaced.
After determining the to-be-replaced Mock data, the computer device may replace the to-be-replaced Mock data with the target Mock data such that the replaced Mock data set includes the target Mock data and does not include the to-be-replaced Mock data.
In one embodiment, the step of determining whether the Mock dataset needs to be updated according to each update triggering condition includes:
when the total condition number of each update trigger condition is greater than or equal to 2, determining the priority of each update trigger condition;
and if the update triggering condition with the highest priority is not met, determining that the Mock data set does not need to be updated.
Specifically, when the computer device acquires a plurality of update trigger conditions, since the condition content of each update trigger condition is different from each other, the computer device may determine the priority of each update trigger condition, so as to determine whether or not update of the Mock data set is required based on the priority later. If the highest priority update trigger condition is not met, it may be determined that the Mock dataset does not need to be updated. Therefore, whether the Mock data needs to be updated at present can be accurately judged.
For example, the computer device may obtain a first update trigger condition and a second update trigger condition, and the first update trigger condition has a higher priority than the second update trigger condition. Then, in the event that the first update trigger condition is not satisfied, the computer device may determine that the Mock data need not be updated even if the second update trigger condition is satisfied.
In one embodiment, the step of determining whether the Mock dataset needs to be updated according to each update triggering condition further includes:
if the update triggering condition with the highest priority is met, determining that the Mock data set needs to be updated; or,
and if the update trigger condition with the highest priority is met, determining that the Mock data set needs to be updated under the condition that the rest update trigger conditions are met.
In particular, when the highest priority update trigger condition is met, the computer device may directly determine that a data update is required and update the Mock dataset according to the procedures described in other embodiments herein. Or, the computer device may further determine whether the remaining update trigger conditions are satisfied, except for the update trigger condition with the highest priority, and determine to update the Mock dataset if the remaining update trigger conditions are satisfied.
In one embodiment, the respective update trigger conditions may include any one or any combination of the following: update time condition, update duration condition, interface condition to be updated and start-stop interface condition.
The update time condition is an update condition judged according to the current time, and specifically, the update time condition may include a preset start update time and an end update time. If the current time is later than the start update time and earlier than the end update time, it may be determined that the update time condition is satisfied. If the current time is earlier than the start update time or later than the end update time, it may be determined that the update time condition is not satisfied.
The update time period condition is an update condition that is judged according to the continuous update time period that has been performed. Specifically, the update time period condition may be preconfigured with a time period threshold, and if the current updated time period is less than the time period threshold, it may be determined that the update time period condition is satisfied. If the current updated time length is greater than or equal to the time length threshold, it may be determined that the update time length condition is not satisfied.
The interface condition to be updated is a condition for judging Mock data to be updated according to the first preset API (Application Programming Interface ) interface identifier. Specifically, each piece of Mock data includes an API interface identifier corresponding to the Mock data, where the API interface identifier is used to indicate a source server or a destination server of the Mock data. The computer device may determine whether at least one piece of original Mock data exists in the Mock data set corresponding to a first preset API interface identifier. If yes, the condition of the interface to be updated can be determined to be met, and in the process of updating the Mock data, the computer equipment can replace the original Mock data corresponding to the first preset API interface identifier by adopting the target Mock data. If all the API interface identifiers corresponding to the original Mock data in the Mock data set are not the first preset API interface identifiers, the condition of the interface to be updated is determined not to be met.
The start-stop interface condition is an update condition for judging according to an API interface identifier corresponding to real-time data captured from the line. Specifically, if the computer device captures data corresponding to the second preset API interface identifier from online, it may be determined that the start-stop interface condition is satisfied. If the computer equipment grabs the data corresponding to the third preset API interface identifier from the line, the condition that the start-stop interface condition is not met can be determined. Further, when the update is configured with only the initial interface condition, the computer device may start the update when capturing the data corresponding to the second preset API interface identifier from online, and stop the update when capturing the data corresponding to the third preset API interface identifier from online.
The Mock data updating device provided in the embodiments of the present application is described below, and the Mock data updating device described below and the Mock data updating method described above may be referred to correspondingly.
In one embodiment, the present application provides a Mock data updating device 200. As shown in fig. 2, the apparatus 200 includes a condition acquisition module 210, a determination module 220, and a data replacement module 230. Wherein:
the condition acquisition module 210 is configured to acquire each preset update trigger condition;
a judging module 220, configured to judge whether a Mock dataset needs to be updated according to each update triggering condition, where the Mock dataset includes a plurality of original Mock data;
and the data replacing module 230 is configured to determine a data composition rule according to each original Mock data, and grasp data satisfying the data composition rule from online as each target Mock data, and replace each original Mock data with each target Mock data, if the Mock data set needs to be updated.
In one embodiment, the data replacement module 230 of the present application includes a rule determination unit. The rule determining unit is used for determining target API interface identifiers corresponding to the original Mock data and determining the data composition rule according to at least one target API interface identifier; and the data composition rule is used for judging whether the API interface identifier corresponding to the data is the at least one target API interface identifier.
In one embodiment, the data replacement module 230 of the present application further includes a replacement unit. The replacing unit is used for determining to-be-replaced Mock data with the same API interface identification corresponding to the target Mock data in each original Mock data according to each target Mock data, and replacing the to-be-replaced Mock data with the target Mock data.
In one embodiment, the determination module 220 of the present application includes a priority determination unit and a first determination unit. The priority determining unit is used for determining the priority of each update trigger condition when the total condition number of each update trigger condition is greater than or equal to 2. And the first judging unit is used for determining that the Mock data set does not need to be updated if the update triggering condition with the highest priority is not met.
In one embodiment, the determining module 220 of the present application further includes a second determining unit or a third determining unit. And the second judging unit is used for determining that the Mock data set needs to be updated if the update triggering condition with the highest priority is met. And the third judging unit is used for determining that the Mock data set needs to be updated under the condition that the rest update trigger conditions are met if the update trigger condition with the highest priority is met.
In one embodiment, the update trigger condition includes any one or any combination of the following:
the updating time condition is used for judging whether the current time is later than a preset starting updating time and earlier than a preset ending updating time;
the updated time length condition is used for judging whether the current updated time length is smaller than a preset time length threshold value or not;
the interface condition to be updated is used for judging whether at least one original Mock data corresponds to a first preset API interface identifier or not;
and the start-stop interface condition is used for starting updating when the data corresponding to the second preset API interface identifier is grabbed from the line and stopping updating when the data corresponding to the third preset API interface identifier is grabbed from the line.
In one embodiment, the present application also provides a storage medium having stored therein computer readable instructions which, when executed by one or more processors, cause the one or more processors to perform the steps of the Mock data updating method as in any embodiment.
In one embodiment, the present application also provides a computer device having stored therein computer readable instructions that, when executed by one or more processors, cause the one or more processors to perform the steps of the Mock data updating method as in any embodiment.
Schematically, fig. 3 is a schematic internal structure of a computer device provided in an embodiment of the present application, where in an example, the computer device may be a server. Referring to FIG. 3, computer device 900 includes a processing component 902 that further includes one or more processors, and memory resources represented by memory 901, for storing instructions, such as applications, executable by processing component 902. The application program stored in the memory 901 may include one or more modules each corresponding to a set of instructions. Further, the processing component 902 is configured to execute instructions to perform the steps of the methods described in any of the embodiments above.
The computer device 900 may also include a power component 903 configured to perform power management of the computer device 900, a wired or wireless network interface 904 configured to connect the computer device 900 to a network, and an input output (I/O) interface 905. The computer device 900 may operate based on an operating system stored in memory 901, such as Windows Server TM, mac OS XTM, unix, linux, free BSDTM, or the like.
It will be appreciated by those skilled in the art that the internal structure of the computer device shown in the present application is merely a block diagram of some of the structures related to the aspects of the present application and does not constitute a limitation of the computer device to which the aspects of the present application apply, and that a particular computer device may include more or less components than those shown in the figures, or may combine some of the components, or have a different arrangement of the components.
Finally, it is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element. Herein, "a," "an," "the," and "the" may also include plural forms, unless the context clearly indicates otherwise. Plural means at least two cases such as 2, 3, 5 or 8, etc. "and/or" includes any and all combinations of the associated listed items.
In the present specification, each embodiment is described in a progressive manner, and each embodiment focuses on the difference from other embodiments, and may be combined according to needs, and the same similar parts may be referred to each other.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A method for updating Mock data, the method comprising:
acquiring each preset update triggering condition;
judging whether a Mock data set is required to be updated according to each update triggering condition, wherein the Mock data set comprises a plurality of original Mock data;
if the Mock data set needs to be updated, determining a data composition rule according to each original Mock data, capturing data meeting the data composition rule from the online as each target Mock data, and replacing each original Mock data by each target Mock data.
2. The Mock data updating method according to claim 1, wherein the step of determining a data composition rule from each of the original Mock data comprises:
determining target API interface identifiers corresponding to the original Mock data, and determining the data composition rule according to at least one target API interface identifier; and the data composition rule is used for judging whether the API interface identifier corresponding to the data is the at least one target API interface identifier.
3. The Mock data updating method according to claim 2, wherein the step of replacing each of the original Mock data with each of the target Mock data comprises:
and determining to-be-replaced Mock data with the same API interface identification corresponding to the target Mock data in each original Mock data aiming at each target Mock data, and replacing the to-be-replaced Mock data with the target Mock data.
4. The Mock data updating method according to claim 1, wherein the step of determining whether the Mock data set needs to be updated according to each of the update trigger conditions comprises:
when the total condition number of each update trigger condition is greater than or equal to 2, determining the priority of each update trigger condition;
and if the update triggering condition with the highest priority is not met, determining that the Mock data set does not need to be updated.
5. The Mock data updating method of claim 4 wherein the step of determining whether a Mock data set is required to be updated according to each of the update trigger conditions further comprises:
if the update triggering condition with the highest priority is met, determining that the Mock data set needs to be updated; or,
and if the update trigger condition with the highest priority is met, determining that the Mock data set needs to be updated under the condition that the rest update trigger conditions are met.
6. The Mock data updating method according to any one of claims 1 to 5, wherein the update trigger conditions include any one or any combination of the following:
the updating time condition is used for judging whether the current time is later than a preset starting updating time and earlier than a preset ending updating time;
the updated time length condition is used for judging whether the current updated time length is smaller than a preset time length threshold value or not;
the interface condition to be updated is used for judging whether at least one original Mock data corresponds to a first preset API interface identifier or not;
and the start-stop interface condition is used for starting updating when the data corresponding to the second preset API interface identifier is grabbed from the line and stopping updating when the data corresponding to the third preset API interface identifier is grabbed from the line.
7. The Mock data updating method according to any one of claims 1 to 5, further comprising:
and returning to the current Mock data set under the condition of receiving a Mock data set acquisition request.
8. A Mock data updating apparatus, the apparatus comprising:
the condition acquisition module is used for acquiring each preset update triggering condition;
the judging module is used for judging whether a Mock data set needs to be updated according to each update triggering condition, wherein the Mock data set comprises a plurality of original Mock data;
and the data replacement module is used for determining a data composition rule according to each original Mock data under the condition that the Mock data set needs to be updated, capturing data meeting the data composition rule from the line as each target Mock data, and replacing each original Mock data by each target Mock data.
9. A storage medium having stored therein computer readable instructions which, when executed by one or more processors, cause the one or more processors to perform the steps of the Mock data updating method of any one of claims 1 to 7.
10. A computer device, comprising: one or more processors, and memory;
stored in the memory are computer readable instructions which, when executed by the one or more processors, perform the steps of the Mock data updating method of any one of claims 1 to 7.
CN202311440138.9A 2023-10-31 2023-10-31 Mock data updating method and device, storage medium and computer equipment Pending CN117493359A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311440138.9A CN117493359A (en) 2023-10-31 2023-10-31 Mock data updating method and device, storage medium and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311440138.9A CN117493359A (en) 2023-10-31 2023-10-31 Mock data updating method and device, storage medium and computer equipment

Publications (1)

Publication Number Publication Date
CN117493359A true CN117493359A (en) 2024-02-02

Family

ID=89680847

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311440138.9A Pending CN117493359A (en) 2023-10-31 2023-10-31 Mock data updating method and device, storage medium and computer equipment

Country Status (1)

Country Link
CN (1) CN117493359A (en)

Similar Documents

Publication Publication Date Title
US11513846B1 (en) Distributed data acquisition, indexing and search system
CN108984388B (en) Method and terminal equipment for generating automatic test case
KR102201919B1 (en) Random forest model training method, electronic device and storage medium
CN109543891B (en) Method and apparatus for establishing capacity prediction model, and computer-readable storage medium
CN111522728A (en) Method for generating automatic test case, electronic device and readable storage medium
CN111654495B (en) Method, apparatus, device and storage medium for determining traffic generation source
WO2019148657A1 (en) Method for testing associated environments, electronic device and computer readable storage medium
CN113641544B (en) Method, apparatus, device, medium and product for detecting application state
CN112416762B (en) API test method and device, equipment and computer readable storage medium
CN111061637B (en) Interface testing method, interface testing device and storage medium
CN110011845B (en) Log collection method and system
US11216352B2 (en) Method for automatically analyzing bottleneck in real time and an apparatus for performing the method
CN117493359A (en) Mock data updating method and device, storage medium and computer equipment
CN116450176A (en) Version updating method and device, electronic equipment and storage medium
CN116303013A (en) Source code analysis method, device, electronic equipment and storage medium
CN116011677A (en) Time sequence data prediction method and device, electronic equipment and storage medium
CN111159009A (en) Pressure testing method and device for log service system
US10255128B2 (en) Root cause candidate determination in multiple process systems
CN104683179A (en) Method, device and system for monitoring execution performance of objects
CN108459940B (en) Configuration information modification method and device of application performance management system and electronic equipment
US20160275002A1 (en) Image capture in application lifecycle management for documentation and support
US10733070B2 (en) Executing test scripts with respect to a server stack
US10789238B2 (en) Event management systems and event triggering methods and systems thereof applied to a version control server
CN116401113B (en) Environment verification method, device and medium for heterogeneous many-core architecture acceleration card
CN112835804B (en) Test case processing method, device, electronic equipment and 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