CN117609054A - Automatic test method, device, equipment and storage medium - Google Patents

Automatic test method, device, equipment and storage medium Download PDF

Info

Publication number
CN117609054A
CN117609054A CN202311629513.4A CN202311629513A CN117609054A CN 117609054 A CN117609054 A CN 117609054A CN 202311629513 A CN202311629513 A CN 202311629513A CN 117609054 A CN117609054 A CN 117609054A
Authority
CN
China
Prior art keywords
database table
test
target
data
script file
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
CN202311629513.4A
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.)
Agricultural Bank of China
Original Assignee
Agricultural Bank of China
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 Agricultural Bank of China filed Critical Agricultural Bank of China
Priority to CN202311629513.4A priority Critical patent/CN117609054A/en
Publication of CN117609054A publication Critical patent/CN117609054A/en
Pending legal-status Critical Current

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
    • 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/25Integrating or interfacing systems involving database management systems

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Data Mining & Analysis (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses an automatic test method, an automatic test device, automatic test equipment and a storage medium, wherein the automatic test method comprises the following steps: acquiring a first script file for initializing a memory database table; acquiring a second script file for acquiring first test data from a shared database; executing the first script file and the second script file to obtain a corresponding initial database table and the first test data; storing the first test data into the initial database table to obtain a target database table; and testing the corresponding method to be tested based on the target database table and the target data. According to the embodiment, the corresponding method to be tested is tested by the target database table and the target data, so that the intervention of manual testing can be reduced, the automatic testing of service logic is realized, the testing efficiency and accuracy are improved, and the labor and time cost is reduced.

Description

Automatic test method, device, equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of testing, in particular to an automatic testing method, an automatic testing device, automatic testing equipment and a storage medium.
Background
The current comprehensive statistics work of the financial industry faces new situations and new tasks, and the requirements on financial data reporting are increasingly strict. With the increasing complexity of service application scenes and the increasing expansion of financial data volume, the data types are more and more numerous, and the service logic is more complex, so that the automatic test of the service logic becomes a big pain point in the process of realizing the automatic reporting of financial data. In the existing development process, after completing the writing of business logic, a developer is usually required to connect to a test environment, and adopt upstream test data to perform verification manually. In the process, various problems that the test environment is not connected or the network causes a jam, an upstream person modifies test data, and multiple persons test the data simultaneously, and the like are frequently encountered. Even if the problems are not encountered in the process, the code is required to be repeatedly tested manually every time, so that the error is easy to occur, the efficiency is low, and the development progress of the project is slow.
Disclosure of Invention
The embodiment of the invention provides an automatic test method, an automatic test device, automatic test equipment and a storage medium, which can improve test efficiency and accuracy.
In a first aspect, an embodiment of the present invention provides an automated testing method, including: acquiring a first script file for initializing a memory database table; acquiring a second script file for acquiring first test data from a shared database; executing the first script file and the second script file to obtain a corresponding initial database table and the first test data; storing the first test data into the initial database table to obtain a target database table; and testing the corresponding method to be tested based on the target database table and the target data.
In a second aspect, an embodiment of the present invention further provides an automated testing apparatus, including: the first script file acquisition module is used for acquiring a first script file of an initialized memory database table; the second script file acquisition module is used for acquiring a second script file for acquiring the first test data from the shared database; the execution script file module is used for executing the first script file and the second script file to obtain a corresponding initial database table and the first test data; the target database table obtaining module is used for storing the first test data into the initial database table to obtain a target database table; and the test module is used for testing the corresponding method to be tested based on the target database table and the target data.
In a third aspect, an embodiment of the present invention further provides an electronic device, including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the automated test method of any of the embodiments of the invention.
In a fourth aspect, embodiments of the present invention further provide a computer readable storage medium storing computer instructions for causing a processor to implement the automated test method of any of the embodiments of the present invention when executed.
According to the technical scheme, a first script file for initializing a memory database table is obtained; acquiring a second script file for acquiring first test data from a shared database; executing the first script file and the second script file to obtain a corresponding initial database table and the first test data; storing the first test data into the initial database table to obtain a target database table; and testing the corresponding method to be tested based on the target database table and the target data. According to the embodiment, the corresponding method to be tested is tested by the target database table and the target data, so that the intervention of manual testing can be reduced, the automatic testing of service logic is realized, the testing efficiency and accuracy are improved, and the labor and time cost is reduced.
Drawings
FIG. 1 is a flow chart of an automated test method provided by an embodiment of the present invention;
FIG. 2 is a schematic flow chart of another automated testing method according to an embodiment of the present invention;
FIG. 3 is a schematic flow chart of another automated testing method according to an embodiment of the present invention;
FIG. 4 is a schematic structural diagram of an automated testing apparatus according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device implementing an embodiment of the present invention.
Detailed Description
The invention is described in further detail below with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting thereof. It should be further noted that, for convenience of description, only some, but not all of the structures related to the present invention are shown in the drawings. The data acquisition, storage, use, processing and the like in the technical scheme meet the relevant regulations of national laws and regulations.
Fig. 1 is a flowchart of an automated testing method provided in an embodiment of the present invention, where the embodiment is applicable to a case of testing service logic, the method may be performed by an automated testing device, and specifically includes the following steps:
s110, acquiring a first script file of an initialized memory database table.
The initial database table is an empty database table and is stored in the memory database.
The memory database may be an H2 memory database, where the H2 memory database is a relational database written in the Java programming language, and may be embedded in a Java application or run as a separate database server. Compared with the traditional method for managing all data on a disk, the memory database redesigns a database management system, redesigns an algorithm and a data structure for query processing, concurrency control and recovery, almost puts the whole database into a memory, and greatly improves the data processing speed. The main storage medium of the memory database is a memory, and compared with a disk database, the memory has higher data reading and writing speed, and greatly improves the application performance;
the first script file is placed under a first file directory. The first script file includes a program that initializes a database table.
S120, acquiring a second script file for acquiring the first test data from the shared database.
The second script file is placed under a second file directory. The second file directory may be the same as the first file directory or different from the first file directory. The second script file includes a program that retrieves first test data from a shared database of the test environment.
In this embodiment, the memory database is stored in each test end, and the test end may be a client or a server, that is, the test end executing the automated test method provided by the present invention, while the shared database is stored in a certain shared machine, and each test needs to obtain test data from the shared database, where in this process, the test environment is often encountered, and is not connected, or the network causes a jam, and an upstream person modifies the test data, so that multiple simultaneous tests cause various problems such as inconsistent data. In the method provided by the invention, when testing, the test data is only acquired from the memory database in the test terminal, so that the problem that the shared database is not connected or blocked and the dirty data problem can be avoided. In addition, in the existing database technology, when the switching environment test is performed, the project configuration needs to be manually modified, and the test version is redeployed. The memory database can be used to save the operation steps and reduce the time waste in the process.
S130, executing the first script file and the second script file to obtain a corresponding initial database table and the first test data.
In this embodiment, by executing the first script file, a corresponding initial database table may be generated in the memory database, and by executing the second script file, the first test data may be obtained from the shared database, and the first test data may be stored in the second file directory.
Optionally, executing the first script file and the second script file to obtain a corresponding initial database table and the first test data, including: acquiring a first script file from the first file directory through a database management module; acquiring a second script file from the second file directory; executing the first script file to generate a corresponding initial database table; and executing the second script file to obtain the first test data.
In this embodiment, the database management module is specifically configured to: acquiring a first script file from the first file directory; executing the first script file to initialize a database table in a memory database and generate a corresponding initial database table; acquiring a second script file from the second file directory; and executing the second script file to obtain first test data.
And S140, storing the first test data into the initial database table to obtain a target database table.
Wherein the target database table includes first test data.
Optionally, storing the first test data in the initial database table to obtain a target database table, including: and storing the first test data into the initial database table through a database management module to obtain a target database table.
In this embodiment, the database management module is further configured to automatically generate test data, that is, store the first test data into the initial database table, and obtain a target database table. The target database table stores test data.
In this embodiment, the database management module may actively call the script file, so as to automatically generate test data in the memory database, thereby improving the test efficiency.
S150, testing the corresponding method to be tested based on the target database table and the target data.
The method to be tested is a program for realizing business logic, and an object to be tested is needed. There may be a plurality of methods to be tested, and there may be a plurality of corresponding target databases. For each method to be tested, the corresponding method to be tested can be tested based on the test data in the target database table, and the test result is compared with the target data to obtain the final test result. The target data may be target data (which may be understood as a correct test result) that should be generated by the business logic, and may be obtained specifically through manual experience or directly obtained from a third party.
Optionally, testing the corresponding method to be tested based on the target database table and the target data includes: inputting the target database table, target data and corresponding methods to be tested into a target test method inlet; and testing the corresponding method to be tested by the target testing method based on the target database table and the target data.
The target test method can be understood as a unified test method. In this embodiment, the target database table, the target data and the corresponding method to be tested may be used as parameters of the target test method, and the corresponding method to be tested may be tested by the target test method based on the target database table and the target data. Fig. 2 is a schematic flow chart of another automatic testing method according to an embodiment of the invention. Each method to be tested has a corresponding database table (for example, the method to be tested A, the corresponding database tables are x, y and z, the method to be tested B, the corresponding database tables are m, n and l, the method to be tested C, the corresponding database tables are a, B and C), and the multiple methods to be tested can be tested through the target test method entrance, and corresponding test results can be obtained, and the test results can be summarized. After the service logic method to be tested and the database table used are encoded, that is, after the method to be tested and the corresponding target database table are obtained, the method to be tested and the corresponding target database table can be used as parameters of the target test method, so that a set of target test methods can be shared, and further redundancy of codes and workload of developers can be reduced.
Optionally, the testing, by the target testing method, the corresponding method to be tested based on the target database table and the target data includes: calling the database management module through the test module to obtain a target database table; calling a tested module through a testing module to obtain a method to be tested and corresponding target data; and calling a tested module through a testing module, acquiring second testing data from a target database table, and testing a corresponding method to be tested based on the second testing data and the target data.
The second test data are the same as the first test data, and are all test data. In order to identify test data from the shared database and test data from the memory database, the first test data and the second test data are distinguished.
In this embodiment, for the target test method, the test module is called to test, and the test module calls the tested module to test, where a specific test process of the tested module is as follows: obtaining a target database table; acquiring a corresponding method to be tested and corresponding target data; and acquiring second test data from the target database table, and testing the corresponding method to be tested based on the second test data and the target data.
Optionally, testing the corresponding method to be tested based on the second test data and the target data includes: testing the method to be tested based on the second test data to obtain a test result; comparing the test result with the target data to obtain a comparison result; if the comparison result is that the test result is consistent with the target data, the test is passed; if the comparison result is that the test result is inconsistent with the target data, the test is not passed, and the comparison result is output according to the type of the target data; the types of the target data comprise a message format and a statistical report format.
In this embodiment, the second test data may be used as a reference of the method to be tested, and the method to be tested is tested to obtain a test result, and the test result is compared with the target data to obtain a comparison result; if the comparison result is that the test result is consistent with the target data, the test is passed; if the comparison result is that the test result is inconsistent with the target data, the test is not passed, and the comparison result is output according to the type of the target data; the types of the target data comprise a message format and a statistical report format. The statistical report format may be understood as an excel table format.
In this embodiment, for the case that the test result is inconsistent with the target data, the common problem may be classified and encoded according to experience, for example, the target data in the message format may be defined as follows, and the comparison result is represented by the following codes:
001: the number of the data records is more than that of the target data;
002: the number of the data records is less than that of the target data;
003: the data record and the target belong to no match;
when the console gives out the test conclusion, the data record of the problem can be given out, and the generated data message is reserved for subsequent manual comparison.
As another example, the target data in the statistical report format may give some statistical decisions to represent the comparison result, such as:
there are X numbers that are inconsistent with the target number;
the existence of X numbers should be null but have a definite value;
there are X numbers that should not be null but have no value;
wherein X may be an arabic number, for example, 1, 2, etc., which is not limited in this embodiment.
Fig. 3 is a schematic flow chart of another automatic testing method according to an embodiment of the present invention.
S310, a first script file of a database table is ready to be initialized, and the first script file is placed under a corresponding first file directory.
S320, acquiring first test data from a shared database of the test environment, and storing the corresponding second script files and the first test data under the corresponding second file directory.
S330, preparing target data which is generated by the method to be tested, and putting the target data into a corresponding third file directory.
The third file directory may be different from the second file directory and the first file directory, or may be the same.
S340, writing a database management module.
The database management module acquires a first script file from the first file directory; acquiring a second script file from the second file directory; executing the first script file to generate a corresponding initial database table; and executing the second script file to obtain the first test data. And storing the first test data into the initial database table to obtain a target database table.
S350, writing the tested module.
The tested module can call the method to be tested, can automatically read the target data and the test data in the target database table, tests the corresponding method to be tested based on the target database table and the target data, and gives out a test result.
S360, writing a test module.
The test module calls the database management module, initializes the test data, and then calls the tested module to realize the test process and give the test result.
In actual testing, the test module is only needed to be executed manually, so that the whole test process can be realized. In the process of executing the test module, the test module calls a database management module, and the database management module initializes a database table and obtains a target database table; the test module calls the tested module, the tested module obtains corresponding target data, and obtains second test data from a target database table, and the tested module calls the method to be tested, so that the method to be tested is tested based on the second test data, and the test result is compared with the target data, and a comparison result is given.
The method can share one set of target test method for different service logics (to-be-tested methods), the database tables required by the different service logics are encoded, and then the unified target test method is used for calling the test module, so that the efficiency can be further improved. In comparison with the target data, it is not just the conclusion of the agreement or disagreement, but rather reports on some simple disagreement data to facilitate management and viewing of the cause of the error.
According to the technical scheme, a first script file for initializing a memory database table is obtained; acquiring a second script file for acquiring first test data from a shared database; executing the first script file and the second script file to obtain a corresponding initial database table and the first test data; storing the first test data into the initial database table to obtain a target database table; and testing the corresponding method to be tested based on the target database table and the target data. According to the embodiment, the corresponding method to be tested is tested by the target database table and the target data, so that the intervention of manual testing can be reduced, the automatic testing of service logic is realized, the testing efficiency and accuracy are improved, and the labor and time cost is reduced.
It should be noted that, under the scenario that the types of financial data are numerous and the business logic is complex, there are several problems that cause the complex process and low efficiency of the project development and test based on the Spring framework and the MyBatis framework. For example, in order to test code logic, a developer needs to start a complete Spring container, which results in overlong starting time, and meanwhile needs to build a database environment and keep the database clean, which also results in the problems of time consuming connection, labor consuming maintenance, dirty data and the like, so how to ensure quick and accurate logic test implementation project development under complex service logic is particularly important. According to the automatic test method provided by the invention, through the method for automatically verifying the business logic based on the H2 memory database, the data table and the data can be created along with the starting of the program and destroyed along with the closing of the program, and the online data can not be interfered by the connection test environment, so that the safety and the integrity of the data are ensured. The method needs to configure an H2 memory database in a project, prepare a database table and a data initialization script, write a test case for each business logic, and complete the automatic test of the business logic.
Fig. 4 is a schematic structural diagram of an automatic testing device according to an embodiment of the present invention. As shown in fig. 4, the apparatus includes: a first script file acquisition module 410, a second script file acquisition module 420, an execution script file module 430, a target database table acquisition module 440, and a test module 450;
a first script file obtaining module 410, configured to obtain a first script file initializing a memory database table;
a second script file obtaining module 420, configured to obtain a second script file for obtaining the first test data from the shared database;
an execution script file module 430, configured to execute the first script file and the second script file to obtain a corresponding initial database table and the first test data;
a target database table obtaining module 440, configured to store the first test data into the initial database table, and obtain a target database table;
and the testing module 450 is used for testing the corresponding method to be tested based on the target database table and the target data.
According to the technical scheme, a first script file obtaining module is used for obtaining a first script file of an initialized memory database table; acquiring a second script file for acquiring the first test data from the shared database through a second script file acquisition module; executing the first script file and the second script file through an execution script file module to obtain a corresponding initial database table and the first test data; the first test data is stored in the initial database table through a target database table obtaining module, and a target database table is obtained; and testing the corresponding method to be tested by a testing module based on the target database table and the target data. According to the embodiment, the corresponding method to be tested is tested by the target database table and the target data, so that the intervention of manual testing can be reduced, the automatic testing of service logic is realized, the testing efficiency and accuracy are improved, and the labor and time cost is reduced.
Wherein, the initial database table is an empty database table and is stored in a memory database; the target database table includes first test data; the first script file is placed under a first file directory; the second script file is placed under a second file directory.
Optionally, the execution script file module is specifically configured to: acquiring a first script file from the first file directory through a database management module; acquiring a second script file from the second file directory; executing the first script file to generate a corresponding initial database table; and executing the second script file to obtain the first test data.
Optionally, the target database table obtaining module is specifically configured to: and storing the first test data into the initial database table through a database management module to obtain a target database table.
Optionally, the test module is specifically configured to: inputting the target database table, target data and corresponding methods to be tested into a target test method inlet; and testing the corresponding method to be tested by the target testing method based on the target database table and the target data.
Optionally, the test module is further configured to: calling the database management module through the test module to obtain a target database table; calling a tested module through a testing module to obtain a method to be tested and corresponding target data; and calling a tested module through a testing module, acquiring second testing data from a target database table, and testing a corresponding method to be tested based on the second testing data and the target data.
Optionally, the test module is further configured to: testing the method to be tested based on the second test data to obtain a test result; comparing the test result with the target data to obtain a comparison result; if the comparison result is that the test result is consistent with the target data, the test is passed; if the comparison result is that the test result is inconsistent with the target data, the test is not passed, and the comparison result is output according to the type of the target data; the types of the target data comprise a message format and a statistical report format.
The device can execute the method provided by all the embodiments of the invention, and has the corresponding functional modules and beneficial effects of executing the method. Technical details not described in detail in this embodiment can be found in the methods provided in all the foregoing embodiments of the invention.
Fig. 5 shows a schematic diagram of the structure of an electronic device 10 that may be used to implement an embodiment of the invention. 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. Electronic equipment may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), 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 inventions described and/or claimed herein.
As shown in fig. 5, the electronic device 10 includes at least one processor 11, and a memory, such as a Read Only Memory (ROM) 12, a Random Access Memory (RAM) 13, etc., communicatively connected to the at least one processor 11, in which the memory stores a computer program executable by the at least one processor, and the processor 11 may perform various appropriate actions and processes according to the computer program stored in the Read Only Memory (ROM) 12 or the computer program loaded from the storage unit 18 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 may also be stored. The processor 11, the ROM 12 and the RAM 13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to bus 14.
Various components in the electronic device 10 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, etc.; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, an optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, digital Signal Processors (DSPs), and any suitable processor, controller, microcontroller, etc. The processor 11 performs the various methods and processes described above, such as method automated testing.
In some embodiments, the method automated test may be implemented as a computer program tangibly embodied on a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 10 via the ROM 12 and/or the communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more of the steps of the method automated test described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the method automation test in any other suitable manner (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.
A computer program for carrying out methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be implemented. The computer program 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 the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer readable storage 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. Alternatively, the computer readable storage medium may be a machine readable signal medium. 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 an electronic device 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 a pointing device (e.g., a mouse or a trackball) through which a user can provide input to the electronic device. 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), blockchain networks, and the internet.
The computing system may include clients and servers. 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 can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service are overcome.
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 described in the present invention may be performed in parallel, sequentially, or in a different order, so long as the desired results of the technical solution of the present invention are achieved, and the present invention is not limited herein.
The above embodiments do not limit the scope of the present invention. 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 invention should be included in the scope of the present invention.

