CN115562991A - Automatic test method, automatic test device, electronic apparatus, and storage medium - Google Patents

Automatic test method, automatic test device, electronic apparatus, and storage medium Download PDF

Info

Publication number
CN115562991A
CN115562991A CN202211222157.XA CN202211222157A CN115562991A CN 115562991 A CN115562991 A CN 115562991A CN 202211222157 A CN202211222157 A CN 202211222157A CN 115562991 A CN115562991 A CN 115562991A
Authority
CN
China
Prior art keywords
test
execution
testing
module
automatic
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
CN202211222157.XA
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.)
Ctrip Travel Information Technology Shanghai Co Ltd
Original Assignee
Ctrip Travel Information Technology Shanghai 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 Ctrip Travel Information Technology Shanghai Co Ltd filed Critical Ctrip Travel Information Technology Shanghai Co Ltd
Priority to CN202211222157.XA priority Critical patent/CN115562991A/en
Publication of CN115562991A publication Critical patent/CN115562991A/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/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/3676Test management for coverage analysis

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses an automatic testing method, an automatic testing device, electronic equipment and a storage medium. The method comprises the following steps: starting an automatic test process when the running time set in the test running set is detected to reach; detecting whether the test case in the test operation set contains a test step without a test tool; analyzing all the test cases and all the test steps contained in the test cases; processing the test case and the test steps contained in the test case; judging whether the testing step comprises testing tool information or not; completing manual test execution according to the test step information; setting the test result of the test step and the test case belonging to the test step according to the test execution result; and judging whether the finished test steps comprise the last test step of the last test case. The invention realizes an automatic testing method and avoids the problems of repeated labor, test range omission and resource waste.

Description

