CN113672514A - Test method, test device, server and storage medium - Google Patents

Test method, test device, server and storage medium Download PDF

Info

Publication number
CN113672514A
CN113672514A CN202110975923.9A CN202110975923A CN113672514A CN 113672514 A CN113672514 A CN 113672514A CN 202110975923 A CN202110975923 A CN 202110975923A CN 113672514 A CN113672514 A CN 113672514A
Authority
CN
China
Prior art keywords
test
target
data
target operation
operation 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.)
Pending
Application number
CN202110975923.9A
Other languages
Chinese (zh)
Inventor
周涛涛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An International Smart City Technology Co Ltd
Original Assignee
Ping An International Smart City 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 Ping An International Smart City Technology Co Ltd filed Critical Ping An International Smart City Technology Co Ltd
Priority to CN202110975923.9A priority Critical patent/CN113672514A/en
Publication of CN113672514A publication Critical patent/CN113672514A/en
Pending legal-status Critical Current

Links

Images

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/3684Test management for test design, e.g. generating new test cases
    • 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

Abstract

The application is applicable to the technical field of artificial intelligence, and provides a testing method, a testing device, a server and a storage medium, wherein the method comprises the following steps: when a target operation program of a target application is updated, searching a test case aiming at the target operation program from a pre-stored test case set according to a program identifier of the target operation program; resetting data in a target database according to the initial snapshot data, wherein the target database is used for storing relevant data of the target application; executing the updated target operation program to obtain test result data; and determining the test passing state of the updated target operation program according to the test result data and the result snapshot data. According to the method and the device, when the target operation program of the target application is updated, the updated target operation program can be tested only by adopting the test case corresponding to the program identifier of the target operation program, and the improvement of the testing efficiency is facilitated.

Description

