CN112052180A - Stability testing method and system based on control arrangement - Google Patents
Stability testing method and system based on control arrangement Download PDFInfo
- Publication number
- CN112052180A CN112052180A CN202011018945.8A CN202011018945A CN112052180A CN 112052180 A CN112052180 A CN 112052180A CN 202011018945 A CN202011018945 A CN 202011018945A CN 112052180 A CN112052180 A CN 112052180A
- Authority
- CN
- China
- Prior art keywords
- control
- traversal
- controls
- algorithm
- interactive
- 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
- 238000000034 method Methods 0.000 title claims abstract description 35
- 238000012430 stability testing Methods 0.000 title claims abstract description 9
- 230000002452 interceptive effect Effects 0.000 claims abstract description 54
- 238000012360 testing method Methods 0.000 claims abstract description 45
- 230000009191 jumping Effects 0.000 claims abstract description 9
- 238000013112 stability test Methods 0.000 claims description 15
- 230000003993 interaction Effects 0.000 claims description 6
- 238000013522 software testing Methods 0.000 abstract description 7
- 230000007547 defect Effects 0.000 abstract description 6
- 230000008901 benefit Effects 0.000 abstract description 5
- 230000008569 process Effects 0.000 description 7
- 230000006399 behavior Effects 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 238000010586 diagram Methods 0.000 description 2
- 230000004044 response Effects 0.000 description 2
- 230000002159 abnormal effect Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 125000004122 cyclic group Chemical group 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000011161 development Methods 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—Prevention of errors by analysis, debugging or testing of software
- G06F11/3668—Testing of software
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Prevention of errors by analysis, debugging or testing of software
- G06F11/3668—Testing of software
- 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—Prevention of errors by analysis, debugging or testing of software
- G06F11/3668—Testing of software
- 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
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44521—Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
- G06F9/44526—Plug-ins; Add-ons
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Debugging And Monitoring (AREA)
Abstract
The invention relates to the technical field of software testing, in particular to a stability testing method and system based on control arrangement. The method comprises the following steps: acquiring an interactive control of an initial page; analyzing the function of each acquisition control to obtain a jump control; jumping to other pages through the jumping control and arranging all the obtained interactive controls into a tree structure; after a tree structure is obtained, a proper traversal algorithm is analyzed for the dendrogram; comparing the results of the traversal analysis to select a traversal algorithm with short traversal time; and performing traversal test by using the selected traversal algorithm. The method and the system have the advantages of comprehensive testing, good integrity, easy jump to the next page in the traversal work and high working efficiency, the traversal algorithm is selectively executed, the testing workload and the testing time are reduced, the testing efficiency is improved, the technical defects of incomplete testing, difficult page turning and large testing workload existing in the conventional stability testing are overcome, and the software testing requirement is met.
Description
Technical Field
The invention relates to the technical field of software testing, in particular to a stability testing method and system based on control arrangement.
Background
Software testing is a process of verifying the correctness, integrity, safety and quality of a software product, and generally, software testing requires operating a program under specified conditions in order to find errors of the program and improve the quality of the software so that the software can gradually meet the design requirements. The current application software is often provided with a user interface which is convenient for generating interaction with a user, and the user can complete corresponding interaction by directly clicking, sliding or dragging a corresponding control on the user interface when in use, so that in the process of software testing, all the controls need to be tested to ensure that the controls are all in a usable state.
The existing software testing method has the defect of incomplete testing, when a user interface has a plurality of pages, omission is easily generated during testing, controls of a single page are not completely displayed at times and are unfolded or displayed under specific conditions, on the other hand, a single control is also attached with sub-controls at times, the existing testing method easily treats the controls as one control to be processed, and the factors cause that some controls are easily omitted in simple traversal operation, so that incomplete testing is realized, and the testing quality is difficult to ensure; the existing stability test method usually carries out cyclic clicking on a home page to test stability, and is difficult to jump to the next page, so that the stability test is incomplete, and the stability test result is influenced; the layout and structure of each piece of software are different, and the layout and hierarchy of the page control can be adjusted by different versions of a single piece of software, so that a preset single traversal algorithm is difficult to adjust correspondingly according to conditions and is not always the traversal algorithm with the highest efficiency, and therefore a new stability testing method and system are needed to solve the defects.
Disclosure of Invention
In order to overcome the technical defects of incomplete test and high limitation existing in the existing software test, the invention provides a method and a system for testing stability based on control arrangement, which have comprehensive test and wide application range.
In order to solve the problems, the invention is realized according to the following technical scheme:
the invention discloses a stability test method based on control arrangement, which is characterized by comprising the following steps:
acquiring an interactive control of an initial page;
analyzing the function of each acquisition control to obtain a jump control;
jumping to other pages through the jumping control and arranging all the obtained interactive controls into a tree structure;
after a tree structure is obtained, a proper traversal algorithm is analyzed for the dendrogram;
comparing the results of the traversal analysis to select a traversal algorithm with short traversal time;
and performing traversal test by using the selected traversal algorithm.
The interactive control for acquiring the initial page comprises the following steps:
acquiring a movable control of an initial page;
sequentially inquiring the associated nodes of each active control;
and acquiring interaction controls which are not acquired on the associated nodes.
The associated node comprises: root node, father node, child node and end node.
The interactive control comprises: button controls, switch controls, slide controls, input controls, and drop-down menu controls.
The analyzing the functions of the acquisition controls to obtain the jump control specifically comprises: and traversing the acquired interactive control, and analyzing the function of the interactive control to judge whether the control has a page jump function.
The skipping to other pages through the skipping control and arranging all the obtained interactive controls into a tree structure comprises the following steps:
simulating the user behavior to interact with the jump control;
the skip control switches the page to a new page;
loading each control in the new page;
the interactable controls are arranged in a tree structure.
The traversal algorithm suitable for the dendrogram analysis after the tree structure is obtained specifically comprises the following steps: and traversing the interactive controls by adopting more than one traversal algorithm respectively, and counting the total traversal time required by each traversal algorithm.
The traversal algorithm includes, but is not limited to, depth-first search and breadth-first search.
The invention relates to a system for testing stability based on control arrangement, which is characterized by comprising the following components:
the control acquiring unit is used for acquiring the interactive control of the initial page;
the control analysis unit is used for analyzing and obtaining a page jump control according to the function analysis control;
the control arrangement unit is used for carrying out tree arrangement on the controls according to the interactive controls and the jump controls obtained by the two units;
a traversal algorithm analysis unit for analyzing a proper traversal algorithm according to the obtained dendrogram, wherein the algorithm comprises a depth-first algorithm (DFS) and a breadth-first algorithm (BFS), and the traversal time of each traversal algorithm is calculated aiming at the dendrogram;
the traversal algorithm selection unit selects an algorithm with short traversal time;
and the traversal algorithm execution unit executes the algorithm and traverses the control.
Compared with the prior art, the invention has the beneficial effects that:
the method and the system for testing the stability based on the control arrangement have the advantages of comprehensive test, good integrity, easy jump to the next page during traversal work and high working efficiency, the interactive controls are obtained to carry out testing work, all the interactive controls are obtained through page jump, the comprehensiveness of the test is ensured, the hidden controls are obtained through searching of the associated nodes, the omission condition is reduced, the integrity of traversal is improved, the page turning function is realized through the acquired skip control, the problem that the next page is difficult to skip in the stability test process is solved, the traversal algorithm is selectively executed, the test workload and the test time are reduced, the test efficiency is improved, the technical defects of incomplete test, difficulty in page turning and large test workload existing in the conventional stability test are overcome, and the software test requirement is met.
Drawings
Embodiments of the invention are described in further detail below with reference to the attached drawing figures, wherein:
FIG. 1 is a schematic flow diagram of the process of the present invention;
FIG. 2 is a flowchart illustrating a method for obtaining an interactive control of an initial page according to the present invention;
FIG. 3 is a flowchart illustrating a method of the present invention for jumping to other pages via a jump control and arranging all the obtained interactable controls into a tree structure;
fig. 4 is a schematic diagram of the system architecture of the present invention.
Detailed Description
The preferred embodiments of the present invention will be described in conjunction with the accompanying drawings, and it will be understood that they are described herein for the purpose of illustration and explanation and not limitation.
As shown in fig. 1 to 4, a method for stability testing based on control arrangement according to the present invention is characterized in that the method includes:
101. acquiring an interactive control of an initial page;
the interactive control for acquiring the initial page comprises the following steps:
201. acquiring a movable control of an initial page;
specifically, the active control is a control in an active state, that is, a control which is in a non-hidden state and can be searched and acquired, and the active control is used as a starting point of query, so as to further acquire other controls which are difficult to directly acquire, such as a control in a hidden state.
202. Sequentially inquiring the associated nodes of each active control;
specifically, the associated node includes: the method comprises a root node, a father node, a child node and a terminal node, and has the advantage that the control which is not easy to acquire can be further obtained through the existing control.
203. And acquiring interaction controls which are not acquired on the associated nodes.
Specifically, the interactive control includes: button controls, switch controls, slide controls, input controls, and drop-down menu controls.
102. Analyzing the function of each acquisition control to obtain a jump control;
the analyzing the functions of the acquisition controls to obtain the jump control specifically comprises: and traversing the acquired interactive control, and analyzing the function of the interactive control to judge whether the control has a page jump function.
103. Jumping to other pages through the jumping control and arranging all the obtained interactive controls into a tree structure;
the skipping to other pages through the skipping control and arranging all the obtained interactive controls into a tree structure comprises the following steps:
301. simulating the user behavior to interact with the jump control;
302. the skip control switches the page to a new page;
303. loading each control in the new page;
specifically, the new page works according to the acquisition method of the initial page, that is, the active controls of the new page are acquired, the associated nodes of the active controls are sequentially inquired, and then the interaction controls which are not acquired on the associated nodes are acquired until all pages are loaded by skipping.
304. The interactable controls are arranged in a tree structure.
Specifically, according to the association between the interactive controls, such as the association relationship between the parent node and the child node, the associated interactive controls are connected to each other until all the interactive controls are connected to each other to form a tree structure.
104. And analyzing a proper traversal algorithm for the dendrogram after the tree structure is obtained.
The traversal algorithm suitable for the dendrogram analysis after the tree structure is obtained specifically comprises the following steps: and respectively traversing the interactive controls by adopting more than one traversal algorithm, and counting the total traversal time required by each traversal algorithm, wherein the traversal algorithms including but not limited to depth-first search and breadth-first search only record the traversal time of the interactive controls of the traversal algorithm, and the interactive controls are not tested.
Specifically, the depth-first search selects a vertex of the interactive control with the tree structure, then searches downward for a node adjacent to the vertex, repeats the process to search downward continuously until no adjacent node exists, and then returns to the previous node until all the interactive controls are traversed; the breadth-first search firstly selects a vertex of the interactive control with the tree structure, then searches all adjacent nodes of the interactive control, and continuously traverses the adjacent nodes of each adjacent node until all the interactive controls are traversed.
105. Comparing the results of the traversal analysis to select a traversal algorithm with short traversal time;
specifically, after the traversal is completed, the total traversal time consumed by each traversal algorithm is compared, and the traversal algorithm with the shortest traversal time is selected for subsequent test work, and the setting has the advantages that: the arrangement of the controls is changed sometimes in the development process, so that the tree structure of the interactive controls is changed, the time consumed by subsequent actual tests can be effectively reduced by flexibly selecting the traversal algorithm with the shortest traversal time, and the high efficiency of each test can be ensured.
106. And performing traversal test by using the selected traversal algorithm.
Specifically, interactive controls on each node of the tree structure are sequentially tested by using a selected traversal algorithm, and the traversal test simulates user behaviors according to the types of the interactive controls to test the interactive controls. Specifically, the test operation includes a click operation, a sliding operation or a dragging operation, if the interactive control generates a corresponding response, it indicates that the control normally works, and if the interactive control does not respond or the interactive control generates an abnormal response, it indicates that the control has a problem and may damage the stability of the software, and at this time, the control with the problem is recorded so as to perform subsequent debugging and modification work.
The invention relates to a system for testing stability based on control arrangement, which is characterized by comprising the following components:
the control acquiring unit 1 is used for acquiring an interactive control of an initial page;
the control analysis unit 2 is used for analyzing and obtaining a page jump control according to the function analysis control;
the control arrangement unit 3 is used for carrying out tree arrangement on the controls according to the interactive controls and the jump controls obtained by the two units;
a traversal algorithm analysis unit 4 for analyzing a proper traversal algorithm according to the obtained dendrogram, wherein the algorithm includes a depth-first algorithm (DFS) and a breadth-first algorithm (BFS), and the traversal time of each traversal algorithm is calculated aiming at the dendrogram;
a traversal algorithm selection unit 5 for selecting an algorithm with short traversal time;
and the traversal algorithm execution unit 6 executes the algorithm to traverse the control.
The method and the system for testing the stability based on the control arrangement have the advantages of comprehensive test, good integrity, easy jump to the next page during traversal work and high working efficiency, the interactive controls are obtained to carry out testing work, all the interactive controls are obtained through page jump, the comprehensiveness of the test is ensured, the hidden controls are obtained through searching of the associated nodes, the omission condition is reduced, the integrity of traversal is improved, the page turning function is realized through the acquired skip control, the problem that the next page is difficult to skip in the stability test process is solved, the traversal algorithm is selectively executed, the test workload and the test time are reduced, the test efficiency is improved, the technical defects of incomplete test, difficulty in page turning and large test workload existing in the conventional stability test are overcome, and the software test requirement is met.
The above description is only a preferred embodiment of the present invention, and is not intended to limit the present invention in any way, so that any modification, equivalent change and modification made to the above embodiment according to the technical spirit of the present invention are within the scope of the technical solution of the present invention.
Claims (9)
1. A method for stability testing based on control arrangement is characterized in that the method comprises the following steps:
acquiring an interactive control of an initial page;
analyzing the function of each acquisition control to obtain a jump control;
jumping to other pages through the jumping control and arranging all the obtained interactive controls into a tree structure;
after a tree structure is obtained, a proper traversal algorithm is analyzed for the dendrogram;
comparing the results of the traversal analysis to select a traversal algorithm with short traversal time;
and performing traversal test by using the selected traversal algorithm.
2. The method for stability test based on control arrangement according to claim 1, wherein: the interactive control for acquiring the initial page comprises the following steps:
acquiring a movable control of an initial page;
sequentially inquiring the associated nodes of each active control;
and acquiring interaction controls which are not acquired on the associated nodes.
3. The method for stability test based on control arrangement according to claim 2, wherein: the associated node comprises: root node, father node, child node and end node.
4. The method for stability test based on control arrangement according to claim 2, wherein: the interactive control comprises: button controls, switch controls, slide controls, input controls, and drop-down menu controls.
5. The method for stability test based on control arrangement according to claim 1, wherein: the analyzing the functions of the acquisition controls to obtain the jump control specifically comprises: and traversing the acquired interactive control, and analyzing the function of the interactive control to judge whether the control has a page jump function.
6. The method for stability test based on control arrangement according to claim 1, wherein: the skipping to other pages through the skipping control and arranging all the obtained interactive controls into a tree structure comprises the following steps:
simulating the user behavior to interact with the jump control;
the skip control switches the page to a new page;
loading each control in the new page;
the interactable controls are arranged in a tree structure.
7. The method for stability test based on control arrangement according to claim 1, wherein: the traversal algorithm suitable for the dendrogram analysis after the tree structure is obtained specifically comprises the following steps: and traversing the interactive controls by adopting more than one traversal algorithm respectively, and counting the total traversal time required by each traversal algorithm.
8. The method for stability test based on control arrangement according to claim 7, wherein: the traversal algorithm includes, but is not limited to, depth-first search and breadth-first search.
9. A system for stability testing based on control arrangement, the system comprising:
the control acquiring unit is used for acquiring the interactive control of the initial page;
the control analysis unit is used for analyzing and obtaining a page jump control according to the function analysis control;
the control arrangement unit is used for carrying out tree arrangement on the controls according to the interactive controls and the jump controls obtained by the two units;
a traversal algorithm analysis unit for analyzing a proper traversal algorithm according to the obtained dendrogram, wherein the algorithm comprises a depth-first algorithm (DFS) and a breadth-first algorithm (BFS), and the traversal time of each traversal algorithm is calculated aiming at the dendrogram;
the traversal algorithm selection unit selects an algorithm with short traversal time;
and the traversal algorithm execution unit executes the algorithm and traverses the control.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011018945.8A CN112052180A (en) | 2020-09-24 | 2020-09-24 | Stability testing method and system based on control arrangement |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011018945.8A CN112052180A (en) | 2020-09-24 | 2020-09-24 | Stability testing method and system based on control arrangement |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112052180A true CN112052180A (en) | 2020-12-08 |
Family
ID=73604121
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011018945.8A Pending CN112052180A (en) | 2020-09-24 | 2020-09-24 | Stability testing method and system based on control arrangement |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112052180A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112527689A (en) * | 2021-02-09 | 2021-03-19 | 腾讯科技(深圳)有限公司 | Application testing method and device and storage medium |
CN112784194A (en) * | 2021-01-28 | 2021-05-11 | 济南大学 | Automatic traversal method and system for Android application page |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104050076A (en) * | 2013-03-12 | 2014-09-17 | 阿里巴巴集团控股有限公司 | Testing method, device and system of application software on mobile terminal |
CN105260301A (en) * | 2015-09-24 | 2016-01-20 | 努比亚技术有限公司 | Visual effect comparison test device of user interfaces and realization method of visual effect comparison test device of user interfaces |
CN107622008A (en) * | 2016-07-14 | 2018-01-23 | 阿里巴巴集团控股有限公司 | The traversal method and device of a kind of five application page |
-
2020
- 2020-09-24 CN CN202011018945.8A patent/CN112052180A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104050076A (en) * | 2013-03-12 | 2014-09-17 | 阿里巴巴集团控股有限公司 | Testing method, device and system of application software on mobile terminal |
CN105260301A (en) * | 2015-09-24 | 2016-01-20 | 努比亚技术有限公司 | Visual effect comparison test device of user interfaces and realization method of visual effect comparison test device of user interfaces |
CN107622008A (en) * | 2016-07-14 | 2018-01-23 | 阿里巴巴集团控股有限公司 | The traversal method and device of a kind of five application page |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112784194A (en) * | 2021-01-28 | 2021-05-11 | 济南大学 | Automatic traversal method and system for Android application page |
CN112784194B (en) * | 2021-01-28 | 2022-06-21 | 济南大学 | A kind of Android application page automatic traversal method and system |
CN112527689A (en) * | 2021-02-09 | 2021-03-19 | 腾讯科技(深圳)有限公司 | Application testing method and device and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US6895577B1 (en) | Risk metric for testing software | |
KR101477287B1 (en) | Test module generating apparatus, test sequence generating apparatus, generating method, program and test apparatus | |
US5390131A (en) | Apparatus and method for displaying wafer test results in real time | |
KR100339697B1 (en) | Program production system for semiconductor tester | |
JPH02272645A (en) | Method for supporting program debugging | |
CN115687115B (en) | Automatic testing method and system for mobile application program | |
CN104239219A (en) | Software defect positioning technology on-line evaluating and experimenting platform and method based on coverage | |
CN112052180A (en) | Stability testing method and system based on control arrangement | |
Dodaro et al. | Debugging non-ground ASP programs: Technique and graphical tools | |
CN114385877B (en) | Visual processing method and system of test process and computer readable medium | |
CN107562619B (en) | Automatic control traversing method and terminal based on neuron model | |
Sarhan et al. | Charmfl: A fault localization tool for python | |
CN111158656A (en) | Method and device for generating test codes based on fruit tree method | |
Alsolami et al. | Empirical analysis of object-oriented software test suite evolution | |
Papadakis et al. | Proteum/fl: A tool for localizing faults using mutation analysis | |
Rondon et al. | Evaluating agent-based program repair at google | |
Ye et al. | Automatic regression test selection based on activity diagrams | |
CN119166511A (en) | Test case generation method and device | |
Chen et al. | UnitFL: A fault localization tool integrated with unit test | |
CN112559322A (en) | Software analysis method and system based on dynamic instrumentation | |
Wong et al. | An execution slice and inter-block data dependency-based approach for fault localization | |
CN117858126A (en) | Router Wi-Fi aging test method and device, computer equipment and storage medium | |
CN117215959A (en) | Software testing method, device, equipment and storage medium | |
CN112765041B (en) | Game automation testing method and device and electronic equipment | |
CN116559624A (en) | Chip testing method, system, device 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 |