Automatic test method, automatic test device, electronic apparatus, and storage medium
Technical Field
The invention relates to the technical field of computers, in particular to an automatic testing method, an automatic testing device, electronic equipment and a storage medium.
Background
At the present stage, with increasingly intensified internet market competition, the overall market release time of internet products is increasingly shortened, so that the requirement of the internet product test work on efficiency is gradually improved.
A test case refers to a set of descriptions of a series of operational steps for a particular internet product under test. The purpose of verifying the function correctness of the tested internet product is achieved through the execution of the test case.
The automated test script refers to a script program for automatically executing test cases.
In order to ensure the quality and improve the testing efficiency, an automatic testing script is required to be manufactured and used for the automatic testing of scenes such as regression testing and the like while the manual testing is executed by compiling the testing case. At present, the test case and the automatic test script are independently manufactured and managed simultaneously and separately. The test case is used in a scene of manually executing the test, and is compiled in a test case management system by a service test engineer; the automated test scripts are used in scenarios for automated execution of tests and are independently compiled by automated engineers with high level scripting language capabilities.
Because the test cases and the automatic test scripts at the present stage are managed separately, the test cases and the automatic test scripts are not in a one-to-one corresponding relationship but are generally in a one-to-many or many-to-one corresponding relationship, if the automatic test scripts corresponding to a specific test case need to be selected, manual judgment is mainly relied on, and the method inevitably has the situation that the automatic test scripts cannot completely cover the test range of the test case and are omitted or the situation that the automatic test scripts excessively cover the running resource waste of irrelevant test cases. Meanwhile, although the test case and the automatic test script are respectively produced by workers in different background technologies, the test case and the automatic test script are essentially the same and describe the operation process and expected output of a user using an internet product, the method has the problem of repeated labor and belongs to resource waste, so that the existing technology is difficult to meet the requirement of further shortening the test period while guaranteeing the system quality.
Disclosure of Invention
The invention aims to solve the technical problems that in the prior art, because a test case and an automatic test script are independently manufactured and separately managed, the resource waste is caused, the system quality cannot be ensured, and the further shortening of the test period and the improvement of the efficiency cannot be met.
The invention solves the technical problems through the following technical scheme:
in a first aspect, an automated testing method is provided, including:
starting an automatic test process when detecting that the running time set in a test running set reaches or receiving an automatic test instruction sent by a user, wherein the test running set comprises a test case, and the test case comprises a test step;
detecting whether the test case in the test operation set contains a test step without a test tool, wherein the test tool is used for controlling automatic execution of the test;
if yes, sending a prompt, then sending execution request information, and if not, directly sending the execution request information;
analyzing all the test cases and all the test steps contained in the test cases;
processing the test case and the test steps contained in the test case;
judging whether the testing step comprises testing tool information or not;
if not, suspending the execution of the automatic test;
completing manual test execution according to the test step information, and sending a manual test execution result;
setting the test results of the test step and the test case in the test step according to the test execution result;
judging whether the finished test step comprises the last test step of the last test case;
if not, returning to process the test case and the test steps contained in the test case to carry out the processing flow again.
Optionally, if the testing step includes testing tool information, executing an automated testing step, and storing step return variables, where the step return variables include keys and values, the keys include output parameters of the testing step, and the values include specific return contents after the method invocation is completed.
Optionally, whether the execution result of the automated testing step is correct or not is judged according to whether the abnormal condition exists in the calling process of the testing method or not, the testing steps and the testing results of the testing cases in the testing steps are set, and the last testing step of judging whether the finished testing steps include the last testing case or not is executed.
Optionally, storing the test result and sending a test report;
and/or the automatic testing method further comprises the following steps:
carrying out a manual testing process;
the manual test flow comprises the following steps: and manually selecting a test run set for testing, setting test execution results of all test cases and all test step information after the testing is finished, storing the test results and sending a test report.
In a second aspect, an automated testing apparatus is provided, comprising:
the system comprises a starting module, a test execution set and a test execution module, wherein the starting module is used for starting an automatic test process when detecting that the running time set in the test execution set reaches or receiving an automatic test instruction sent by a user, the test execution set comprises a test case, and the test case comprises a test step;
the operation management module is used for detecting whether the test case in the test operation set contains a test step without a test tool, the test tool is used for controlling the automatic execution test, if so, a prompt is sent, then execution request information is sent to the test execution agent module to execute the automatic test, and if not, the execution request information is directly sent to the test execution agent module to execute the automatic test;
the test execution agent module is also used for analyzing all the test cases and all the test steps contained in the test cases;
the test execution agent module is also used for processing the test cases and the test steps contained in the test cases;
the first judging module is used for judging whether the testing step contains testing tool information or not, if not, the automatic testing execution is suspended, and the information sending module is called;
the information sending module is used for completing manual test execution according to the test step information and sending a manual test execution result;
the test execution agent module is also used for setting the test steps and the test results of the test cases in the test steps according to the test execution results;
and the second judgment module is used for judging whether the finished test steps comprise the last test step of the last test case, and if not, the test execution agent module is called again to process the test cases and the test steps contained in the test cases.
Optionally, the automated testing device further comprises a storage module;
the test execution agent module is also used for executing an automatic test step when the first judgment module judges that the test tool information is contained;
the storage module is used for storing step return variables, the step return variables comprise keys and values, the keys comprise output parameters of the testing step, and the values comprise specific return contents after the method calling is completed.
Optionally, the automatic testing device further comprises a third judging module;
the storage module is also used for calling the third judgment module;
the third judging module is used for judging whether the execution result of the automatic testing step is correct or not according to the fact that whether abnormal conditions exist in the calling process of the testing method or not;
the test execution agent module is also used for setting the test step and the test result of the test case in the test step and then calling the second judgment module.
Optionally, the automated testing apparatus further comprises:
the test report sending module is used for storing the test result and sending a test report;
and/or the manual test module is used for manually selecting the test operation set for testing, setting test execution results of all test cases and all test step information after the test is finished, storing the test results and sending a test report.
In a third aspect, an electronic device is provided, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the automated testing method is implemented according to any one of the foregoing methods.
In a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored, which computer program, when being executed by a processor, carries out the automated testing method of any one of the above.
The positive progress effects of the invention are as follows: the invention realizes the automatic test method, sets a tool capable of being automatically executed for the test case, avoids the problems of repeated labor, test range omission and resource waste caused by separate operation of manual work and automation, and can further shorten the test period and improve the working efficiency of test products.
Drawings
FIG. 1 is a flow chart of an automated testing method provided by an exemplary embodiment of the present invention;
FIG. 2 is a block diagram of an automated test equipment provided in an exemplary embodiment of the invention;
FIG. 3 is a flow chart of a manually performed testing portion of an automated testing apparatus according to an exemplary embodiment of the present invention;
FIG. 4 is a flow chart of a portion of an automated and semi-automated test performed by an automated test equipment according to an exemplary embodiment of the present invention;
fig. 5 is a block diagram of an electronic device according to an exemplary embodiment of the present invention.
Detailed Description
The invention is further illustrated by the following examples, which are not intended to limit the scope of the invention.
The present embodiment provides an automated testing method, as shown in fig. 1, the method includes the following steps:
step 101, when detecting that the running time set in the test running set reaches or receiving an automated test instruction sent by a user, starting an automated test process, wherein the test running set comprises a test case, and the test case comprises a test step.
The test operation set comprises test cases, operation time and attention people, one test operation set comprises one to a plurality of test cases, zero or one operation time and one to a plurality of attention people, and the test operation set can perform automatic test execution, manual test execution and semi-automatic test execution. The run time is a standard cron expression.
The test case mainly comprises test steps and test variables, and one test case comprises zero to a plurality of test steps and test variables.
In this embodiment, the executor may directly start the automated execution of the test run set or specify the automated execution time of the test run set by setting the run time.
102, detecting whether a test case in the test operation set contains a test step without a test tool, wherein the test tool is used for controlling automatic execution of a test;
if the request information contains the execution request information, sending a prompt, and then sending the execution request information, and if the request information does not contain the execution request information, directly sending the execution request information.
Wherein the testing step comprises step description, input parameters, output parameters and a testing tool; the test description is the description of the operation details of the operation steps; the test tool is a program method to be called in a designated step during automatic test; the input parameter is a variable name and is a test variable transmitted to the test tool; the output parameter is a variable name and refers to a test variable returned by the test tool; and the test tool, the input parameters and the output parameters are used by the test execution agent when the test tool, the input parameters and the output parameters are automatically executed, so that the flow of the automatic test execution is completed.
The test execution agent is made of JAVA and is deployed in an execution machine for completing the automatic execution of the test run set, and the execution machine refers to a server for deploying the test execution agent.
The test execution agent may also be made of, but not limited to, other different programming languages, such as NET, C #, python, etc.
The sending mode of the reminder sent when the reminder is contained includes but is not limited to: e-mail, IM information, short message, etc.
In this embodiment, when the test case in the test operation set includes a test step without a test tool, when an executor directly starts an automated test or a set operation time arrives, the executor sends a prompt to the interested person in the test operation set to prompt the interested person to intervene in a semi-automated test process, and sends an execution request message to a test execution agent to execute the automated test. And under the condition that the test case in the test operation set does not contain a test step without a test tool, when an executor directly starts the automatic test or the set operation time is up, sending an execution request to a test execution agent to execute the automatic test. The execution request contains all information of the test run set.
Step 103, analyzing all the test cases and all the test steps contained in the test cases.
And the test execution agent analyzes the test operation set to obtain all test cases contained in the test operation set and an ordered list consisting of the test cases. And analyzing each test case by the test execution agent to obtain all test steps contained in the test case, an ordered list and a predefined variable list which are formed by all the test steps, and generating a step return variable list for each test case. The predefined variable list is a list consisting of key value pairs, wherein the keys are variable names, and the values are variable values; the step return variable list is a list consisting of key value pairs, wherein the key is a variable name, and the value is a variable value. And returning to the condition that the newly-built time of the variable list is empty.
And 104, processing the test case and the test steps contained in the test case.
And processing the test cases and the test steps contained in the test cases, and obtaining contained test tool information from the test cases and the test steps contained in the test cases.
Step 105, judging whether the testing step contains testing tool information or not; if not, the automated test execution is suspended.
In this embodiment, when it is determined that the testing step does not include testing tool information, the test execution agent suspends the automated execution process. And when the testing step contains testing tool information, acquiring the specific testing tool class and the testing method to be executed according to the testing tool information in the testing step. The specific process is as follows: the test execution agent obtains tool information contained in the test step; the test execution agent loads all test tool class libraries through a JAVA reflector; the test execution agent detects the test tool class library, and finally selects the test tool class and the test method to be executed by comparing the test tool information with the annotation description of the test tool class and the annotation description of the test method.
The test tool library is realized by JAVA, and the function of the test tool library can provide automation capability for controlling a tested object to complete a specific test action. The test tool class library may also be implemented by other different programming languages, such as NET, C #, python, etc., but not limited to the above, JAVA is used in this embodiment.
And 106, completing manual test execution according to the test step information, and sending a manual test execution result.
In this embodiment, the test execution agent pops up a GUI interactive window on the execution screen, displays the current step information in the GUI interactive window, and simultaneously displays operation buttons, where the operation buttons include success and failure, and waits for the execution person to operate. The executive man manually completes the execution of the test step and clicks the corresponding specific button operation according to the specific execution result.
The manual test execution may be, but not limited to, executed using a GUI interactive window, and may also send an instruction by using a voice input mode, a short message verification mode, or the like, where the GUI interactive window is selected for the test in this embodiment.
And 107, setting the test steps and the test results of the test cases in the test steps according to the test execution results.
In this embodiment, when any operation button in the GUI interaction window is clicked, the test execution agent completes the result setting of the test step. Such as: the success button sets the test execution result of the test step to be success, and similarly, the failure button sets the test execution result of the test step to be failure and sets the execution result of the test case where the test step is located to be failure.
Step 108, judging whether the finished test steps comprise the last test step of the last test case;
if not, returning to process the test case and the test steps contained in the test case to carry out the processing flow again.
And if the finished test steps do not comprise the last test step of the last test case, returning to process the test cases and the test steps contained in the test cases to operate the process again.
If the completed test step contains the last test step of the last test case, the execution request is indicated to contain all information of the test run set, and the test result information is stored, displayed and related reports are sent. The transmission modes include but are not limited to: e-mail and IM short message.
The automatic test method also comprises the following steps of executing manual test execution, wherein the manual test flow comprises the following steps: the executor selects a test run set, and displays all test cases contained in the selected test run set and all test step information contained in the test cases; the executor sets successful or failed test execution results for all test cases and all test step information contained in the test cases, and clicks to finish the test; sending the test results of all test cases in the test operation set; and finishing the storage of the test result and sending the test report to the interested person of the test run set.
In this embodiment, a module diagram of an automatic testing apparatus is provided, as shown in fig. 2, including:
the starting module 41 is configured to start an automated testing process when detecting that an operation time set in a test operation set reaches or receiving an automated testing instruction sent by a user, where the test operation set includes a test case, and the test case includes a testing step;
the operation management module 42 is configured to detect whether the test case in the test operation set includes a test step without a test tool, where the test tool is configured to control an automated execution test, and if so, send a prompt, and then send execution request information to the test execution agent module to execute the automated test, and if not, directly send the execution request information to the test execution agent module to execute the automated test;
the test execution agent module 43 is further configured to analyze all the test cases and all the test steps included in the test cases;
the test execution agent module is also used for processing the test case and the test steps contained in the test case;
a first judging module 44, configured to judge whether the testing step includes testing tool information, and if not, suspend the automated testing execution and invoke the information sending module;
the information sending module 45 is configured to complete manual test execution according to the test step information, and send a manual test execution result;
the test execution agent module is also used for setting the test steps and the test results of the test cases in the test steps according to the test execution results;
a second judging module 46, configured to judge whether the completed test step includes the last test step of the last test case, and if not, re-invoke the test execution agent module to process the test case and the test steps included in the test case.
Optionally, the automated testing device further comprises a storage module;
the test execution agent module is also used for executing an automatic test step when the first judgment module judges that the test tool information is contained;
the storage module 47 is configured to store step return variables, where the step return variables include keys and values, the keys include output parameters of the test steps, and the values include specific return contents after the method invocation is completed.
Optionally, the automatic testing device further includes a third determining module;
the storage module is also used for calling the third judgment module;
the third judging module 48 is used for judging whether the execution result of the automatic testing step is correct according to whether there is an abnormal condition in the testing method calling process;
the test execution agent module is also used for setting the test steps and the test results of the test cases in the test steps and then calling the second judgment module.
Optionally, the automated testing device further comprises:
a test report sending module 49, configured to store the test result and send a test report;
the device preferably further includes a manual test module 50, configured to manually select a test run set for testing, set test execution results of all test cases and all test step information after the testing is completed, store the test results, and send a test report.
As shown in fig. 3, the process flow when the manual execution test part of the automatic testing device of this embodiment runs specifically is as follows:
a1, an executive (a service test engineer) selects a test operation set in an operation management module.
And A2, the operation management module displays all test cases contained in the selected test operation set and all test step information contained in the test cases.
And A3, setting a test execution result (success or failure) for all test cases and all test step information contained in the test cases by an executor (service test engineer), and clicking to complete the test.
And A4, the operation management module sends the test results of all test cases in the test operation set to the test report module.
And A5, the test report module completes the storage of the test result and sends the test report to the concerned person in the test run set.
As shown in fig. 4, the process flow of the automatic testing apparatus of this embodiment when the automatic or semi-automatic executing testing part runs in detail is as follows:
s1, when the set running time of the test running set reaches or an executive person (a service test engineer) selects the test running set in the running management module and clicks to execute automatically.
S2, the operation management module judges whether the test case in the test operation set contains a test step without a test tool.
If yes, the operation management module sends a manual execution prompt to a concerned person in the test operation set to prompt the concerned person to intervene in the semi-automatic test process, and then S3 is executed; if not, directly executing S3.
And S3, if the operation management module sends an execution request to the test execution agent module, the automatic test is executed.
And S4, analyzing all test cases and all test steps contained in the test cases from the execution request by the test execution agent module.
And S5, sequentially processing the test cases and the test steps contained in the test cases by the test execution agent module.
S6, judging whether the testing step comprises a testing tool or not, if so, executing S7; if not, executing S8.
S7, the test execution agent module positions the test tool class and the test method in the test tool class through a reflection mechanism according to the test tool information in combination with the input parameter information and the test variable information, and completes the automatic execution of the test step through method calling; the test execution agent module takes the output parameters of the test steps as keys, and the specific return contents after the method call is completed are taken as return variables of the value construction steps. Storing the returned variable list; and the test execution agent module judges whether the execution result of the step is correct according to the fact that whether the abnormal condition exists in the calling process of the test method, and completes the test steps and the test result setting of the test case to which the test step belongs.
S8, the test execution agent module suspends test execution; the test execution agent module pops up a GUI interactive window, displays the information of the current step in the GUI interactive window, and simultaneously displays operation buttons, wherein the operation buttons comprise success buttons and failure buttons and wait for the operation of a user; after the executor (service test engineer) completes the execution of the manual test module according to the test step information, clicking the success or failure in the GUI interactive window according to the execution result; the test execution agent module completes the test steps and the test result setting of the test case according to the button clicked by the user; the test execution agent module continues the test execution.
S9, judging whether the test case is the last test step of the last test case, and if so, executing S10; if not, returning to S5.
And S10, the operation management module sends the test results of all test cases in the test operation set to the test report module.
And S11, the test report module completes the storage of the test result and sends the test report to the interested person in the test run set.
For the device embodiment, since it basically corresponds to the method embodiment, reference may be made to the partial description of the method embodiment for relevant points. The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of the present invention. One of ordinary skill in the art can understand and implement without inventive effort.
As shown in fig. 5, the present embodiment shows a schematic diagram of an electronic device, showing a block diagram of an exemplary electronic device 500 suitable for implementing embodiments of the present invention. The electronic device 500 shown in fig. 5 is only an example and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 5, the electronic device 500 may take the form of a general-purpose computing device, which may be, for example, a server device. The components of the electronic device 500 may include, but are not limited to: the at least one processor 501, the at least one memory 502, and a bus 503 connecting the various system components (including the memory 502 and the processor 501).
The bus 503 includes a data bus, an address bus, and a control bus.
The memory 502 may include volatile memory, such as Random Access Memory (RAM) 621 and/or cache memory 622, and may further include Read Only Memory (ROM) 623.
The memory 502 may also include a program tool 625 (or utility tool) having a set (at least one) of program modules 624, such program modules 624 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination thereof may comprise an implementation of a network environment.
The processor 501 executes various functional applications and data processing, such as the methods provided by any of the above embodiments, by running a computer program stored in the memory 502.
The electronic device 500 may also communicate with one or more external devices 504 (e.g., keyboard, pointing device, etc.). Such communication may occur via input/output (I/O) interfaces 505. Also, the model-generated electronic device 500 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 a network adapter 506. As shown, the network adapter 506 communicates with the other modules of the model-generated electronic device 500 over a bus 503. It should be appreciated that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the model-generating electronic device 500, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID (disk array) systems, tape drives, and data backup storage systems, etc.
It should be noted that although in the above detailed description several units/modules or sub-units/modules of the electronic device are mentioned, such a division is merely exemplary and not mandatory. Indeed, the features and functionality of two or more of the units/modules described above may be embodied in one unit/module according to embodiments of the invention. Conversely, the features and functions of one unit/module described above may be further divided into embodiments by a plurality of units/modules.
Embodiments of the present invention further provide a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the method provided in any of the above embodiments.
More specific examples, among others, that the readable storage medium may employ may include, but are not limited to: a portable disk, a hard disk, random access memory, read only memory, erasable programmable read only memory, optical storage device, magnetic storage device, or any suitable combination of the foregoing.
In a possible implementation manner, the embodiment of the present invention may also be implemented in the form of a program product, which includes program code for causing a terminal device to execute a method implementing any of the embodiments described above when the program product runs on the terminal device.
Where program code for carrying out the invention is written in any combination of one or more programming languages, the program code may be executed entirely on the user device, partly on the user device, as a stand-alone software package, partly on the user device and partly on a remote device or entirely on the remote device.
While specific embodiments of the invention have been described above, it will be appreciated by those skilled in the art that this is by way of example only, and that the scope of the invention is defined by the appended claims. Various changes or modifications to these embodiments may be made by those skilled in the art without departing from the principle and spirit of this invention, and these changes and modifications are within the scope of this invention.

