CN111274154A - Automatic testing method, device, equipment and storage medium - Google Patents

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

Info

Publication number
CN111274154A
CN111274154A CN202010102250.1A CN202010102250A CN111274154A CN 111274154 A CN111274154 A CN 111274154A CN 202010102250 A CN202010102250 A CN 202010102250A CN 111274154 A CN111274154 A CN 111274154A
Authority
CN
China
Prior art keywords
test
target
result
target test
test case
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
CN202010102250.1A
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.)
Beijing Milaiwu Network Technology Co ltd
Original Assignee
Beijing Milaiwu Network Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Milaiwu Network Technology Co ltd filed Critical Beijing Milaiwu Network Technology Co ltd
Priority to CN202010102250.1A priority Critical patent/CN111274154A/en
Publication of CN111274154A publication Critical patent/CN111274154A/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

Abstract

The embodiment of the invention discloses an automatic testing method, device, equipment and storage medium. Wherein, the method comprises the following steps: responding to a test execution instruction of a user, and acquiring basic information of a target test case; wherein the basic information includes at least target test interface information and expected results; calling the target test case function interface according to the target test interface information to obtain an execution result of the test execution instruction; and comparing the execution result with the expected result to determine the test result of the target test case functional interface. According to the embodiment of the invention, the target test case is selected, the execution result is compared with the expected result, and the test result of the target test case is determined, so that the automatic test of the test case is realized, the test script is prevented from being manually used by a tester for testing, the labor and the time are saved, and the test efficiency is improved.

Description

