CN116069640A - Automatic testing method based on flow chart - Google Patents
Automatic testing method based on flow chart Download PDFInfo
- Publication number
- CN116069640A CN116069640A CN202310073758.7A CN202310073758A CN116069640A CN 116069640 A CN116069640 A CN 116069640A CN 202310073758 A CN202310073758 A CN 202310073758A CN 116069640 A CN116069640 A CN 116069640A
- Authority
- CN
- China
- Prior art keywords
- test
- automatic
- model
- automatic test
- flow
- 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
Links
- 238000012360 testing method Methods 0.000 title claims abstract description 306
- 238000000034 method Methods 0.000 claims abstract description 14
- 238000010998 test method Methods 0.000 claims abstract description 11
- 210000001503 joint Anatomy 0.000 claims abstract description 4
- 238000010586 diagram Methods 0.000 claims description 23
- 238000009960 carding Methods 0.000 claims description 3
- 238000012163 sequencing technique Methods 0.000 claims description 3
- 238000012545 processing Methods 0.000 claims description 2
- 238000013461 design Methods 0.000 abstract description 5
- 230000006399 behavior Effects 0.000 description 17
- 238000011161 development Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 238000003032 molecular docking Methods 0.000 description 2
- 238000004458 analytical method Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000012812 general test Methods 0.000 description 1
- 238000009434 installation Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000011056 performance test Methods 0.000 description 1
- 238000012552 review Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3688—Test management for test execution, e.g. scheduling of test suites
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3684—Test management for test design, e.g. generating new test cases
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3692—Test management for test results analysis
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02P—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
- Y02P90/00—Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
- Y02P90/30—Computing systems specially adapted for manufacturing
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 test method based on a flow chart, which is characterized in that an automatic test flow is established by using UML according to the automatic test demand, an interface required by the automatic test is determined and interface butt joint and flow node binding are completed according to a test path in the automatic test flow, a test model is established for the test demand in the automatic test by adopting the UML based state chart, different groups of test data are generated according to the test model, one or more groups of test data and constraint condition rules are configured in the test model corresponding to the different groups of test data, a business behavior model of the whole tested application is completed, the automatic test is carried out through the business behavior model, and the execution test is carried out after the test parameters are set. The method solves the problems that the current platform design is limited, scene execution is carried out according to a fixed flow, execution errors can stop execution error reporting, and parameter continuous execution cannot be automatically replaced.
Description
Technical Field
The invention relates to the technical field of computer networks, in particular to an automatic testing method based on a flow chart.
Background
Computer technology and Internet technology are rapidly developed, and Web application of B/S architecture is widely applied to technological development due to the characteristics of simple and rapid operation, no installation and the like. With the rapid development of web applications, the quality requirements of the web applications are higher, the architecture level is more and more complex, the testing difficulty is also higher and higher, and a great deal of manpower and material resources are required to be spent for repeated testing actions. In order to reduce manpower and material resources, an automatic test platform is also generated. The function of an automatic test platform in the current market is mainly divided into several blocks: interface test, UI test and performance test. The function of the platform is mainly focused on interface test.
Automated testing is a process that converts human-driven testing behavior into machine execution. Typically, after the test cases are designed and passed through the review, the test is performed step by the tester according to the procedure described in the test cases, resulting in a comparison of the actual results with the expected results. In the process, in order to save manpower, time or hardware resources and improve the test efficiency, the concept of automatic test is introduced.
If two cases of the same scene are to be executed, the existing automatic test platform needs to execute the two cases repeatedly, and the execution time is increased and some nodes are executed repeatedly due to the execution of the replacement parameters. Because of the limitation of the current platform design, the scene execution is executed according to a fixed flow, the execution error can stop executing the error reporting, and the parameter can not be automatically replaced to continue executing.
Disclosure of Invention
The invention aims to provide an automatic testing method based on a flow chart, which aims to solve the problems that the current platform design is limited, scene execution is executed according to a fixed flow, execution errors can stop execution error reporting, and parameter execution cannot be continuously replaced automatically.
The invention provides an automatic testing method based on a flow chart, which comprises the following steps of;
acquiring an automatic test requirement, and constructing an automatic test flow by using UML according to the automatic test requirement;
determining an automatic test strategy and a test path through an automatic test flow constructed by UML;
according to the test path in the automatic test flow, determining an interface required by the automatic test and completing interface butt joint and flow node binding;
constructing a test model for test requirements in automatic test based on the UML state diagram, and generating different groups of test data according to the test model;
and configuring one or more groups of test data and constraint condition rules in the test models corresponding to different groups of test data to complete the business behavior model of the whole tested application, automatically testing through the business behavior model, and executing the test after setting the test parameters.
Preferably, an automated test requirement is obtained, and an automated test procedure is constructed by using UML according to the automated test requirement, including;
carding the automatic test nodes in the automatic test requirements, and configuring the automatic test nodes according to the automatic test nodes;
testing and sequencing the automatic testing nodes and the automatic testing node configuration to generate an automatic testing path;
and generating an automatic test flow according to the automatic test path.
Preferably, determining an automated test strategy and a test path through an automated test procedure constructed by UML includes:
receiving a user automatic test request, and matching an automatic test flow according to the user automatic test request;
calling an automatic test path corresponding to the user automatic test request in the automatic test flow;
and establishing a business logic relationship between an automatic test path corresponding to the user automatic test request and the user automatic test request, and generating an automatic test strategy.
Preferably, a test model is constructed for testing requirements in an automated test based on a UML state diagram, and different sets of test data are generated according to the test model, including:
displaying the business logic behavior of the tested application by adopting a modeling mode based on the UML state diagram, and adjusting the tested business logic according to the display content;
displaying the operation actions and states of the tested business logic through the UML state diagram, and binding keywords for the operation actions and states;
and collecting service data and operation data in a specific scene under the test environment, and modeling after processing the service data and the operation data.
Preferably, one or more groups of test data and constraint condition rules are configured in test models corresponding to different groups of test data, so as to complete a business behavior model of the whole tested application, an automatic test is performed through the business behavior model, and a test is performed after test parameters are set, including:
building labels by using test models corresponding to different groups of test data;
according to the test model labels, a test sequence of the test models is established among the test models according to automatic test requirements, and a first test model, a second test model, a third test model and a fourth test model are determined;
the first test model is preferentially tested, and when the first test model is stopped, the subsequent test model is started.
The beneficial effects of the invention are as follows: the invention provides an automatic test method based on a flow chart, which is characterized in that an automatic test requirement is acquired, an automatic test flow is constructed by using UML according to the automatic test requirement, an automatic test strategy and a test path are determined through the automatic test flow constructed by UML, an interface required by the automatic test is determined and interface butt joint and process node binding are completed according to the test path in the automatic test flow, a test model is constructed for the test requirement in the automatic test by adopting a UML-based state diagram, different groups of test data are generated according to the test model, one or more groups of test data and constraint condition rules are configured in the test model corresponding to the different groups of test data, a business behavior model of the whole tested application is completed, the automatic test is performed through the business behavior model, and the test is executed after the test parameters are set. The automatic test platform based on the flow chart is used, repeated execution is not needed, only the use case data of the node is set, the last node is returned when the execution error occurs, the next case data is automatically executed, and the node is tried again until the execution is successful. After completing a single flow, the node may be returned to execute another flow again. Meanwhile, a tree diagram can be generated according to the execution condition after the execution is finished, and for the execution of the execution flow, where to report errors and the execution progress can be intuitively displayed through the flow diagram, so that the problems that the limitation of the current platform design is solved, the scene execution is all executed according to a fixed flow, the execution errors can stop executing the error reporting, and the parameter execution cannot be automatically replaced to continue are solved.
Drawings
In order to more clearly illustrate the technical solution of the present invention, the drawings that are needed in the embodiments will be briefly described below, and it will be obvious to those skilled in the art that other drawings can be obtained from these drawings without inventive effort.
Fig. 1 is a flowchart of an automated testing method based on a flowchart provided in an embodiment of the present invention.
Fig. 2 is a flowchart of step S101 of the automated testing method based on the flowchart provided in the embodiment of the present invention.
Fig. 3 is a flowchart of an automated testing method S102 based on a flowchart provided in an embodiment of the present invention.
Fig. 4 is a flowchart of an automated testing method S104 based on a flowchart provided in an embodiment of the present invention.
Fig. 5 is a flowchart of an automated testing method S105 based on a flowchart provided in an embodiment of the present invention.
Fig. 6 is a schematic diagram of an automated test application scenario based on a flowchart provided in an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be clearly and completely described below with reference to specific embodiments of the present invention and corresponding drawings. It will be apparent that the described embodiments are only some, but not all, embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention. The following describes in detail the technical solutions provided by the embodiments of the present invention with reference to the accompanying drawings.
Referring to fig. 1, the present invention provides an automated testing method based on a flowchart, including;
in step 101, acquiring an automated test requirement, and constructing an automated test flow by using UML according to the automated test requirement;
the method comprises the steps of acquiring the requirements of automatic testing of a user, constructing and using UML automatic testing flows for the requirements of the user, and executing the flows for each automatic execution.
In step 102, an automated test strategy and a test path are determined through an automated test procedure constructed by UML;
and firstly, carrying out demand analysis by a tester, drawing a flow chart by using UML, determining a general test strategy and a test path, and clearly expressing the test demands and the test key points of a user.
In step 103, according to the test path in the automatic test flow, determining the interface required by the automatic test and completing interface docking and flow node binding;
and the interface binding flow chart carries out test execution, meanwhile, the interface is designed in parallel, the interface is defined, and the interface is bound with the flow node after the interface binding flow chart is completed.
In step 104, a test model is built for testing requirements in an automatic test based on a UML state diagram, and different groups of test data are generated according to the test model;
abstract description is carried out on business logic behaviors of the tested application by adopting a modeling mode based on a UML state diagram, business logic of the tested application is helped to be combed, the operation action and state of the tested object are expressed, and keywords are bound for the operation action and state; the method comprises the steps of modeling input data and operation data in a specific scene by adopting a mode of a service model and data driving, writing test data according to some test methods (such as equivalence class division, boundary values and the like), and generating test data of different groups according to the model.
In step 105, one or more sets of test data and constraint condition rules are configured in the test models corresponding to the different sets of test data, so as to complete the whole business behavior model of the tested application, perform automatic test through the business behavior model, and perform test after setting test parameters.
And finally, configuring one or more groups of test data and some constraint conditions in the corresponding model to complete the business behavior model of the whole tested application. Setting case parameters, executing, completing production report and executing tree diagram.
The automatic test platform based on the flow chart is used, repeated execution is not needed, only the use case data of the node is set, the last node is returned when the execution error occurs, the next case data is automatically executed, and the node is tried again until the execution is successful. After completing a single flow, the node may be returned to execute another flow again. Meanwhile, a tree diagram can be generated according to the execution condition after the execution is completed, and for the execution of the executed flow, where to report errors, the execution progress can be intuitively displayed through the flow diagram.
Specifically, referring to fig. 2, an automated test requirement is obtained, and an automated test flow is constructed according to the automated test requirement using UML, including;
in step 201, carding the automation test nodes in the automation test requirement, and configuring the automation test nodes according to the automation test nodes;
in step 202, testing and sequencing the automatic testing nodes and the automatic testing node configuration to generate an automatic testing path;
in step 203, an automated test procedure is generated from the automated test path.
Specifically, referring to fig. 3, determining an automated test strategy and a test path through an automated test procedure constructed by UML includes:
in step 301, receiving a user automation test request, and matching an automation test flow according to the user automation test request;
in step 302, an automated test path corresponding to a user automated test request in an automated test flow is invoked;
in step 303, a business logic relationship is established between the automated test path corresponding to the user automated test request and the user automated test request, and an automated test strategy is generated.
Specifically, referring to fig. 4, a test model is constructed for testing requirements in an automated test based on a UML state diagram, and different sets of test data are generated according to the test model, including:
in step 401, displaying the service logic behavior of the tested application by adopting a modeling mode based on the UML state diagram, and adjusting the tested service logic according to the display content;
in step 402, the operation actions and states of the tested business logic are displayed through the UML state diagram, and keywords are bound for the operation actions and states;
in step 403, service data and operation data in a specific scene under the test environment are collected, and modeling is performed after the service data and the operation data are processed.
Specifically, referring to fig. 5, one or more sets of test data and constraint condition rules are configured in test models corresponding to different sets of test data, so as to complete a business behavior model of the whole tested application, perform an automatic test through the business behavior model, and perform a test after setting test parameters, including:
in step 501, a label is built by a test model corresponding to different sets of test data;
in step 502, according to the test model labels, a test sequence of test models is established between the test models according to the automatic test requirements, and a first test model, a second test model, a third test model and a fourth test model are determined;
in step 503, the first test model is preferentially tested, and when the testing of the first test model is stopped, the subsequent test models are started in sequence. And performing traversing execution, wherein the set case is traversed by the execution error until the execution succeeds, and the next flow is required to be executed by traversing the initial node after the single flow is completed.
As can be seen from the above embodiments, referring to fig. 6, the automatic test method based on the flowchart provided by the present invention obtains the automatic test requirements, uses UML to construct an automatic test flow according to the automatic test requirements, determines an automatic test strategy and a test path according to the automatic test flow constructed by UML, determines an interface required by the automatic test and completes interface docking and process node binding according to the test path in the automatic test flow, constructs a test model for the test requirements in the automatic test based on the UML state diagram, generates different sets of test data according to the test model, configures one or more sets of test data and constraint condition rules in the test model corresponding to the different sets of test data, completes the business behavior model of the whole tested application, performs the automatic test through the business behavior model, and performs the test after setting the test parameters. The automatic test platform based on the flow chart is used, repeated execution is not needed, only the use case data of the node is set, the last node is returned when the execution error occurs, the next case data is automatically executed, and the node is tried again until the execution is successful. After completing a single flow, the node may be returned to execute another flow again. Meanwhile, a tree diagram can be generated according to the execution condition after the execution is finished, and for the execution of the execution flow, where to report errors and the execution progress, the limitation of the current platform design can be solved through the relatively visual display of the flow diagram, and the problems that the scene execution is executed according to a fixed flow, the execution errors can stop executing the error reporting, and the parameter execution cannot be replaced automatically and continuously are solved.
The same and similar parts of the embodiments in this specification are referred to each other, and since they are substantially similar to the method embodiments, the description is relatively simple, and the relevant parts are referred to the description of the method embodiments.
The embodiments of the present invention described above do not limit the scope of the present invention.
Claims (5)
1. An automated testing method based on a flow chart, comprising;
acquiring an automatic test requirement, and constructing an automatic test flow by using UML according to the automatic test requirement;
determining an automatic test strategy and a test path through an automatic test flow constructed by UML;
according to the test path in the automatic test flow, determining an interface required by the automatic test and completing interface butt joint and flow node binding;
constructing a test model for test requirements in automatic test based on the UML state diagram, and generating different groups of test data according to the test model;
and configuring one or more groups of test data and constraint condition rules in the test models corresponding to different groups of test data to complete the business behavior model of the whole tested application, automatically testing through the business behavior model, and executing the test after setting the test parameters.
2. The method of claim 1, wherein the automated test requirements are obtained, and the automated test procedure is constructed using UML based on the automated test requirements, comprising;
carding the automatic test nodes in the automatic test requirements, and configuring the automatic test nodes according to the automatic test nodes;
testing and sequencing the automatic testing nodes and the automatic testing node configuration to generate an automatic testing path;
and generating an automatic test flow according to the automatic test path.
3. The method of claim 1, wherein determining an automated test strategy and test path through an automated test procedure constructed by UML comprises:
receiving a user automatic test request, and matching an automatic test flow according to the user automatic test request;
calling an automatic test path corresponding to the user automatic test request in the automatic test flow;
and establishing a business logic relationship between an automatic test path corresponding to the user automatic test request and the user automatic test request, and generating an automatic test strategy.
4. The method of claim 1, wherein constructing a test model for test requirements in an automated test based on the UML state diagram, generating different sets of test data based on the test model, comprises:
displaying the business logic behavior of the tested application by adopting a modeling mode based on the UML state diagram, and adjusting the tested business logic according to the display content;
displaying the operation actions and states of the tested business logic through the UML state diagram, and binding keywords for the operation actions and states;
and collecting service data and operation data in a specific scene under the test environment, and modeling after processing the service data and the operation data.
5. The method of claim 1, wherein configuring one or more sets of test data and constraint condition rules in test models corresponding to different sets of test data, completing a business behavior model of the whole tested application, performing an automated test through the business behavior model, and performing the test after setting test parameters, comprises:
building labels by using test models corresponding to different groups of test data;
according to the test model labels, a test sequence of the test models is established among the test models according to automatic test requirements, and a first test model, a second test model, a third test model and a fourth test model are determined;
the first test model is preferentially tested, and when the first test model is stopped, the subsequent test model is started.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310073758.7A CN116069640A (en) | 2023-01-13 | 2023-01-13 | Automatic testing method based on flow chart |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310073758.7A CN116069640A (en) | 2023-01-13 | 2023-01-13 | Automatic testing method based on flow chart |
Publications (1)
Publication Number | Publication Date |
---|---|
CN116069640A true CN116069640A (en) | 2023-05-05 |
Family
ID=86174590
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310073758.7A Pending CN116069640A (en) | 2023-01-13 | 2023-01-13 | Automatic testing method based on flow chart |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116069640A (en) |
-
2023
- 2023-01-13 CN CN202310073758.7A patent/CN116069640A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106446412B (en) | Model-based test method for avionics system | |
US20110112790A1 (en) | System and method for automatic hardware and software sequencing of computer-aided design (cad) functionality testing | |
CN106933729A (en) | A kind of method of testing and system based on cloud platform | |
WO2007001108A1 (en) | System for providing feature-oriented software product line engineering environment | |
CN111813686B (en) | Game testing method and device, testing terminal and storage medium | |
CN106354641A (en) | Testing method and device for process engine | |
CN111475412B (en) | Software testing method, device, electronic equipment and computer readable storage medium | |
CN111651365B (en) | Automatic interface testing method and device | |
Lei et al. | Performance and scalability testing strategy based on kubemark | |
CN111897725B (en) | Automatic test method, medium, equipment and system for middle platform service | |
CN110888800A (en) | Service interaction function test method, device, storage medium and test system | |
CN110990285A (en) | UI automation test method and device | |
CN114201397A (en) | Interface test modeling method and device, electronic equipment and storage medium | |
CN116069640A (en) | Automatic testing method based on flow chart | |
Boucher et al. | Transforming workflow models into automated end-to-end acceptance test cases | |
CN106855843B (en) | Performance analysis method and device of Web system | |
CN114675948A (en) | DAG data model dynamic scheduling method and system | |
CN114091687A (en) | Method and device for automatic delivery and deployment of machine learning model | |
CN113392436A (en) | CAE analysis software and office software integrated control method and platform | |
CN111090554A (en) | Method, device, equipment and storage medium for predicting server performance test time | |
CN114090454B (en) | Interface automation test method, device, equipment and storage medium | |
CN115543833A (en) | Interface simulation test and joint debugging method, device, equipment and medium | |
CN111488283B (en) | Task generation method and device, electronic equipment and storage medium | |
CN118227466A (en) | Automatic testing system and method for end-to-end service | |
CN114020551A (en) | Application software testing method and device |
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 |