Claims (10)

1. An automated testing method, comprising:
starting an automatic testing process when detecting that the running time set in a test running set reaches or receives an automatic testing instruction sent by a user, wherein the test running set comprises a test case, and the test case comprises a testing step;
detecting whether the test case in the test operation set contains a test step without a test tool, wherein the test tool is used for controlling automatic execution of the test;
if yes, sending a prompt, then sending execution request information, and if not, directly sending the execution request information;
analyzing all the test cases and all the test steps contained in the test cases;
processing the test case and the test steps contained in the test case;
judging whether the testing step contains testing tool information or not;
if not, suspending the execution of the automatic test;
completing manual test execution according to the test step information, and sending a manual test execution result;
setting the test results of the test step and the test case in the test step according to the test execution result;
judging whether the finished test steps comprise the last test step of the last test case;
if not, returning to process the test case and the test steps contained in the test case to carry out the processing flow again.
2. The automated testing method of claim 1, further comprising:
and if the testing step contains testing tool information, executing an automatic testing step, and storing step return variables, wherein the step return variables comprise keys and values, the keys comprise output parameters of the testing step, and the values comprise specific return contents after the method is called.
3. The automated testing method of claim 2, wherein after the storing step returns a variable, further comprising:
and judging whether the execution result of the automatic test step is correct or not according to the fact that whether the abnormal condition exists or not in the calling process of the test method, setting the test step and the test result of the test case in the test step, and executing the last test step of judging whether the test step which is finished contains the last test case or not.
4. The automated testing method of claim 1, further comprising:
storing the test result and sending a test report;
and/or, the automatic test method further comprises the following steps:
carrying out a manual test flow;
the manual test flow comprises the following steps: and manually selecting a test run set for testing, setting test execution results of all test cases and all test step information after the testing is finished, storing the test results and sending a test report.
5. An automated testing apparatus, comprising:
the system comprises a starting module, a test execution set and a test execution module, wherein the starting module is used for starting an automatic test process when detecting that the running time set in the test execution set reaches or receives an automatic test instruction sent by a user, the test execution set comprises test cases, and the test cases comprise test steps;
the operation management module is used for detecting whether the test case in the test operation set contains a test step without a test tool, the test tool is used for controlling the automatic execution test, if so, a prompt is sent, then execution request information is sent to the test execution agent module to execute the automatic test, and if not, the execution request information is directly sent to the test execution agent module to execute the automatic test;
the test execution agent module is also used for analyzing all the test cases and all the test steps contained in the test cases;
the test execution agent module is also used for processing the test case and the test steps contained in the test case;
the first judgment module is used for judging whether the test step contains test tool information or not, if not, the automatic test execution is suspended, and the information sending module is called;
the information sending module is used for completing manual test execution according to the test step information and sending a manual test execution result;
the test execution agent module is also used for setting the test steps and the test results of the test cases in the test steps according to the test execution results;
and the second judgment module is used for judging whether the finished test steps comprise the last test step of the last test case, and if not, the test execution agent module is called again to process the test cases and the test steps contained in the test cases.
6. The automated testing apparatus of claim 5,
the automatic testing device also comprises a storage module;
the test execution agent module is also used for executing an automatic test step when the first judgment module judges that the test tool information is contained;
the storage module is used for storing step return variables, the step return variables comprise keys and values, the keys comprise output parameters of the testing step, and the values comprise specific return contents after the method calling is completed.
7. The automated testing device of claim 6,
the automatic testing device also comprises a third judging module;
the storage module is also used for calling the third judgment module;
the third judging module is used for judging whether the execution result of the automatic testing step is correct or not according to the fact that whether abnormal conditions exist in the calling process of the testing method or not;
the test execution agent module is also used for setting the test step and the test result of the test case in the test step and then calling the second judgment module.
8. The automated testing apparatus of claim 5, further comprising:
the test report sending module is used for storing the test result and sending a test report;
and/or the manual test module is used for manually selecting the test operation set to test, setting the test execution results of all test cases and all test step information after the test is finished, storing the test results and sending a test report.
9. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor implements the automated testing method of any of claims 1 to 4 when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the automated testing method of any one of claims 1 to 4.
CN202211222157.XA 2022-10-08 2022-10-08 Automatic test method, automatic test device, electronic apparatus, and storage medium Pending CN115562991A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211222157.XA CN115562991A (en) 2022-10-08 2022-10-08 Automatic test method, automatic test device, electronic apparatus, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211222157.XA CN115562991A (en) 2022-10-08 2022-10-08 Automatic test method, automatic test device, electronic apparatus, and storage medium