Automatic testing method, device, equipment and storage medium
Technical Field
The present invention relates to automation technologies, and in particular, to a method, an apparatus, a device, and a storage medium for automated testing.
Background
The intelligent device has an important role in the life of people, the updating of the device is faster and faster, and before the device is put into use, the device needs to be tested in each function, so that the device can be normally used.
In the prior art, testing each function on the device usually requires a special worker to manually test each function, and continuously adjusts the existing automatic test script. After the staff obtains the test result, the staff needs to analyze and judge the test result by himself.
However, setting up a special automatic testing department results in higher testing cost, wastes a lot of manpower and time, easily causes errors in the judgment of the testing result, and has lower efficiency of automatic testing.
Disclosure of Invention
The embodiment of the invention provides an automatic test method, device, equipment and storage medium, which are used for realizing automatic test and result comparison of a target test case, saving test labor and time and improving test efficiency.
In a first aspect, an embodiment of the present invention provides an automated testing method, where the method includes:
responding to a test execution instruction of a user, and acquiring basic information of a target test case; wherein the basic information includes at least target test interface information and expected results;
calling the target test case function interface according to the target test interface information to obtain an execution result of the test execution instruction;
and comparing the execution result with the expected result to determine the test result of the target test case functional interface.
In a second aspect, an embodiment of the present invention further provides an automatic testing apparatus, where the apparatus includes:
the basic information acquisition module is used for responding to a test execution instruction of a user and acquiring basic information of a target test case; wherein the basic information includes at least target test interface information and expected results;
the execution result obtaining module is used for calling the target test case function interface according to the target test interface information to obtain the execution result of the test execution instruction;
and the test result determining module is used for comparing the execution result with the expected result and determining the test result of the target test case functional interface.
In a third aspect, an embodiment of the present invention further provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor executes the computer program to implement the automated testing method according to any embodiment of the present invention.
In a fourth aspect, embodiments of the present invention also provide a storage medium containing computer-executable instructions, which when executed by a computer processor, are configured to perform an automated testing method according to any of the embodiments of the present invention.
The embodiment of the invention responds to the execution instruction of the target test case from the user, calls the functional interface of the target test case, automatically executes the running process of the target test case, and compares the execution result of the target test case with the preset expected result to obtain the test result of the target test case. The problem of among the prior art, the tester when the test, need carry out the editor to the test script is solved, reduced the professional requirement to the tester, practiced thrift a large amount of manpowers and time to through the automatic judgement to the test result, avoid artifical judgement mistake, realize the automation of test, improve efficiency of software testing.
Drawings
FIG. 1 is a flow chart illustrating an automated testing method according to a first embodiment of the present invention;
FIG. 2 is a flowchart illustrating an automated testing method according to a second embodiment of the present invention;
FIG. 3 is a block diagram of an automated testing apparatus according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of a computer device in the fourth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Example one
Fig. 1 is a flowchart illustrating an automated testing method according to an embodiment of the present invention, which can be implemented by an automated testing apparatus. As shown in fig. 1, the method specifically includes the following steps:
s110, responding to a test execution instruction of a user, and acquiring basic information of a target test case; wherein the basic information includes at least target test interface information and expected results.
The user sends a test execution instruction aiming at the target test case to the server, and the server receives the test execution instruction and acquires the basic information of the target test case from the database. The basic information may include target test interface information, expected results, and the like. The target test interface information is a target test interface name to be called when the target test case is operated and target test interface basic information, the target test interface basic information may include parameters such as a target test interface protocol and a target test calling path, and an expected result is a result of successful test of the preset target test case. For example, the server sets basic information of a login function case and a purchase function case of a test object in advance, determines that a target test case is the login function case according to selection operation of a user, and then acquires target test interface information and an expected result of the login function case from a database.
In this embodiment, optionally, before executing the instruction in response to the test of the user, the method further includes: responding to a target test case selection instruction of a user, and determining a target test case from preset candidate test cases; and determining a target execution environment from preset candidate execution environments in response to a target execution environment selection instruction of a user.
Specifically, the user may preset test cases of different functions of the test object in the server as candidate test cases. The user can send a target test case selection instruction to the server, the server receives the target test case selection instruction, preset candidate test cases are displayed to the user, and the user determines the target test case from the candidate test cases. The candidate test case is a test case which is tested by the user at least once in advance, and the test case can be added into the candidate test case after the user tests the test case at least once. When the user needs to test the test case again, the test case can be selected from the candidate test cases, and the test result can be directly obtained. When the function of the test object is upgraded and the old function of the new function needs to be tested before the new function is tested, the test case with the old function can be selected from the candidate test cases, so that the waste of time caused by the retest of the old function is avoided. For example, the old function of the test object is a login function and the new function is a purchase function. When the user needs to ensure that the login function is normal when the purchase function is tested, the user can select the login function case from the candidate test cases, directly test whether the login function is normal or not, and test the purchase function after the login function test is automatically completed. The user is prevented from repeatedly testing the login function again, the test time is wasted, and a new purchase function is quickly linked up. The beneficial effect who sets up like this lies in, effectively reduces the time of retest, improves efficiency of software testing.
Before sending a test execution instruction to the server, the user may also send a target execution environment selection instruction to select a required target execution environment, and the user may set environment parameters of candidate execution environments in the server in advance to distinguish the execution environments. For example, the candidate execution environments may include a test environment and a production environment. The test environment is that the test object is tested in a laboratory environment before being marketed; the production environment is that after the test object is on the market, the test is carried out in the living environment of the user. The user presets a test environment value and a production environment value, and different test results can be obtained by referring to different environment values during testing. The server responds to the target execution environment selection instruction of the user, so that the user can quickly switch the execution environment, the data switching between the test environment and the production environment is realized, the test requirement of the user is met, and the accuracy of the test result is improved.
And S120, calling a target test case function interface according to the target test interface information to obtain an execution result of the test execution instruction.
The server acquires target test interface information of the target test case and determines a functional interface of the target test case. And calling the target test case function interface according to parameters such as an interface protocol and a calling path of the target test case function interface, and operating the target test case to obtain an execution result of the test execution instruction aiming at the target test case.
In this embodiment, optionally, the target test interface information at least includes a target test interface protocol and a test completion data format; the execution result at least comprises a test completion degree and test completion data; correspondingly, according to the target test interface information, calling a target test case function interface to obtain an execution result of the test execution instruction, including: according to the target test interface protocol, operating the target test case function interface in the target test interface protocol; and obtaining the test completion degree and the test completion data in the execution result, and expressing the test completion data in a test completion data format.
Specifically, after determining the target test case, the server obtains basic information of the target test case, where the basic information may include target test interface information and an expected result. The target test interface information may include a target test interface name and target test interface basic information, and the target test interface basic information may include parameters such as a target test interface protocol, a test completion data format, and a target test call path. When different data are tested, the parameters matched with the target test case are adopted for testing, manual operation is reduced, and the testing efficiency is improved. After the target test case is tested, an execution result of the target test case can be obtained, and the execution result can include test completion and test completion data. The test completion degree represents whether the target test case functional interface completes operation, namely whether the target test case completes the test. The test completion data represents the test data of the target test case after the test is completed, the test completion data and the expected result are expressed in a test completion data format, and the test completion data format is predefined by a user.
After the server determines the target test interface protocol, the server runs the target test case function interface with the target test interface protocol to execute the test of the target test case. And after the test is finished, obtaining an execution result comprising the test completion degree and the test completion data. For example, the user tests the purchase function use case of the test object, wherein the purchase function use case is that A, B and C products are purchased, and one copy of each product is purchased. After the test is finished, the test completion degree indicates that the purchasing process is completed, and the test completion data indicates that one product A is purchased, one product B is purchased, and two products C are purchased. The beneficial effect who sets up like this lies in, can make the user understand the test result comprehensively, avoids judging the mistake to the test result, improves the judgment precision of test result.
And S130, comparing the execution result with an expected result, and determining the test result of the target test case functional interface.
After obtaining the execution result of the target test case, the server compares the execution result with an expected result, and if the execution result is consistent with the expected result, the server determines that the functional interface of the target test case operates normally and the target test case is tested successfully; and if the execution result is inconsistent with the expected result, determining that the operation of the functional interface of the target test case fails and the target test case fails to test.
In this embodiment, optionally, before comparing the execution result with the expected result and determining the test result of the target test case functional interface, the method further includes: determining whether the target test case function interface finishes running or not according to the test completion degree in the execution result; and if the operation of the functional interface of the target test case is interrupted, determining that the target test case fails to test.
Specifically, the server obtains an execution result including the test completion and the test completion data, and checks the test completion in the execution result before comparing the execution result with an expected result. If the test completion level indicates that the test is not completed, the target test case functional interface is in failure during operation, and the target test case is determined to fail to test. And if the test completion degree indicates that the test is completed, further judging the test completion data. For example, the user tests the purchase function of the test object, and the purchase function use cases are A, B and C products, and each product is purchased by one copy. After the test is finished, the test completion degree indicates that the purchasing process is completed, and the test completion data indicates that one product A is purchased, one product B is purchased, and two products C are purchased. Although the test completion level indicates that the purchase process is complete, the test cannot be proven to be successful. The beneficial effect who sets up like this lies in, can select the case of test failure fast through the test completion degree, improves the efficiency of test.
In this embodiment, optionally, determining whether the target test case function interface completes the operation according to the test completion degree in the execution result, further includes: if the target test case functional interface finishes running, comparing the test completion data in the execution result with an expected result; if the test completion data is consistent with the expected result, determining that the target test case is tested successfully; and if the test completion data is inconsistent with the expected result, determining that the target test case fails to test.
Specifically, if the test completion indicates that the target test case function interface completes operation, the test completion data in the execution result is compared with the expected result. If the test completion data is consistent with the expected result, determining that the target test case is tested successfully; if the test completion data is not consistent with the expected result, the target test case is determined to fail through the test completion data although the test completion data indicates that the target test case functional interface completes operation. The beneficial effect who sets up like this lies in, can avoid carrying out wrong judgement to the test result through the test completion degree, improves the judgement accuracy nature of test result.
According to the technical scheme of the embodiment, the execution instruction of the target test case by the user is responded, the functional interface of the target test case is called, the running process of the target test case is automatically executed, and the execution result of the target test case is compared with the preset expected result to obtain the test result of the target test case. The problem of among the prior art, the tester when the test, need carry out the editor to the test script is solved, reduced the professional requirement to the tester, practiced thrift a large amount of manpowers and time to through the automatic judgement to the test result, avoid artifical judgement mistake, realize the automation of test, improve efficiency of software testing.
Example two
Fig. 2 is a schematic flow chart of an automated testing method according to a second embodiment of the present invention, which is optimized based on the second embodiment and can be executed by an automated testing apparatus. As shown in fig. 2, the method specifically includes the following steps:
s210, responding to a test execution instruction of a user, and acquiring basic information of a target test case; wherein the basic information includes at least target test interface information and expected results.
And S220, calling a target test case function interface according to the target test interface information to obtain an execution result of the test execution instruction.
And S230, comparing the execution result with the expected result, and determining the test result of the target test case functional interface.
And S240, storing the test result of the target test case functional interface and the operation node with the test failure in a database, so that a user can check the test result and the operation node conveniently.
After the server obtains the test result, the test result of the target test case is stored in the database, and the test result may include the test completion degree and the test completion data in the execution result. If the target test case fails to test, the test result may further include an operation node where the functional interface of the target test case fails during operation, that is, the reason of the test failure is recorded. When the user checks the test object subsequently, the test object can be improved in a targeted manner through the recorded data, so that the pressure of developers is reduced, and the development efficiency is improved. The development program is prevented from being checked one by one when the user improves the development program, and a large amount of labor and time are saved. And the user can check the test cases with successful test and failed test so as to perform repeated test on the cases with failed test and improve the test efficiency. For example, the user tests the purchase function of the test object, and the purchase function use cases are A, B and C products, and each product is purchased by one copy. After the test is finished, the test completion degree indicates that the purchasing process is completed, and the test completion data indicates that one product A is purchased, one product B is purchased, and two products C are purchased. The server stores the test result and records that the node failed in the test is determined to be the purchase quantity. The user can quickly find the reason of the test failure by checking the data record, and the product improvement efficiency is improved.
The embodiment of the invention responds to the execution instruction of the target test case from the user, calls the functional interface of the target test case, automatically executes the running process of the target test case, and compares the execution result of the target test case with the preset expected result to obtain the test result of the target test case. And the test result is recorded, so that the user can conveniently check and improve the test result. The problem of among the prior art, the tester when testing, need edit the test script is solved, reduced the professional requirement to the tester. Through the automatic judgment of the test result, the manual judgment error is avoided, and the test automation is realized. The user can check the test data at any time, and the improvement is carried out aiming at the failure reason, so that a large amount of manpower and time are saved, and the efficiency of product testing and development is improved.
EXAMPLE III
Fig. 3 is a block diagram of an automated testing apparatus according to a third embodiment of the present invention, which is capable of executing an automated testing method according to any embodiment of the present invention, and has functional modules and beneficial effects corresponding to the execution method. As shown in fig. 3, the apparatus specifically includes:
a basic information obtaining module 301, configured to obtain basic information of a target test case in response to a test execution instruction of a user; wherein the basic information at least comprises target test interface information and expected results;
an execution result obtaining module 302, configured to call a target test case function interface according to the target test interface information to obtain an execution result of the test execution instruction;
and the test result determining module 303 is configured to compare the execution result with an expected result, and determine a test result of the target test case function interface.
In this embodiment, optionally, the apparatus further includes:
the target test case determining module is used for responding to a target test case selection instruction of a user and determining a target test case from preset candidate test cases;
and the target execution environment determining module is used for responding to a target execution environment selection instruction of a user and determining a target execution environment from preset candidate execution environments.
In this embodiment, optionally, the target test interface information at least includes a target test interface protocol and a test completion data format;
the execution result at least comprises a test completion degree and test completion data;
accordingly, the execution result obtaining module 302 is specifically configured to:
according to the target test interface protocol, operating the target test case function interface in the target test interface protocol;
and obtaining the test completion degree and the test completion data in the execution result, and expressing the test completion data in a test completion data format.
In this embodiment, optionally, the apparatus further includes:
the operation completion determining module is used for determining whether the target test case functional interface completes the operation according to the test completion degree in the execution result;
and the test failure determining module is used for determining the test failure of the target test case if the operation of the functional interface of the target test case fails.
In this embodiment, optionally, the completion operation determining module is further specifically configured to:
if the target test case functional interface finishes running, comparing the test completion data in the execution result with an expected result;
if the test completion data is consistent with the expected result, determining that the target test case is tested successfully;
and if the test completion data is inconsistent with the expected result, determining that the target test case fails to test.
In this embodiment, optionally, the apparatus further includes:
and the test result storage module is used for storing the test result of the target test case functional interface and the operation node with the test failure into the database, so that the user can check the test result conveniently.
The embodiment of the invention responds to the execution instruction of the target test case from the user, calls the functional interface of the target test case, automatically executes the running process of the target test case, and compares the execution result of the target test case with the preset expected result to obtain the test result of the target test case. The problem of among the prior art, the tester when the test, need carry out the editor to the test script is solved, reduced the professional requirement to the tester, practiced thrift a large amount of manpowers and time to through the automatic judgement to the test result, avoid artifical judgement mistake, realize the automation of test, improve efficiency of software testing.
Example four
Fig. 4 is a schematic structural diagram of a computer device according to a fourth embodiment of the present invention. FIG. 4 illustrates a block diagram of an exemplary computer device 400 suitable for use in implementing embodiments of the present invention. The computer device 400 shown in fig. 4 is only an example and should not bring any limitations to the functionality or scope of use of the embodiments of the present invention.
As shown in fig. 4, computer device 400 is in the form of a general purpose computing device. The components of computer device 400 may include, but are not limited to: one or more processors or processing units 401, a system memory 402, and a bus 403 that couples the various system components (including the system memory 402 and the processing unit 401).
Bus 403 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, micro-channel architecture (MAC) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Computer device 400 typically includes a variety of computer system readable media. Such media can be any available media that is accessible by computer device 400 and includes both volatile and nonvolatile media, removable and non-removable media.
The system memory 402 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM)404 and/or cache memory 405. The computer device 400 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 406 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 4, and commonly referred to as a "hard drive"). Although not shown in FIG. 4, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to the bus 403 by one or more data media interfaces. Memory 402 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
A program/utility 408 having a set (at least one) of program modules 407 may be stored, for example, in memory 402, such program modules 407 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. Program modules 407 generally perform the functions and/or methods of the described embodiments of the invention.
The computer device 400 may also communicate with one or more external devices 409 (e.g., keyboard, pointing device, display 410, etc.), with one or more devices that enable a user to interact with the computer device 400, and/or with any devices (e.g., network card, modem, etc.) that enable the computer device 400 to communicate with one or more other computing devices. Such communication may be through input/output (I/O) interface 411. Moreover, computer device 400 may also communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network such as the Internet) via network adapter 412. As shown, network adapter 412 communicates with the other modules of computer device 400 over bus 403. It should be appreciated that although not shown in the figures, other hardware and/or software modules may be used in conjunction with computer device 400, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
The processing unit 401 executes various functional applications and data processing by running the program stored in the system memory 402, for example, to implement an automated testing method provided by the embodiment of the present invention, including:
responding to a test execution instruction of a user, and acquiring basic information of a target test case; wherein the basic information at least comprises target test interface information and expected results;
calling a target test case function interface according to the target test interface information to obtain an execution result of the test execution instruction;
and comparing the execution result with the expected result, and determining the test result of the functional interface of the target test case.
EXAMPLE five
The fifth embodiment of the present invention further provides a storage medium containing computer-executable instructions, where a computer program is stored on the storage medium, and when the computer program is executed by a processor, the method for implementing an automated testing provided by the fifth embodiment of the present invention includes:
responding to a test execution instruction of a user, and acquiring basic information of a target test case; wherein the basic information at least comprises target test interface information and expected results;
calling a target test case function interface according to the target test interface information to obtain an execution result of the test execution instruction;
and comparing the execution result with the expected result, and determining the test result of the functional interface of the target test case.
Computer storage media for embodiments of the invention may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. An automated testing method, comprising:
responding to a test execution instruction of a user, and acquiring basic information of a target test case; wherein the basic information includes at least target test interface information and expected results;
calling the target test case function interface according to the target test interface information to obtain an execution result of the test execution instruction;
and comparing the execution result with the expected result to determine the test result of the target test case functional interface.
2. The method of claim 1, further comprising, prior to executing the instructions in response to the user's test:
responding to a target test case selection instruction of a user, and determining a target test case from preset candidate test cases;
and determining a target execution environment from preset candidate execution environments in response to a target execution environment selection instruction of a user.
3. The method of claim 1, wherein the target test interface information comprises at least a target test interface protocol and a test completion data format;
the execution result at least comprises a test completion degree and test completion data;
correspondingly, according to the target test interface information, calling the target test case function interface to obtain the execution result of the test execution instruction, including:
according to the target test interface protocol, operating a target test case functional interface by using the target test interface protocol;
and obtaining the test completion degree and the test completion data in the execution result, and representing the test completion data in the test completion data format.
4. The method of claim 3, wherein before comparing the execution result with the expected result to determine the test result of the target test case functional interface, further comprising:
determining whether the target test case function interface finishes running or not according to the test completion degree in the execution result;
and if the operation of the functional interface of the target test case fails, determining that the target test case fails to test.
5. The method of claim 4, wherein determining whether the target test case function interface is completely run according to the test completion in the execution result further comprises:
if the target test case functional interface finishes running, comparing the test completion data in the execution result with the expected result;
if the test completion data is consistent with the expected result, determining that the target test case is tested successfully;
and if the test completion data is inconsistent with the expected result, determining that the target test case fails to test.
6. The method of claim 1, wherein after comparing the execution result with the expected result and determining the test result of the target test case functional interface, further comprising:
and storing the test result of the target test case functional interface and the operation node with the test failure in a database, so that a user can conveniently check the test result and the operation node.
7. An automated testing apparatus, comprising:
the basic information acquisition module is used for responding to a test execution instruction of a user and acquiring basic information of a target test case; wherein the basic information includes at least target test interface information and expected results;
the execution result obtaining module is used for calling the target test case function interface according to the target test interface information to obtain the execution result of the test execution instruction;
and the test result determining module is used for comparing the execution result with the expected result and determining the test result of the target test case functional interface.
8. The apparatus of claim 7, further comprising:
the target test case determining module is used for responding to a target test case selection instruction of a user and determining a target test case from preset candidate test cases;
and the target execution environment determining module is used for responding to a target execution environment selection instruction of a user and determining a target execution environment from preset candidate execution environments.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the automated testing method according to any one of claims 1-6 is implemented when the program is executed by the processor.
10. A storage medium containing computer-executable instructions for performing the automated testing method of any of claims 1-6 when executed by a computer processor.
CN202010102250.1A 2020-02-19 2020-02-19 Automatic testing method, device, equipment and storage medium Pending CN111274154A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010102250.1A CN111274154A (en) 2020-02-19 2020-02-19 Automatic testing method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010102250.1A CN111274154A (en) 2020-02-19 2020-02-19 Automatic testing method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN111274154A true CN111274154A (en) 2020-06-12

