CN113836016B - Writing interface storage quality testing method, system, electronic equipment and storage medium - Google Patents

Writing interface storage quality testing method, system, electronic equipment and storage medium Download PDF

Info

Publication number
CN113836016B
CN113836016B CN202111116141.6A CN202111116141A CN113836016B CN 113836016 B CN113836016 B CN 113836016B CN 202111116141 A CN202111116141 A CN 202111116141A CN 113836016 B CN113836016 B CN 113836016B
Authority
CN
China
Prior art keywords
storage
snapshot
interface
write interface
application program
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.)
Active
Application number
CN202111116141.6A
Other languages
Chinese (zh)
Other versions
CN113836016A (en
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.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology 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 Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202111116141.6A priority Critical patent/CN113836016B/en
Publication of CN113836016A publication Critical patent/CN113836016A/en
Application granted granted Critical
Publication of CN113836016B publication Critical patent/CN113836016B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • 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
    • G06F11/3672Test management
    • G06F11/3692Test management for test results analysis
    • 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
    • G06F11/3696Methods or tools to render software testable

Landscapes

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

Abstract

The disclosure provides a method, a system, electronic equipment and a storage medium for testing storage quality of a write interface, and relates to the technical field of computers, in particular to the technical field of storage quality testing of write interfaces. The specific implementation scheme is as follows: the database of the tested interface is connected through a storage model; executing a tested write interface and configuring a storage snapshot; selecting a storage snapshot use case from the storage snapshot list, comparing the real-time storage snapshot obtained in the test process of the tested write interface with the storage snapshot use case to obtain a comparison result, and generating a first type application program interface and a second type application program interface; calling a first type application program interface to obtain a comparison result; and calling a second type application program interface to clean the storage data written in the database. The testing method disclosed by the invention has stronger universality, adapts to different writing interfaces, has richer testing data and can improve the testing accuracy.

Description

Writing interface storage quality testing method, system, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to the field of storage quality testing technologies for write interfaces.
Background
In the research and development process of the Internet, the functionality and the safety stability of a core write interface are more and more important, and the write interface is a current service core interface, so that service data can be stored in a database with high quality, and meanwhile, reliable read service is provided for a downstream access party. It is therefore necessary to test the storage quality of the write interface.
There are several significant problems with the automated regression testing of current write interfaces: most of returned data received by the write interface are fields such as error codes, error languages and the like, and no extra data is used for judging the underlying logic; the writing interface needs a specific script to check the library, and the script has no universality; post processing of data cannot be performed after testing.
Disclosure of Invention
The disclosure provides a write interface storage quality testing method, a write interface storage quality testing device, electronic equipment and a storage medium.
According to a first aspect of the present disclosure, there is provided a write interface storage quality testing method, including:
selecting a storage model suitable for a tested write interface from a preconfigured storage model list, and connecting a database of the tested interface through the storage model;
controlling the tested write interface to store data in the database so as to configure a plurality of storage snapshots and form a storage snapshot list;
selecting the storage snapshot adapting to the tested write interface from the storage snapshot list as a storage snapshot use case, comparing the real-time storage snapshot obtained in the test process of the tested write interface with the storage snapshot use case to obtain a comparison result, and generating a first type application program interface and a second type application program interface;
calling the first type application program interface to obtain the comparison result, and judging the storage quality of the tested write interface according to the comparison result; and calling the second type application program interface to clean the storage data written in the database.
According to a second aspect of the present disclosure, there is provided a write interface storage quality testing system, comprising:
the storage model configuration module is used for pre-configuring a storage model list to provide a storage model which is adapted to a tested write interface and is connected with a database of the tested interface through the storage model;
the storage snapshot configuration module is used for controlling the tested write interface to store data in the database and configuring a plurality of storage snapshots to form a storage snapshot list;
the storage snapshot comparison module is used for selecting the storage snapshot which is matched with the tested write interface from the storage snapshot list as a storage snapshot use case, and comparing the real-time storage snapshot obtained in the test process of the tested write interface with the storage snapshot use case to obtain a comparison result;
the application program interface generating module is used for generating a first type of application program interface and a second type of application program interface;
the quality testing module is used for calling the first type application program interface to obtain the comparison result and judging the storage quality of the tested write interface according to the comparison result;
and the data cleaning module is used for calling the second type application program interface to clean the storage data written in the database.
According to a third aspect of the present disclosure, there is provided an electronic device comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method.
According to a fourth aspect of the present disclosure, there is provided a non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform the above-described method.
According to a fifth aspect of the present disclosure, there is provided a computer program product comprising a computer program which, when executed by a processor, implements the above method.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the disclosure, nor is it intended to be used to limit the scope of the disclosure. Other features of the present disclosure will become apparent from the following specification.
Drawings
The drawings are for a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
FIG. 1 is an overall flow chart of a write interface storage quality testing method provided in accordance with the present disclosure;
FIG. 2 is a flowchart illustration of a configuration storage model provided in accordance with the present disclosure;
FIG. 3 is a flowchart illustration of a configuration store snapshot provided in accordance with the present disclosure;
FIG. 4 is an exemplary diagram of a flow of stored snapshot comparisons provided in accordance with the present disclosure;
FIG. 5 is an exemplary diagram of a flow of write interface testing provided in accordance with the present disclosure;
FIG. 6 is a functional block diagram of a write interface storage quality testing system provided in accordance with the present disclosure;
FIG. 7 is a block diagram of an electronic device for implementing a write interface storage quality test method of an embodiment of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below in conjunction with the accompanying drawings, which include various details of the embodiments of the present disclosure to facilitate understanding, and should be considered as merely exemplary. Accordingly, one of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
The present disclosure provides a method for testing storage quality of a write interface, as shown in fig. 1, including:
step S101, a test system selects a storage model suitable for a tested write interface from a preconfigured storage model list, and the test system is connected with a database of the tested interface through the storage model;
step S102, a test system controls a tested write interface to store data in a database so as to configure a plurality of storage snapshots and form a storage snapshot list;
step S103, the test system selects a storage snapshot adapting to the tested write interface from the storage snapshot list as a storage snapshot use case, compares the real-time storage snapshot obtained in the test process of the tested write interface with the storage snapshot use case to obtain a comparison result, and generates a first type application program interface and a second type application program interface;
step S104, the test system calls the first type application program interface to obtain a comparison result, and judges the storage quality of the tested write interface according to the comparison result; and the test system calls a second type of application program interface to clean the storage data written in the database.
Specifically, firstly, a storage model adapted to a tested write interface is selected from a preconfigured storage model list, and because the login information of the database of each write interface is different, a plurality of storage models are required to be preconfigured to adapt to different databases, so that the test system can acquire storage data from the databases. After the test system is ensured to log in the database, the write interface is executed, the write interface stores data in the database, the test system records the storage snapshot in the process of executing the write interface, and the storage snapshot is saved to form a storage snapshot list which is used as reference data in the subsequent test process. In the test process, a storage snapshot which is matched with the current storage service of the writing interface can be selected from a storage snapshot list to serve as a storage snapshot use case, a real-time storage snapshot is recorded in the test process and is compared with the storage snapshot use case, whether the real-time storage snapshot is consistent with the storage snapshot use case or not is judged, if so, the fact that the data stored by the current writing interface are correct is indicated, if not, the fact that the data are inconsistent is not indicated, the reason of a storage error can be known according to a comparison result, compared with the traditional test method, the test data are richer, and the test accuracy can be improved. Step S103 automatically generates corresponding application program interfaces (Application Programming Interface, API) after the comparison result of the stored snapshot is obtained, that is, a first type application program interface and a second type application program interface, where the first type application program interface is used to obtain the comparison result of the stored snapshot, and the second type application program interface is used to post-process the stored data after the test is completed, clean the stored data in the database, so that the next test is convenient, and for the test of the write interface, the data needs to be continuously written into the database, but the same stored data can only be stored once in the database, but the test often needs to be repeated, for example, a list number is stored in the database, and after the first test, the list number is already stored in the database, so that the stored data for the test can be reused.
As an alternative implementation, before selecting a storage model suitable for the tested write interface from the preconfigured storage model list, the testing system further includes: step S201, configuring login information of a database and testing whether the database is successfully connected; step S202, obtaining the table name to be monitored and the full table quantity field of the monitoring table from the database; step S203, selecting the core field of the monitor table from the full table amount field, and eliminating the non-core field in the monitor table; in step S204, the index field of the lookup table and the corresponding index field value are input to form a storage model and stored in the storage model list.
Specifically, firstly, configuring login information of a database and testing whether the database connection is successful, then establishing a monitoring structure aiming at storage content of the database, wherein removed non-core fields comprise, but are not limited to, time-varying fields and identity recognition fields, the non-core fields possibly interfere with monitoring to influence a test result, so that the non-core fields are removed to be beneficial to improving the accuracy of the test, finally, the storage model is stored after confirming that the monitoring structure is correct, and the configuration of the storage model is completed.
As an alternative embodiment, as shown in fig. 3, the test system configuring a number of storage snapshots to form a list of storage snapshots includes: step S301, a test system selects a storage model from a storage model list to connect with a database; step S302, obtaining a corresponding storage snapshot according to key parameters of a tested write interface; step S303, configuring service information corresponding to the stored snapshot, and storing the corresponding relation between the stored snapshot and the service information in a stored snapshot list.
Specifically, after the configuration of the storage model is completed, the storage snapshot can be obtained by writing the main key name and the main key value of the key parameter in the interface, then the corresponding code module name is configured, service information such as url, service profile and the like is requested, and finally the corresponding relation between the storage snapshot and the service information is confirmed to be stored without error.
As an alternative embodiment, as shown in fig. 4, before the test system calls the first type of application program interface to obtain the comparison result, the method further includes: step S401, the test system selects a storage snapshot use case from a storage snapshot list; step S402, obtaining a real-time storage snapshot in the current test process; step S403, obtaining a comparison result between the real-time storage snapshot and the storage snapshot use case; step S404, a first type application program interface and a second type application program interface are generated.
Specifically, after the configuration of the stored snapshot is completed, a stored snapshot use case for comparison is selected, a main key name and a main key value of key parameters in a write interface are input in a test system, a comparison result of the stored snapshot use case and the stored snapshot in real time can be obtained by inquiring, then a cause of consistency or inconsistency of the result is judged according to the comparison result, and a storage record is made. And simultaneously, a first type application program interface (diff-api) corresponding to the interface storage snapshot, a second type application program interface (cleaning api) for post-processing the storage data and the like can be provided for the interface automation application.
As an alternative embodiment, as shown in fig. 5, before determining the storage quality of the tested write interface according to the comparison result, the method further includes: the test system obtains the storage return value of the tested write interface and carries out preliminary judgment on the storage correctness.
Specifically, after the configuration of the storage model and the storage snapshot is completed, an application program interface for transmitting the comparison result of the storage snapshot, namely a first type application program interface diff-api, is provided. Firstly, in step S501, the interface automation support write interface inputs parameters; step S502, after the write interface executes input to obtain output, the correctness of the write interface can be preliminarily obtained through a return value; step S503, calling the first type application program interface, inputting the real-time storage snapshot and the related parameters of the business data to obtain a comparison result, and judging the correctness of the writing interface again; after the test is completed, step S504 continues to call the second type application program interface to perform the work of post-processing of data, so as to ensure that the snapshot storage use case of the interface automation service can be reused.
The embodiment of the disclosure also provides a system for testing the storage quality of a write interface, as shown in fig. 6, including:
a storage model configuration module 601, configured to pre-configure a storage model list to provide a storage model adapted to a tested write interface, and connect a database of the tested interface through the storage model;
the storage snapshot configuration module 602 is configured to control the tested write interface to store data in the database, and configure a plurality of storage snapshots to form a storage snapshot list;
the storage snapshot comparison module 603 is configured to select a storage snapshot adapted to the tested write interface from the storage snapshot list as a storage snapshot use case, and compare a real-time storage snapshot obtained in the testing process of the tested write interface with the storage snapshot use case to obtain a comparison result;
an application program interface generating module 604, configured to generate a first type of application program interface and a second type of application program interface;
the quality testing module 605 is configured to call the first type of application program interface to obtain a comparison result, and determine the storage quality of the tested write interface according to the comparison result;
the data cleaning module 606 is configured to call the second type of application program interface to clean the stored data written in the database.
Specifically, the test system first selects a storage model adapted to the tested write interface from a storage model list preconfigured in the storage model configuration module 601, and because the login information of the database of each write interface is different, a plurality of storage models need to be preconfigured to adapt to different databases, so as to ensure that the test system can acquire storage data from the databases. After ensuring that the test system can log in the database, the stored snapshot configuration module 602 executes the write interface again, the write interface stores data into the database, the test system records the stored snapshot in the process of executing the write interface, and the stored snapshot is saved to form a stored snapshot list as reference data in the subsequent test process. In the testing process, the storage snapshot comparison module 603 may select a storage snapshot adapted to the current storage service of the write interface from the storage snapshot list as a storage snapshot use case, record a real-time storage snapshot in the testing process, compare with the storage snapshot use case, determine whether the real-time storage snapshot is consistent with the storage snapshot use case, if so, indicate that the data stored in the current write interface is correct, if not, and also know the reason of the storage error according to the comparison result. After obtaining the comparison result of the stored snapshot, the application program interface generating module 604 automatically generates corresponding application program interfaces, i.e. a first type of application program interface and a second type of application program interface. The quality test module 605 calls the first type of application program interface to obtain the comparison result of the storage snapshot, the data cleaning module 606 calls the second type of application program interface to post-process the storage data after the test is completed, clean the storage data in the database so as to facilitate the next test, for the test of the write interface, the data needs to be continuously written into the database, but the same storage data can only be stored once in the database, but the test often needs to be repeated, for example, a list number is stored in the database, and after the first test, the list number is stored in the database, so that the storage data for the test can be used repeatedly.
As an alternative embodiment, the process of the storage module configuration module 601 configuring the storage model list includes: configuring login information of a database and testing whether the database is successfully connected; selecting a monitoring table and core fields of the monitoring table from a database, and removing non-core fields in the monitoring table; the index field and the corresponding index field value are input to form a storage model and stored in a storage model list.
Specifically, the storage module configuration module 601 firstly configures login information of the database and tests whether the database connection is successful, then establishes a monitoring structure for the storage content of the database, and the removed uncore fields include, but are not limited to, time-varying fields and identity recognition fields, which may interfere with monitoring and affect the test result, so that the uncore fields are removed to facilitate the improvement of the test accuracy, and finally, the storage model is saved after confirming that the monitoring structure is correct, so as to complete the configuration of the storage model.
As an alternative embodiment, the process of the stored snapshot configuration module 602 configuring the stored snapshot list includes: the test system selects a storage model from the storage model list to connect with the database; obtaining corresponding storage snapshots according to key parameters of the tested write interface; and configuring service information corresponding to the stored snapshot, and storing the corresponding relation between the stored snapshot and the service information in a stored snapshot list.
Specifically, after the configuration of the storage model is completed, the storage snapshot configuration module 602 may obtain the storage snapshot according to the primary key name and the primary key value of the key parameter in the write interface, then configure the corresponding service information, where the service information includes, but is not limited to, a code module name, a request url, a service profile, and the like, and finally confirm that the binding relationship between the storage snapshot and the service information is stored without error.
As an optional implementation manner, the process of acquiring the comparison result by the stored snapshot comparison module 603 specifically includes: selecting a storage snapshot use case from the storage snapshot list; acquiring a real-time storage snapshot in the current testing process; obtaining a comparison result between the real-time storage snapshot and the storage snapshot use case; and generating a first type of application program interface and a second type of application program interface.
Specifically, after the configuration of the stored snapshot is completed, the stored snapshot comparison module 603 selects a stored snapshot use case for comparison, a primary key name and a primary key value of key parameters in the write interface are input in the test system, a comparison result of the stored snapshot use case and the stored snapshot in real time can be obtained by inquiring, then a result of consistency or inconsistency is judged according to the comparison result, a storage record is made, and richer data is provided for judging the storage quality of the write interface. And simultaneously, a first type application program interface corresponding to the interface storage snapshot and a second type application program interface for post-processing of the storage data can be provided for the interface automation application.
As an alternative embodiment, the quality testing module 605 is further configured to obtain a storage return value of the tested write interface before determining the storage quality of the tested write interface according to the comparison result, and perform preliminary determination on the storage correctness.
Specifically, after the configuration of the storage model and the storage snapshot is completed, the application program interface generating module 604 provides an application program interface that transmits the comparison result of the storage snapshot, that is, a first type of application program interface diff-api. Firstly, after the write interface executes input to obtain output, a test system can initially obtain the correctness of the write interface through a return value; then, calling a first type of application program interface, inputting relevant parameters of the snapshot and the service data stored in real time to obtain a comparison result, and judging the correctness of the writing interface again; after the test is finished, the second type application program interface is continuously called to carry out the work of post-processing of the data, and the storage snapshot use case of the interface automation service is ensured to be reusable. In this embodiment, the storage correctness is judged twice, the first time is to make a preliminary judgment according to the storage return value of the write interface, and the second time is to make an accurate judgment by using the comparison result of the storage snapshot use case and the real-time storage snapshot, so that the test precision of the test system can be effectively improved.
Embodiments of the present disclosure also provide an electronic device, a computer-readable storage medium, and a computer program product.
Fig. 7 illustrates a schematic block diagram of an example electronic device 700 that may be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 7, the apparatus 700 includes a computing unit 701 that can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM) 702 or a computer program loaded from a storage unit 708 into a Random Access Memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the device 700 may also be stored. The computing unit 701, the ROM 702, and the RAM 703 are connected to each other through a bus 704. An input/output (I/O) interface 705 is also connected to bus 704.
Various components in device 700 are connected to I/O interface 705, including: an input unit 706 such as a keyboard, a mouse, etc.; an output unit 707 such as various types of displays, speakers, and the like; a storage unit 708 such as a magnetic disk, an optical disk, or the like; and a communication unit 709 such as a network card, modem, wireless communication transceiver, etc. The communication unit 709 allows the device 700 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The computing unit 701 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of computing unit 701 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 701 performs the various methods and processes described above, such as APP privacy compliance automated detection. For example, in some embodiments, the write interface storage quality testing method may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as storage unit 708. In some embodiments, part or all of the computer program may be loaded and/or installed onto device 700 via ROM 702 and/or communication unit 709. When a computer program is loaded into RAM 703 and executed by computing unit 701, one or more steps of the write interface storage quality testing method described above may be performed. Alternatively, in other embodiments, the computing unit 701 may be configured to perform the write interface storage quality test method by any other suitable means (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for carrying out methods of the present disclosure may be written in any combination of one or more programming languages. These program code may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus such that the program code, when executed by the processor or controller, causes the functions/operations specified in the flowchart and/or block diagram to be implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on 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.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and pointing device (e.g., a mouse or trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), and the internet.
The computer system may include a client and a server. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server may be a cloud server, a server of a distributed system, or a server incorporating a blockchain.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps recited in the present disclosure may be performed in parallel or sequentially or in a different order, provided that the desired results of the technical solutions of the present disclosure are achieved, and are not limited herein.
The above detailed description should not be taken as limiting the scope of the present disclosure. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present disclosure are intended to be included within the scope of the present disclosure.

Claims (10)

1. A storage quality testing method of a write interface comprises the following steps:
selecting a storage model suitable for a tested write interface from a preconfigured storage model list, and connecting a database of the tested write interface through the storage model;
controlling the tested write interface to store data in the database so as to configure a plurality of storage snapshots and form a storage snapshot list;
the configuring a number of stored snapshots to form a stored snapshot list includes: selecting the storage model from the storage model list to connect with the database; acquiring the corresponding storage snapshot according to the key parameters of the tested write interface; configuring service information corresponding to the stored snapshot, and storing the corresponding relation between the stored snapshot and the service information in the stored snapshot list;
selecting the storage snapshot adapting to the tested write interface from the storage snapshot list as a storage snapshot use case, comparing the real-time storage snapshot obtained in the test process of the tested write interface with the storage snapshot use case to obtain a comparison result, and generating a first type application program interface and a second type application program interface;
calling the first type application program interface to obtain the comparison result, and judging the storage quality of the tested write interface according to the comparison result; and calling the second type application program interface to clean the storage data written in the database.
2. The method for testing storage quality of a write interface according to claim 1, wherein before selecting a storage model adapted to a write interface under test from a preconfigured storage model list, further comprising: configuring login information of the database and testing whether the database is successfully connected; selecting a monitoring table and core fields of the monitoring table from the database, and removing non-core fields in the monitoring table; and inputting an index field and a corresponding index field value to form the storage model and storing the storage model in the storage model list.
3. The method for testing storage quality of a write interface according to claim 1, wherein before the calling the first type of application program interface to obtain the comparison result, further comprises: selecting the storage snapshot use case from the storage snapshot list; acquiring the real-time storage snapshot in the current testing process; acquiring the comparison result between the real-time storage snapshot and the storage snapshot use case; and generating the first type of application program interface and the second type of application program interface.
4. The method for testing the storage quality of the write interface according to claim 1, wherein before the storage quality of the tested write interface is determined according to the comparison result, further comprising: and acquiring a storage return value of the tested write interface, and primarily judging the storage correctness.
5. A write interface storage quality testing system, comprising:
the storage model configuration module is used for pre-configuring a storage model list to provide a storage model which is adapted to a tested write interface and is connected with a database of the tested write interface through the storage model;
the storage snapshot configuration module is used for controlling the tested write interface to store data in the database and configuring a plurality of storage snapshots to form a storage snapshot list;
the process of the storage snapshot configuration module for configuring the storage snapshot list comprises the following steps: selecting the storage model from the storage model list to connect with the database; acquiring the corresponding storage snapshot according to the key parameters of the tested write interface; configuring service information corresponding to the stored snapshot, and storing the corresponding relation between the stored snapshot and the service information in the stored snapshot list;
the storage snapshot comparison module is used for selecting the storage snapshot which is matched with the tested write interface from the storage snapshot list as a storage snapshot use case, and comparing the real-time storage snapshot obtained in the test process of the tested write interface with the storage snapshot use case to obtain a comparison result;
the application program interface generating module is used for generating a first type of application program interface and a second type of application program interface;
the quality testing module is used for calling the first type application program interface to obtain the comparison result and judging the storage quality of the tested write interface according to the comparison result;
and the data cleaning module is used for calling the second type application program interface to clean the storage data written in the database.
6. The write interface storage quality testing system of claim 5, wherein the process of the storage model configuration module configuring the storage model list comprises: configuring login information of the database and testing whether the database is successfully connected; selecting a monitoring table and core fields of the monitoring table from the database, and removing non-core fields in the monitoring table; and inputting an index field and a corresponding index field value to form the storage model and storing the storage model in the storage model list.
7. The write interface storage quality testing system of claim 5, wherein the process of obtaining the comparison result by the storage snapshot comparison module specifically comprises: selecting the storage snapshot use case from the storage snapshot list; acquiring the real-time storage snapshot in the current testing process; acquiring the comparison result between the real-time storage snapshot and the storage snapshot use case; and generating the first type of application program interface and the second type of application program interface.
8. The system according to claim 5, wherein the quality testing module is further configured to obtain a storage return value of the tested write interface before the storage quality of the tested write interface is determined according to the comparison result, and perform preliminary determination on storage correctness.
9. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the write interface storage quality testing method of any one of claims 1-4.
10. A non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the write interface storage quality testing method of any one of claims 1-4.
CN202111116141.6A 2021-09-23 2021-09-23 Writing interface storage quality testing method, system, electronic equipment and storage medium Active CN113836016B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111116141.6A CN113836016B (en) 2021-09-23 2021-09-23 Writing interface storage quality testing method, system, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111116141.6A CN113836016B (en) 2021-09-23 2021-09-23 Writing interface storage quality testing method, system, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113836016A CN113836016A (en) 2021-12-24
CN113836016B true CN113836016B (en) 2024-03-26

Family

ID=78969405

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111116141.6A Active CN113836016B (en) 2021-09-23 2021-09-23 Writing interface storage quality testing method, system, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113836016B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112994976A (en) * 2021-02-23 2021-06-18 北京百度网讯科技有限公司 Gateway testing method and device, electronic equipment and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10528586B2 (en) * 2016-12-20 2020-01-07 International Business Machines Corporation Database process with virtual nodes

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112994976A (en) * 2021-02-23 2021-06-18 北京百度网讯科技有限公司 Gateway testing method and device, electronic equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
突出实时测控软件数据库系统设计与实现;吴小欣;;电子设计工程(01);全文 *

Also Published As

Publication number Publication date
CN113836016A (en) 2021-12-24

Similar Documents

Publication Publication Date Title
CN110688305B (en) Test environment synchronization method, device, medium and electronic equipment
CN114389969A (en) Client test method and device, electronic equipment and storage medium
CN113127357A (en) Unit testing method, device, equipment, storage medium and program product
CN113836016B (en) Writing interface storage quality testing method, system, electronic equipment and storage medium
CN116301997A (en) Upgrading method, device, equipment and medium of controller
CN114003497A (en) Method, device and equipment for testing service system and storage medium
CN115017047A (en) Test method, system, equipment and medium based on B/S architecture
CN115437961A (en) Data processing method and device, electronic equipment and storage medium
CN113296836B (en) Method for training model, test method, device, electronic equipment and storage medium
CN115658478A (en) Test case screening method and device, electronic equipment and storage medium
CN114546799A (en) Point burying log checking method and device, electronic equipment, storage medium and product
CN115766697A (en) File downloading method, device, equipment and storage medium
CN115309730A (en) Data auditing method and device, electronic equipment and storage medium
CN114693116A (en) Method and device for detecting code review validity and electronic equipment
CN114238149A (en) Batch testing method of accounting system, electronic device and storage medium
CN117493203A (en) Method, device, equipment and storage medium for testing server software
CN115374012A (en) Automatic regression testing method and device, electronic equipment and storage medium
CN118111720A (en) National standard test system, method, device, equipment and medium for new energy vehicle
CN114996157A (en) Method, device, equipment and storage medium for identifying risk of changing code
CN117829755A (en) Data processing method, device, equipment and storage medium
CN115878461A (en) Operation log test method, device, equipment and storage medium
CN115665005A (en) Equipment test method, device, equipment and medium
CN116089267A (en) Test interface generation method, device, equipment and storage medium
CN116389460A (en) Communication data processing method, device, equipment and medium
CN115794525A (en) BMC (baseboard management controller) pressure testing method, device, 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