Claims (10)

1. An automated testing method, comprising:
acquiring a first script file for initializing a memory database table;
acquiring a second script file for acquiring first test data from a shared database;
executing the first script file and the second script file to obtain a corresponding initial database table and the first test data;
storing the first test data into the initial database table to obtain a target database table;
and testing the corresponding method to be tested based on the target database table and the target data.
2. The method of claim 1, wherein the initial database table is a null database table stored in an in-memory database; the target database table includes first test data;
the first script file is placed under a first file directory; the second script file is placed under a second file directory.
3. The method of claim 2, wherein executing the first script file and the second script file to obtain the corresponding initial database table and the first test data comprises:
acquiring a first script file from the first file directory through a database management module;
acquiring a second script file from the second file directory;
executing the first script file to generate a corresponding initial database table;
and executing the second script file to obtain the first test data.
4. A method according to claim 3, wherein storing the first test data in the initial database table to obtain a target database table comprises:
and storing the first test data into the initial database table through a database management module to obtain a target database table.
5. The method of claim 4, wherein testing the respective method to be tested based on the target database table and target data comprises:
inputting the target database table, target data and corresponding methods to be tested into a target test method inlet;
and testing the corresponding method to be tested by the target testing method based on the target database table and the target data.
6. The method of claim 5, wherein testing, by the target test method, the corresponding method to be tested based on the target database table and target data, comprises:
calling the database management module through the test module to obtain a target database table;
calling a tested module through a testing module to obtain a method to be tested and corresponding target data;
and calling a tested module through a testing module, acquiring second testing data from a target database table, and testing a corresponding method to be tested based on the second testing data and the target data.
7. The method of claim 6, wherein testing the respective method to be tested based on the second test data and target data comprises:
testing the method to be tested based on the second test data to obtain a test result;
comparing the test result with the target data to obtain a comparison result;
if the comparison result is that the test result is consistent with the target data, the test is passed;
if the comparison result is that the test result is inconsistent with the target data, the test is not passed, and the comparison result is output according to the type of the target data; the types of the target data comprise a message format and a statistical report format.
8. An automated test equipment, comprising:
the first script file acquisition module is used for acquiring a first script file of an initialized memory database table;
the second script file acquisition module is used for acquiring a second script file for acquiring the first test data from the shared database;
the execution script file module is used for executing the first script file and the second script file to obtain a corresponding initial database table and the first test data;
the target database table obtaining module is used for storing the first test data into the initial database table to obtain a target database table;
and the test module is used for testing the corresponding method to be tested based on the target database table and the target data.
9. An electronic device, the electronic device comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the automated test method of any of claims 1-7.
10. A computer readable storage medium storing computer instructions for causing a processor to implement the automated test method of any of claims 1-7 when executed.
CN202311629513.4A 2023-11-30 2023-11-30 Automatic test method, device, equipment and storage medium Pending CN117609054A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311629513.4A CN117609054A (en) 2023-11-30 2023-11-30 Automatic test method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311629513.4A CN117609054A (en) 2023-11-30 2023-11-30 Automatic test method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117609054A true CN117609054A (en) 2024-02-27

Family

ID=89944029

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311629513.4A Pending CN117609054A (en) 2023-11-30 2023-11-30 Automatic test method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117609054A (en)

Similar Documents

Publication Publication Date Title
CN104252481A (en) Dynamic check method and device for consistency of main and salve databases
CN115016321A (en) Hardware-in-loop automatic testing method, device and system
CN116074183B (en) C3 timeout analysis method, device and equipment based on rule engine
CN116089197A (en) Fault equipment switching exercise method, device, equipment and storage medium
CN116301978A (en) System upgrading method, device, equipment and storage medium
CN117609054A (en) Automatic test method, device, equipment and storage medium
CN115454971A (en) Data migration method and device, electronic equipment and storage medium
CN115455091A (en) Data generation method and device, electronic equipment and storage medium
CN114693116A (en) Method and device for detecting code review validity and electronic equipment
CN114896418A (en) Knowledge graph construction method and device, electronic equipment and storage medium
CN114116288A (en) Fault processing method, device and computer program product
CN114003497A (en) Method, device and equipment for testing service system and storage medium
CN114116688A (en) Data processing and data quality inspection method, device and readable storage medium
CN117573561B (en) Automatic test system, method, electronic equipment and storage medium
CN115374010A (en) Function testing method, device, equipment and storage medium
CN115437955A (en) Project testing method, device, equipment and storage medium
CN117632138A (en) Attendance application form analysis method and device, electronic equipment and storage medium
CN117493203A (en) Method, device, equipment and storage medium for testing server software
CN116627820A (en) Data creation method, device, equipment and medium
CN117724981A (en) Test report generation method, device, equipment and storage medium
CN117931155A (en) Code generation method, device, equipment and medium
CN116991825A (en) Database flashback method, device, equipment and storage medium
CN118132533A (en) Data processing method, device, equipment and storage medium
CN114238149A (en) Batch testing method of accounting system, electronic device and storage medium
CN116719719A (en) Test method, test device, electronic 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