Test method, test device, server and storage medium
Technical Field
The present application relates to the field of artificial intelligence technologies, and in particular, to a testing method, an apparatus, a server, and a storage medium.
Background
The essence of the software system is data addition algorithm, the operation of the software system is based on the fact that initial data is given to the system, and the system obtains result data through algorithm calculation. The software test is based on the verification of the initial data and the result data, and the correctness of the algorithm is verified by verifying the correctness of the data.
In the related art, when a part of programs of application software is modified or updated, all test cases for testing the entire application software are generally required to be used for testing the application software, and the testing efficiency is low.
Disclosure of Invention
In view of this, embodiments of the present application provide a testing method, an apparatus, a server, and a storage medium, so as to solve the problem in the related art that when part of a program of an application is modified or updated, the application generally needs to be tested by using all test cases for testing the entire application, and the testing efficiency is low.
A first aspect of an embodiment of the present application provides a test method, including:
when a target operation program of a target application is updated, searching a test case aiming at the target operation program from a pre-stored test case set according to a program identifier of the target operation program, wherein the test case comprises initial snapshot data, the program identifier of the target operation program and result snapshot data;
resetting data in a target database according to the initial snapshot data, wherein the target database is used for storing relevant data of the target application;
executing the updated target operation program to obtain test result data;
and determining the test passing state of the updated target operating program according to the test result data and the result snapshot data, wherein the test passing state comprises a test passed state and a test failed state.
Further, the method further comprises:
monitoring the execution state of each target operation program in the running process of the target application, wherein the execution state comprises an execution state and a non-execution state;
and executing a preset case generation step aiming at the target operation program in the executing state so as to generate a test case aiming at the target operation program.
Further, the preset use case generating step includes:
when a target operation program is executed, acquiring data in a target database in a data snapshot mode, recording the data as initial snapshot data, and generating an operation event for recording the execution of the target operation program, wherein a program identifier corresponding to the target operation program is recorded in the operation event;
when the data in the target database changes, the changed data in the target database is acquired in a data snapshot mode and recorded as result snapshot data;
and generating a test case aiming at the target operation program based on the operation event, the initial snapshot data and the result snapshot data.
Further, the method further comprises:
testing each target operation program according to the sequence of execution of each target operation program in the target application and the test case of each target operation program to obtain test result data aiming at each target operation program;
determining the test passing state of the corresponding target operation program according to the test case and the test result data of each target operation program;
and if the test passing states of the target operation programs are the test passed states, generating first prompt information for prompting that the target application tests pass.
Further, after determining the test pass status of the corresponding target operating program, the method further comprises:
and if the target operation program with the corresponding test passing state as the test failing state exists, generating second prompt information for prompting that the corresponding target operation program in the target application fails in the test.
Further, after obtaining the test result data for each target operating program, the method further includes:
and generating a data flow diagram aiming at the target application according to the test result data of each target operation program, wherein the data flow diagram comprises points and lines, the lines in the data flow diagram are used for indicating the target operation programs, and the points at two ends of the lines in the data flow diagram are used for indicating the test result data respectively corresponding to the two target operation programs executed successively.
Further, determining a test passing state of the updated target operation program according to the test result data and the result snapshot data, including:
and if the test result data is consistent with the result snapshot data, determining that the test passing state of the updated target operation program is a test passed state.
A second aspect of an embodiment of the present application provides a test apparatus, including:
the test case searching unit is used for searching a test case aiming at the target operation program from a pre-stored test case set according to the program identification of the target operation program when the target operation program of the target application is updated, wherein the test case comprises initial snapshot data, the program identification of the target operation program and result snapshot data;
the data resetting unit is used for resetting data in a target database according to the initial snapshot data, and the target database is used for storing relevant data of the target application;
the program execution unit is used for executing the updated target operation program to obtain test result data;
and the state determining unit is used for determining the test passing state of the updated target operating program according to the test result data and the result snapshot data, wherein the test passing state comprises a test passed state and a test failed state.
A third aspect of embodiments of the present application provides a server, which includes a memory, a processor, and a computer program stored in the memory and executable on the server, and when the processor executes the computer program, the steps of the test method provided in the first aspect are implemented.
A fourth aspect of embodiments of the present application provides a computer-readable storage medium, in which a computer program is stored, and the computer program, when executed by a processor, implements the steps of the test method provided in the first aspect.
The implementation of the test method, the test device, the server and the storage medium provided by the embodiment of the application has the following beneficial effects: by pre-storing the test cases for the target operation programs in the target application, when the target operation programs of the target application are updated, the updated target operation programs are tested only by adopting the test cases corresponding to the program identifiers of the target operation programs, and the test efficiency is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required to be used in the embodiments or the related technical descriptions will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
FIG. 1 is a flowchart illustrating an implementation of a testing method according to an embodiment of the present disclosure;
FIG. 2 is a flow chart of another implementation of a testing method provided by an embodiment of the present application;
FIG. 3 is a flowchart of an implementation of a use case generating step provided in an embodiment of the present application;
FIG. 4 is a flowchart of an implementation of another testing method provided in the embodiments of the present application;
FIG. 5 is a block diagram of a testing apparatus according to an embodiment of the present disclosure;
fig. 6 is a block diagram of a server according to an embodiment of the present disclosure.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The embodiment of the application can acquire and process related data based on an artificial intelligence technology. Among them, Artificial Intelligence (AI) is a theory, method, technique and application system that simulates, extends and expands human Intelligence using a digital computer or a machine controlled by a digital computer, senses the environment, acquires knowledge and uses the knowledge to obtain the best result.
The artificial intelligence infrastructure generally includes technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technologies, operation/interaction systems, mechatronics, and the like. The artificial intelligence software technology mainly comprises a computer vision technology, a robot technology, a biological recognition technology, a voice processing technology, a natural language processing technology, machine learning/deep learning and the like.
In the embodiment of the application, the software function is tested based on the artificial intelligence technology.
The testing method according to the embodiment of the application can be executed by a server. When the test method is executed by the server, the execution subject is the server.
It should be noted that the server may include, but is not limited to, a server, a mobile phone, a tablet, a wearable smart device, and the like. The server may be an independent server, or may be a cloud server that provides basic cloud computing services such as a cloud service, a cloud database, cloud computing, a cloud function, cloud storage, a web service, cloud communication, a middleware service, a domain name service, a security service, a Content Delivery Network (CDN), and a big data and artificial intelligence platform.
Referring to fig. 1, fig. 1 shows a flowchart of an implementation of a testing method provided in an embodiment of the present application, including:
step 101, when a target operation program of a target application is updated, according to a program identifier of the target operation program, a test case for the target operation program is searched from a pre-stored test case set.
The test case comprises initial snapshot data, a program identifier of the target operation program and result snapshot data. The initial snapshot data is a data value at the beginning of executing the target operation program, and the result snapshot data is a data value at the end of executing the target operation program. For a certain target operation program, the data deviation between the initial snapshot data and the result snapshot data corresponding to the target operation program may generally reflect the operation effect of the target operation program. It should be noted that the initial snapshot data may be one data or a series of data. The resulting snapshot data may be one data or a series of data.
The target application may be various applications, such as an instant chat application. The target operating program is typically a functional program in the target application. For example, the target operating program may be a program for predicting the probability of occurrence of a certain event. Each target operating program may have a corresponding program identification. The program identification is generally information for identifying the target operating program. By way of example, the program identification may be 1, 2, 3, etc. In practice, the program identification is typically the program name of the target operating program.
Here, the target application may have a plurality of target operating programs, and the user may update any one or more target operating programs in the target application and then submit the updated target operating programs and/or program identifiers to the execution subject. Thus, the execution agent can obtain the updated target operation program and the program identifier of the target operation program.
Then, the execution subject may find the test case including the program identifier from the test case set by using the program identifier.
In addition, the update of the target operation program mentioned in the present embodiment is usually performed by updating one function implementation manner to another function implementation manner, and the functions of the target operation program before and after the update need not be changed.
And step 102, resetting the data in the target database according to the initial snapshot data.
The target database is used for storing relevant data of the target application. For example, real-time values of variables of the target application may be stored.
Here, the execution body may reset data in the target database to the initial snapshot data. As an example, if the initial snapshot data indicates that the value of the parameter a is 5 and the value of the parameter b is 25, the execution subject may set the value of the parameter a in the target database to 5 and the value of the parameter b to 25.
And 103, executing the updated target operation program to obtain test result data.
Here, the execution subject may execute the target operation program on the basis of the initial snapshot data, thereby obtaining test result data.
And step 104, determining the test passing state of the updated target operation program according to the test result data and the result snapshot data.
Wherein the test pass status may include a test passed status and a test failed status.
Here, the execution subject may perform consistency comparison using the test result data and the result snapshot data to obtain the updated test passing status of the target operating program.
In an optional implementation manner of each embodiment of the present application, if the test result data is consistent with the result snapshot data, it is determined that the test passing state of the updated target operation program is the test passed state
In addition, if the test result data is inconsistent with the result snapshot data, the test passing state of the updated target operating program is determined to be a test failing state.
It should be noted that, if the test pass status of the updated target operating program is the test passed status, it usually indicates that the updated target operating program can implement the original function. If the test pass status of the updated target operating program is the test fail status, it usually indicates that the updated target operating program cannot implement the original function.
According to the method provided by the embodiment, the test cases for the target operation programs in the target application are stored in advance, so that when the target operation program of the target application is updated, the updated target operation program is tested only by adopting the test case corresponding to the program identifier of the target operation program, and the test efficiency is improved.
Referring to fig. 2, fig. 2 is a flowchart illustrating an implementation of a testing method according to an embodiment of the present disclosure. The testing method provided by the embodiment may include the following steps:
step 201, in the running process of the target application, the execution state of each target operation program is monitored.
The execution state comprises an execution state and a non-execution state.
Here, a daemon process for monitoring the activity state of each target operating program in the target application may be created in advance in the target application. Therefore, in the running process of the target application, the daemon process of the target application can monitor the activity state of each target operating program in the target application in real time. The execution main body can interact with the daemon process to acquire the activity state information of each target operation program from the daemon process, so that the execution state of each target operation program is monitored. The daemon process is a special process running in the background and used for executing specific tasks. The daemon process is typically started when the target application is started and runs until the target application is closed.
In practice, each application typically has an Activity stack. The execution body may create a service process for monitoring the top content of the stack in advance, where the top content may indicate a currently running target operating program, and in practice, the top content may include a program name or a program identifier of the currently running target operating program. The service process can continuously monitor the Activity stack of the target application, and then know the currently running target operation program from the stack top content of the Activity stack, wherein the currently running target operation program is the target operation program in the executing state.
Step 202, aiming at the target operation program in the executing state, executing a preset case generation step to generate a test case aiming at the target operation program.
And the preset case generating step is used for generating a test case aiming at the target operation program.
Here, the execution subject may execute a preset case generation step for the target operation program in the executing state, so as to generate a corresponding test case for the target operation program in the executing state.
Step 203, when the target operation program of the target application is updated, searching the test case aiming at the target operation program from the pre-stored test case set according to the program identifier of the target operation program.
The test case comprises initial snapshot data, a program identifier of the target operation program and result snapshot data.
And step 204, resetting the data in the target database according to the initial snapshot data.
The target database is used for storing relevant data of the target application.
Step 205, executing the updated target operation program to obtain test result data.
And step 206, determining the test passing state of the updated target operation program according to the test result data and the result snapshot data.
Wherein the test pass status includes a test passed status and a test failed status.
In the present embodiment, the specific operations of steps 203-206 are substantially the same as the operations of steps 101-104 in the embodiment shown in fig. 1, and are not repeated herein.
The embodiment can realize that the test case is generated aiming at each target operation program in the process of running the target application.
In some optional implementations, the preset use case generating step may include, but is not limited to, the following steps 301-303. Fig. 3 is a flowchart of implementation of a use case generating step according to an embodiment of the present application.
Step 301, when the target operation program is executed, acquiring data in the target database in the form of data snapshot, recording the data as initial snapshot data, and generating an operation event for recording the execution of the target operation program.
And the operation event records a program identifier corresponding to the target operation program. The operation event is generally used to record information that the target operation program is executed, and the operation event generally includes a program identifier corresponding to the target operation program.
Here, when the target operating program is executed, the executing entity may obtain data currently stored in the target database in a data snapshot manner, and record the data as initial snapshot data. In addition, the execution subject may also generate an operation event for the target operation program.
Step 302, when the data in the target database changes, the changed data in the target database is obtained in the form of data snapshot and recorded as result snapshot data.
Here, the execution subject may monitor the change of the target database before detecting that the next target operation program is executed, and once the data in the target database changes, the changed data in the target database may be obtained in a form of a data snapshot in time. For convenience of description, the acquired data is referred to as result snapshot data.
Step 303, based on the operation event, the initial snapshot data, and the result snapshot data, a test case for the target operation program is generated.
Here, the execution subject may extract an operation identifier in the operation event, and combine the operation identifier, the initial snapshot data, and the result snapshot data to generate a test case for the target operation program.
In practice, because the result snapshot data of the previously executed target operation program is the same as the initial snapshot data of the subsequently executed target operation program between two successively executed target operation programs, the result snapshot data of the previously executed target operation program can be directly determined as the subsequently executed initial snapshot data for the target operation programs other than the first target operation program. The efficiency of obtaining the test cases of the target operation programs is improved.
Referring to fig. 4, fig. 4 is a flowchart illustrating an implementation of a testing method according to an embodiment of the present disclosure. The testing method provided by the embodiment may include the following steps:
step 401, when the target operation program of the target application is updated, according to the program identifier of the target operation program, searching a test case for the target operation program from a pre-stored test case set.
The test case comprises initial snapshot data, a program identifier of the target operation program and result snapshot data.
And step 402, resetting the data in the target database according to the initial snapshot data.
The target database is used for storing relevant data of the target application.
And step 403, executing the updated target operation program to obtain test result data.
And step 404, determining a test passing state of the updated target operation program according to the test result data and the result snapshot data.
Wherein the test pass status includes a test passed status and a test failed status.
In the present embodiment, the specific operations of steps 401 and 404 are substantially the same as the operations of steps 101 and 104 in the embodiment shown in fig. 1, and are not repeated herein.
Step 405, testing each target operation program according to the sequence of execution of each target operation program in the target application and the test case of each target operation program, and obtaining test result data for each target operation program.
Here, each target operation program in the target application generally has a sequential execution order. For example, if the target application has 3 target operation programs, which are a, b, and c, respectively, the sequential execution order of the first, second, and c in the target application may be: executing the first, then executing the second and finally executing the third.
The execution main body can test each target operation program in sequence according to the sequence of execution of each target operation program. Specifically, for each target operation program in the target application, the target operation program is tested by using the test case corresponding to the target operation program, so as to obtain test result data.
And 406, determining the test passing state of the corresponding target operation program according to the test case and the test result data of each target operation program.
Here, for each target operating program in the target application, the execution subject may perform consistency comparison between result snapshot data described in the test case corresponding to the target operating program and currently generated test result data to determine a test passing state of the target operating program. Specifically, if the test result data is consistent with the result snapshot data, the test pass status of the target operating program is determined to be the test passed status. Otherwise, if the test result data is inconsistent with the result snapshot data, determining that the test passing state of the target operating program is a test failing state.
Step 407, if the test passing states of the target operation programs are all test passed states, generating first prompt information for prompting that the target application tests to pass.
Wherein the first prompt message is typically a message for prompting the target application to test.
Here, if all the target operation programs pass the test, the execution main body may generate the first prompt message.
According to the embodiment, the test cases corresponding to the target operation programs can be adopted to test the target operation programs in sequence, so that the test of the whole target application is realized.
In some optional implementations, after determining the test pass status of the corresponding target operating program, the test method may further include: and if the target operation program with the corresponding test passing state as the test failing state exists, generating second prompt information for prompting that the corresponding target operation program in the target application fails in the test.
The second prompt message is typically a message for prompting that the corresponding target operating program in the target application fails the test.
Here, if there is a target operation program for which the test failed, the second prompt information is generated. Therefore, the user can timely know which target operation program fails to pass the test, and the target operation program which fails to pass the test is directly modified, so that the targeted modification of the program is facilitated.
In some optional implementations, after obtaining the test result data for each target operating program, the test method may further include:
and generating a data flow diagram aiming at the target application according to the test result data of each target operation program.
The data flow diagram comprises points and lines, the lines in the data flow diagram are used for indicating the target operation programs, and the points at two ends of the lines in the data flow diagram are used for indicating test result data corresponding to two target operation programs executed successively.
The execution main body generates a data flow diagram by adopting the test result data of each target operation program, can intuitively present the test condition of each target operation program, and is favorable for intuitively and accurately positioning the target operation program with problems.
Referring to fig. 5, fig. 5 is a block diagram of a testing apparatus 500 according to an embodiment of the present disclosure. The test apparatus in this embodiment comprises units for performing the steps in the embodiments corresponding to fig. 1-4. Please refer to fig. 1-4 and the related descriptions of the embodiments corresponding to fig. 1-4. For convenience of explanation, only the portions related to the present embodiment are shown. Referring to fig. 5, the test apparatus 500 includes:
the case searching unit 501 is configured to search a test case for a target operation program from a pre-stored test case set according to a program identifier of the target operation program when the target operation program of the target application is updated, where the test case includes initial snapshot data, the program identifier of the target operation program, and result snapshot data;
a data resetting unit 502, configured to reset data in a target database according to the initial snapshot data, where the target database is used to store relevant data of a target application;
a program executing unit 503, configured to execute the updated target operation program to obtain test result data;
a state determining unit 504, configured to determine a test passing state of the updated target operating program according to the test result data and the result snapshot data, where the test passing state includes a test passed state and a test failed state.
As an embodiment of the present application, the apparatus may further include a use case generation unit (not shown in the figure). Wherein the use case generation unit is used for: monitoring the execution state of each target operation program in the running process of the target application, wherein the execution state comprises an execution state and a non-execution state; and executing a preset case generation step aiming at the target operation program in the executing state so as to generate a test case aiming at the target operation program.
As an embodiment of the present application, in the use case generating unit, the preset use case generating step may include: when a target operation program is executed, acquiring data in a target database in a data snapshot mode, recording the data as initial snapshot data, and generating an operation event for recording the execution of the target operation program, wherein a program identifier corresponding to the target operation program is recorded in the operation event; when the data in the target database changes, the changed data in the target database is acquired in a data snapshot mode and recorded as result snapshot data; and generating a test case aiming at the target operation program based on the operation event, the initial snapshot data and the result snapshot data.
As an embodiment of the present application, the apparatus may further include an application test unit (not shown in the figure). Wherein the application test unit is configured to: testing each target operation program according to the sequence of execution of each target operation program in the target application and the test case of each target operation program to obtain test result data aiming at each target operation program; determining the test passing state of the corresponding target operation program according to the test case and the test result data of each target operation program; and if the test passing states of the target operation programs are the test passed states, generating first prompt information for prompting that the target application tests pass.
As an embodiment of the present application, the application test unit is further configured to: and if the target operation program with the corresponding test passing state as the test failing state exists, generating second prompt information for prompting that the corresponding target operation program in the target application fails in the test.
As an embodiment of the present application, the application test unit is further configured to: and generating a data flow diagram aiming at the target application according to the test result data of each target operation program, wherein the data flow diagram comprises points and lines, the lines in the data flow diagram are used for indicating the target operation programs, and the points at two ends of the lines in the data flow diagram are used for indicating the test result data respectively corresponding to the two target operation programs executed successively.
As an embodiment of the present application, the state determining unit 504 is specifically configured to: and if the test result data is consistent with the result snapshot data, determining that the test passing state of the updated target operation program is a test passed state.
The device provided by this embodiment, by storing the test cases for the target operating programs in the target application in advance, when the target operating program of the target application is updated, only the test case corresponding to the program identifier of the target operating program needs to be used to test the updated target operating program, which is beneficial to improving the test efficiency.
It should be understood that, in the structural block diagram of the testing apparatus shown in fig. 5, each unit is used to execute each step in the embodiment corresponding to fig. 1 to 4, and each step in the embodiment corresponding to fig. 1 to 4 has been explained in detail in the above embodiment, and specific reference is made to the relevant description in the embodiments corresponding to fig. 1 to 4 and fig. 1 to 4, which is not repeated herein.
Fig. 6 is a block diagram of a server according to another embodiment of the present application. As shown in fig. 6, the server 600 of this embodiment includes: a processor 601, a memory 602, and a computer program 603, such as a program of a test method, stored in the memory 602 and executable on the processor 601. The processor 601, when executing the computer program 603, implements the steps in the various embodiments of the testing methods described above, such as the steps 101 to 104 shown in fig. 1. Alternatively, when the processor 601 executes the computer program 603, the functions of the units in the embodiment corresponding to fig. 5, for example, the functions of the units 501 to 504 shown in fig. 5, are implemented, and please refer to the related description in the embodiment corresponding to fig. 5, which is not described herein again.
Illustratively, the computer program 603 may be partitioned into one or more units, which are stored in the memory 602 and executed by the processor 601 to complete the present application. One or more elements may be a sequence of computer program instruction segments for describing the execution of the computer program 603 in the server 600, which can perform certain functions. For example, the computer program 603 may be divided into a use case finding unit, a data resetting unit, a program executing unit, and a state determining unit, and the specific functions of each unit are as described above.
The server may include, but is not limited to, a processor 601, a memory 602. Those skilled in the art will appreciate that fig. 6 is merely an example of a server 600, and does not constitute a limitation on server 600, and may include more or fewer components than shown, or some components in combination, or different components, e.g., a turntable device may also include input output devices, network access devices, buses, etc.
The Processor 601 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The storage 602 may be an internal storage unit of the server 600, such as a hard disk or a memory of the server 600. The memory 602 may also be an external storage device of the server 600, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like provided on the server 600. Further, the memory 602 may also include both internal storage units of the server 600 and external storage devices. The memory 602 is used to store computer programs and other programs and data required by the turntable device. The memory 602 may also be used to temporarily store data that has been output or is to be output.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated module, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in a computer readable storage medium. The computer readable storage medium may be non-volatile or volatile. Based on such understanding, all or part of the flow in the method of the embodiments described above can be realized by a computer program, which can be stored in a computer readable storage medium and can realize the steps of the embodiments of the methods described above when the computer program is executed by a processor. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable storage medium may include: any entity or device capable of carrying computer program code, recording medium, U.S. disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution media, and the like. It should be noted that the computer readable storage medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable storage media that does not include electrical carrier signals and telecommunications signals in accordance with legislation and patent practice.
The above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.

Claims (10)

1. A method of testing, the method comprising:
when a target operation program of a target application is updated, searching a test case aiming at the target operation program from a pre-stored test case set according to a program identifier of the target operation program, wherein the test case comprises initial snapshot data, the program identifier of the target operation program and result snapshot data;
resetting data in a target database according to the initial snapshot data, wherein the target database is used for storing relevant data of the target application;
executing the updated target operation program to obtain test result data;
and determining a test passing state of the updated target operating program according to the test result data and the result snapshot data, wherein the test passing state comprises a test passed state and a test failed state.
2. The method of testing of claim 1, further comprising:
monitoring the execution state of each target operation program in the running process of the target application, wherein the execution state comprises an execution state and a non-execution state;
and executing a preset case generation step aiming at the target operation program in the executing state so as to generate a test case aiming at the target operation program.
3. The testing method according to claim 2, wherein the preset case generating step includes:
when a target operation program is executed, acquiring data in the target database in a data snapshot mode, recording the data as initial snapshot data, and generating an operation event for recording the execution of the target operation program, wherein a program identifier corresponding to the target operation program is recorded in the operation event;
when the data in the target database changes, the changed data in the target database is acquired in a data snapshot mode and recorded as result snapshot data;
and generating a test case aiming at the target operation program based on the operation event, the initial snapshot data and the result snapshot data.
4. The method of testing of claim 1, further comprising:
testing each target operation program according to the sequence of execution of each target operation program in the target application and the test case of each target operation program to obtain test result data aiming at each target operation program;
determining the test passing state of the corresponding target operation program according to the test case and the test result data of each target operation program;
and if the test passing states of the target operation programs are the test passed states, generating first prompt information for prompting that the target application tests pass.
5. The method of claim 4, wherein after said determining a test pass status of the respective target operating program, the method further comprises:
and if the target operation program with the corresponding test passing state as the test failing state exists, generating second prompt information for prompting that the corresponding target operation program in the target application fails in the test.
6. The method of claim 4, wherein after said obtaining test result data for each target operating program, the method further comprises:
and generating a data flow diagram aiming at the target application according to the test result data of each target operation program, wherein the data flow diagram comprises points and lines, the lines in the data flow diagram are used for indicating the target operation programs, and the points at two ends of the lines in the data flow diagram are used for indicating the test result data respectively corresponding to the two target operation programs executed successively.
7. The method according to any one of claims 1 to 6, wherein the determining a test pass status of the updated target operating program according to the test result data and the result snapshot data includes:
and if the test result data is consistent with the result snapshot data, determining that the test passing state of the updated target operation program is a test passed state.
8. A test apparatus, the apparatus comprising:
the test case searching unit is used for searching a test case aiming at a target operation program from a pre-stored test case set according to a program identifier of the target operation program when the target operation program of a target application is updated, wherein the test case comprises initial snapshot data, the program identifier of the target operation program and result snapshot data;
the data resetting unit is used for resetting data in a target database according to the initial snapshot data, and the target database is used for storing relevant data of the target application;
the program execution unit is used for executing the updated target operation program to obtain test result data;
and the state determining unit is used for determining the test passing state of the updated target operating program according to the test result data and the result snapshot data, wherein the test passing state comprises a test passing state and a test failing state.
9. A server comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the steps of the method according to any of claims 1 to 7 are implemented when the computer program is executed by the processor.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 7.
CN202110975923.9A 2021-08-24 2021-08-24 Test method, test device, server and storage medium Pending CN113672514A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110975923.9A CN113672514A (en) 2021-08-24 2021-08-24 Test method, test device, server and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110975923.9A CN113672514A (en) 2021-08-24 2021-08-24 Test method, test device, server and storage medium

Publications (1)

Publication Number Publication Date
CN113672514A true CN113672514A (en) 2021-11-19

Family

ID=78545710

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110975923.9A Pending CN113672514A (en) 2021-08-24 2021-08-24 Test method, test device, server and storage medium

Country Status (1)

Country Link
CN (1) CN113672514A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116467223A (en) * 2023-06-20 2023-07-21 建信金融科技有限责任公司 Method, device, system, equipment and medium for generating test report

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20090065144A (en) * 2007-12-17 2009-06-22 한국전자통신연구원 System and method for testing graphic user interface of mobile application software
CN104123219A (en) * 2013-04-28 2014-10-29 国际商业机器公司 Method and device for testing software
CN107577597A (en) * 2017-08-08 2018-01-12 广州视源电子科技股份有限公司 Installation kit automated testing method, device, equipment and storage medium
CN111124911A (en) * 2019-12-20 2020-05-08 苏州浪潮智能科技有限公司 Automatic testing method, device, equipment and readable storage medium
CN111475401A (en) * 2020-03-19 2020-07-31 平安国际智慧城市科技股份有限公司 Test method and related equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20090065144A (en) * 2007-12-17 2009-06-22 한국전자통신연구원 System and method for testing graphic user interface of mobile application software
CN104123219A (en) * 2013-04-28 2014-10-29 国际商业机器公司 Method and device for testing software
CN107577597A (en) * 2017-08-08 2018-01-12 广州视源电子科技股份有限公司 Installation kit automated testing method, device, equipment and storage medium
CN111124911A (en) * 2019-12-20 2020-05-08 苏州浪潮智能科技有限公司 Automatic testing method, device, equipment and readable storage medium
CN111475401A (en) * 2020-03-19 2020-07-31 平安国际智慧城市科技股份有限公司 Test method and related equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116467223A (en) * 2023-06-20 2023-07-21 建信金融科技有限责任公司 Method, device, system, equipment and medium for generating test report
CN116467223B (en) * 2023-06-20 2023-09-19 建信金融科技有限责任公司 Method, device, system, equipment and medium for generating test report

Similar Documents

Publication Publication Date Title
US10769228B2 (en) Systems and methods for web analytics testing and web development
CN106844217B (en) Method and device for embedding point of applied control and readable storage medium
US20170168885A1 (en) System and Method for Testing Internet of Things Network
CN109800258B (en) Data file deployment method, device, computer equipment and storage medium
CN108874678B (en) Automatic testing method and device for intelligent program
US20200089594A1 (en) Artificial intelligence for load testing
US20210234833A1 (en) Application firewalls based on self-modeling service flows
US9286195B2 (en) Derivation of generalized test cases
CN114218568B (en) Big data attack processing method and system applied to cloud service
CN111884876A (en) Method, device, equipment and medium for detecting protocol type of network protocol
CN114116496A (en) Automatic testing method, device, equipment and medium
CN113590454A (en) Test method, test device, computer equipment and storage medium
CN113672514A (en) Test method, test device, server and storage medium
CN114237754A (en) Data loading method and device, electronic equipment and storage medium
EP3011454A1 (en) Generating a fingerprint representing a response of an application to a simulation of a fault of an external service
CN114546814A (en) Recording playback method, recording playback device and storage medium
CN111708712A (en) User behavior test case generation method, flow playback method and electronic equipment
CN115712571A (en) Interactive service test device, interactive service test device, computer equipment and storage medium
CN114238129A (en) Method, device and equipment for generating interface data and storage medium
CN114281549A (en) Data processing method and device
CN112015648A (en) Test method, device, computer equipment and medium based on automation script
CN114510409A (en) Application program code detection method and computer readable storage medium
CN114812695B (en) Product testing method and device, computer equipment and storage medium
CN113190465B (en) Test information processing method, device, equipment and storage medium
CN117112051A (en) Component topology map generation method and device, computer 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