Family

ID=71002107

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010102250.1A Pending CN111274154A (en) 2020-02-19 2020-02-19 Automatic testing method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111274154A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112241372A (en) * 2020-10-22 2021-01-19 北京字节跳动网络技术有限公司 Terminal testing method and device and electronic equipment
CN112306880A (en) * 2020-11-02 2021-02-02 百度在线网络技术(北京)有限公司 Test method, test device, electronic equipment and computer readable storage medium
CN112362360A (en) * 2020-11-10 2021-02-12 广州小鹏汽车科技有限公司 Vehicle component testing method, device and system, test board card and storage medium
CN112363949A (en) * 2020-11-30 2021-02-12 北京有竹居网络技术有限公司 Interface test method, device, equipment and storage medium
CN112597001A (en) * 2020-12-07 2021-04-02 长沙市到家悠享网络科技有限公司 Interface testing method and device, electronic equipment and storage medium
CN113238940A (en) * 2021-05-12 2021-08-10 建信金融科技有限责任公司 Interface test result comparison method, device, equipment and storage medium
CN113609025A (en) * 2021-08-18 2021-11-05 深圳鼎盛电脑科技有限公司 Software program testing method, device, medium and equipment
CN114328275A (en) * 2022-03-10 2022-04-12 太平金融科技服务(上海)有限公司深圳分公司 System testing method, device, computer equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140245070A1 (en) * 2013-02-27 2014-08-28 International Business Machines Corporation Automated execution of functional test scripts on a remote system within a unit testing framework
CN107741911A (en) * 2017-11-01 2018-02-27 广州爱九游信息技术有限公司 Interface test method, device, client and computer-readable recording medium
CN108459953A (en) * 2017-02-22 2018-08-28 北京京东尚科信息技术有限公司 test method and device
CN109032870A (en) * 2018-08-03 2018-12-18 百度在线网络技术(北京)有限公司 Method and apparatus for test equipment
CN110347591A (en) * 2019-06-19 2019-10-18 平安普惠企业管理有限公司 Method, apparatus, electronic equipment and storage medium based on use-case test macro

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140245070A1 (en) * 2013-02-27 2014-08-28 International Business Machines Corporation Automated execution of functional test scripts on a remote system within a unit testing framework
CN108459953A (en) * 2017-02-22 2018-08-28 北京京东尚科信息技术有限公司 test method and device
CN107741911A (en) * 2017-11-01 2018-02-27 广州爱九游信息技术有限公司 Interface test method, device, client and computer-readable recording medium
CN109032870A (en) * 2018-08-03 2018-12-18 百度在线网络技术(北京)有限公司 Method and apparatus for test equipment
CN110347591A (en) * 2019-06-19 2019-10-18 平安普惠企业管理有限公司 Method, apparatus, electronic equipment and storage medium based on use-case test macro

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112241372A (en) * 2020-10-22 2021-01-19 北京字节跳动网络技术有限公司 Terminal testing method and device and electronic equipment
CN112306880A (en) * 2020-11-02 2021-02-02 百度在线网络技术(北京)有限公司 Test method, test device, electronic equipment and computer readable storage medium
CN112362360A (en) * 2020-11-10 2021-02-12 广州小鹏汽车科技有限公司 Vehicle component testing method, device and system, test board card and storage medium
CN112363949A (en) * 2020-11-30 2021-02-12 北京有竹居网络技术有限公司 Interface test method, device, equipment and storage medium
CN112597001A (en) * 2020-12-07 2021-04-02 长沙市到家悠享网络科技有限公司 Interface testing method and device, electronic equipment and storage medium
CN113238940A (en) * 2021-05-12 2021-08-10 建信金融科技有限责任公司 Interface test result comparison method, device, equipment and storage medium
CN113238940B (en) * 2021-05-12 2023-06-02 建信金融科技有限责任公司 Interface test result comparison method, device, equipment and storage medium
CN113609025A (en) * 2021-08-18 2021-11-05 深圳鼎盛电脑科技有限公司 Software program testing method, device, medium and equipment
CN114328275A (en) * 2022-03-10 2022-04-12 太平金融科技服务(上海)有限公司深圳分公司 System testing method, device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
CN111274154A (en) Automatic testing method, device, equipment and storage medium
CN107506300B (en) User interface testing method, device, server and storage medium
WO2020237877A1 (en) Log monitoring method and apparatus, terminal, and storage medium
CN111124919A (en) User interface testing method, device, equipment and storage medium
CN111462811A (en) Automatic testing method and device, storage medium and electronic equipment
CN110659210A (en) Information acquisition method and device, electronic equipment and storage medium
CN111694684B (en) Abnormal construction method and device of storage device, electronic device and storage medium
CN112115051A (en) Page traversal detection method, device and equipment for application and readable storage medium
CN112231206A (en) Script editing method for application program test, computer readable storage medium and test platform
CN111274130A (en) Automatic testing method, device, equipment and storage medium
CN112269697B (en) Equipment storage performance testing method, system and related device
CN111241111B (en) Data query method and device, data comparison method and device, medium and equipment
KR101252358B1 (en) Apparatus and method for testing plc command
CN112256560A (en) Application program testing method and device and electronic equipment
CN111666200A (en) Testing method and terminal for time consumption of cold start of PC software
CN113986263A (en) Code automation test method, device, electronic equipment and storage medium
CN110806981B (en) Application program testing method, device, equipment and storage medium
US11392371B2 (en) Identification of a partial code to be refactored within a source code
US20160275002A1 (en) Image capture in application lifecycle management for documentation and support
CN112346994A (en) Test information correlation method and device, computer equipment and storage medium
CN112597041A (en) Cross-branch merging method, system, equipment and storage medium for code coverage rate
CN112035368A (en) Automatic software testing method and device, electronic equipment and storage medium
CN112783788B (en) Test system, method, electronic device and storage medium
CN111240928B (en) Automatic detection method, device, equipment and storage medium for equipment drive
CN114968818A (en) Automatic test management method and device, terminal 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
RJ01 Rejection of invention patent application after publication

Application publication date: 20200612