Publications (1)

Publication Number Publication Date
CN115562991A true CN115562991A (en) 2023-01-03

Family

ID=84745430

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211222157.XA Pending CN115562991A (en) 2022-10-08 2022-10-08 Automatic test method, automatic test device, electronic apparatus, and storage medium

Country Status (1)

Country Link
CN (1) CN115562991A (en)

Similar Documents

Publication Publication Date Title
US11281570B2 (en) Software testing method, system, apparatus, device medium, and computer program product
US10572360B2 (en) Functional behaviour test system and method
US8584079B2 (en) Quality on submit process
US20150100829A1 (en) Method and system for selecting and executing test scripts
US20150100832A1 (en) Method and system for selecting and executing test scripts
US20150100830A1 (en) Method and system for selecting and executing test scripts
US20150100831A1 (en) Method and system for selecting and executing test scripts
CN111124919A (en) User interface testing method, device, equipment and storage medium
CN104123219A (en) Method and device for testing software
CN111274154A (en) Automatic testing method, device, equipment and storage medium
CN115686540B (en) RPA control method and system based on Hongmong system
CN105117346A (en) Automatic testing method and system for distributed system of virtualization platform
CN110659198A (en) Application program test case execution method and device and software test system
CN109977012B (en) Joint debugging test method, device, equipment and computer readable storage medium of system
CN114297666A (en) Cloud deployment automation vulnerability mining system based on fuzzy test
CN111475412B (en) Software testing method, device, electronic equipment and computer readable storage medium
CN112231206A (en) Script editing method for application program test, computer readable storage medium and test platform
CN111414309A (en) Automatic test method of application program, computer equipment and storage medium
EP3734460A1 (en) Probabilistic software testing via dynamic graphs
CN113485928A (en) Automatic testing method and device for switch
CN113094251A (en) Embedded system testing method and device, computer equipment and storage medium
CN115562991A (en) Automatic test method, automatic test device, electronic apparatus, and storage medium
CN112596750B (en) Application testing method and device, electronic equipment and computer readable storage medium
US20220171651A1 (en) Chained triggering of builds in continuous integration environments
CN113986263A (en) Code automation test method, device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination