CN114020648A - Application control testing method and device, electronic equipment and storage medium - Google Patents

Application control testing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN114020648A
CN114020648A CN202210000516.0A CN202210000516A CN114020648A CN 114020648 A CN114020648 A CN 114020648A CN 202210000516 A CN202210000516 A CN 202210000516A CN 114020648 A CN114020648 A CN 114020648A
Authority
CN
China
Prior art keywords
information
application control
coverage
node data
application
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.)
Granted
Application number
CN202210000516.0A
Other languages
Chinese (zh)
Other versions
CN114020648B (en
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.)
Tuoshi Software Science Garden Co ltd Guangdong
Guangzhou Panyu Polytechnic
Original Assignee
Tuoshi Software Science Garden Co ltd Guangdong
Guangzhou Panyu Polytechnic
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 Tuoshi Software Science Garden Co ltd Guangdong, Guangzhou Panyu Polytechnic filed Critical Tuoshi Software Science Garden Co ltd Guangdong
Priority to CN202210000516.0A priority Critical patent/CN114020648B/en
Publication of CN114020648A publication Critical patent/CN114020648A/en
Application granted granted Critical
Publication of CN114020648B publication Critical patent/CN114020648B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/3676Test management for coverage analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites

Abstract

The application provides a test method and device of an application control, electronic equipment and a storage medium, and relates to the technical field of software engineering. The test method of the application control comprises the following steps: the application provides a test method of an application control, and specifically the method comprises the following steps: the method comprises the steps of obtaining first coverage tree information and second coverage tree information, comparing the first coverage tree information with the second coverage tree information to obtain whether difference node data exist or not, searching each difference node data of the first coverage tree information when the difference node data exist until downstream path information corresponding to all the difference node data is obtained, and finally updating the first coverage tree information according to all the downstream path information. The inherent test search strategy of automatic test is broken through, the test effect of the automatic test is improved, and coverage of more application control path information is realized.

Description

Application control testing method and device, electronic equipment and storage medium
Technical Field
The invention relates to the technical field of software engineering, in particular to a method and a device for testing an application control, electronic equipment and a storage medium.
Background
With the rapid development of informatization, the rapid delivery pressure of electronic applications forces the development cycle to be continuously shortened, and how to improve the application quality while ensuring the efficiency becomes a problem generally faced by software developers.
The existing application testing method is realized based on a crowdsourcing test or an automatic testing tool, and because the levels of testers in the crowdsourcing test are uneven and the subjectivity of the testing process is strong, the testing process is difficult to reproduce. The application test realized based on the automatic test tool needs a professional to write a test script, and all controls in the application are difficult to cover due to the problems of popup, rollback and the like. Therefore, an application testing method which has wide control coverage and can realize automatic testing is urgently needed.
Disclosure of Invention
The present invention provides a method and an apparatus for testing an application control, an electronic device, and a storage medium, so as to optimize a current method for testing an application control.
In order to achieve the above purpose, the technical solutions adopted in the embodiments of the present application are as follows:
in a first aspect, an embodiment of the present application provides a method for testing an application control, where the method includes:
obtaining first overlay tree information and second overlay tree information, the first overlay tree information characterizing application control path information generated via automatic testing; the second overlay tree information characterizes application control path information generated via at least one user operation;
comparing the first coverage tree information with the second coverage tree information;
when differential node data exists, searching each differential node data of the first overlay tree information until downstream path information corresponding to all the differential node data is obtained; the application control path information comprises node data, and the difference node data is the node data of which the first coverage tree information is consistent with the second coverage tree information and the corresponding downstream path has difference;
and updating the first coverage tree information according to all the downstream path information.
Optionally, the first coverage tree information and the second coverage tree information are generated by using a tree topology structure, and nodes in the tree topology structure are the node data; the step of comparing the first coverage tree information with the second coverage tree information comprises:
when differential node data exists, searching each differential node data of the first overlay tree information until downstream node data corresponding to all the differential node data and at least one node sequence information of the downstream node data are obtained; the differential node data is a node where the first coverage tree information is consistent with the second coverage tree information and corresponding downstream node data is different;
and updating the first coverage tree information according to all the downstream node data and the node sequence information.
Optionally, the method for generating the first overlay tree information includes:
generating a first overlay tree model;
acquiring the node data and node sequence information in the application control path information according to the application control path information generated by the automatic test;
and updating the first coverage tree model according to the node data and the node sequence information to generate the first coverage tree.
Optionally, the method for automatically testing and generating the application control path information includes:
obtaining application control information on a first application interface;
and when the inactivated application control information exists in the first application interface, activating each inactivated application control information, and obtaining the application control path information until obtaining the application control path information corresponding to all the application control information in the first application interface.
Optionally, the step of activating each piece of inactive application control information and obtaining the application control path information includes:
if the application control information is activated and enters a second application interface, acquiring the application control information on the second application interface;
when the inactivated application control information exists in the second application interface, activating each inactivated application control information, and obtaining the application control path information until obtaining the application control path information corresponding to all the application control information in the second application interface;
and returning to the first application interface, and activating the inactivated application control information in the first application interface.
Optionally, the method for generating the second overlay tree information includes:
processing the application control path information generated by at least one user operation by adopting a preset format;
acquiring the node data and the node sequence information in the application control path information according to the application control path information generated by at least one user operation;
and generating the second coverage tree according to the node data and the node sequence information.
Optionally, when the application control path information generated by at least one user operation is processed in the preset format, the method further includes:
creating a triple, wherein the triple comprises control information, behavior information and trigger event information;
acquiring the application control path information generated by the at least one user operation;
generating at least one triple according to the application control path information;
according to repeated information in the triples, fusing the triples to obtain a no-repeated triple operation list, wherein the repeated information comprises: the repeated control information and/or trigger event information corresponding to the repeated control information; the triple operation list includes: a plurality of triples and an index order between the triples;
and acquiring the path information of the application control based on the triple operation list.
In a second aspect, an embodiment of the present application further provides a device for testing an application control, where the device includes an obtaining module, a comparing module, a processing module, and an updating module;
the acquisition module is specifically configured to acquire first overlay tree information and second overlay tree information, where the first overlay tree information represents application control path information generated through automatic testing; the second overlay tree information characterizes application control path information generated via at least one user operation;
the comparison module is specifically configured to compare the first coverage tree information with the second coverage tree information;
the processing module is specifically configured to, when there is differential node data, search each differential node data of the first overlay tree information until downstream path information corresponding to all the differential node data is obtained; the application control path information comprises node data, and the difference node data is the node data of which the first coverage tree information is consistent with the second coverage tree information and the corresponding downstream path has difference;
the updating module is specifically configured to update the first overlay tree information according to all the downstream path information.
In a third aspect, an embodiment of the present application further provides an electronic device, including: the device comprises a processor, a storage medium and a bus, wherein the storage medium stores program instructions executable by the processor, when an electronic device runs, the processor and the storage medium communicate through the bus, and the processor executes the program instructions to execute the steps of the test method of the application control according to any one of the first aspect.
In a fourth aspect, the present application further provides a computer-readable storage medium, where the storage medium stores a computer program, and the computer program is executed by a processor to perform the steps of the method for testing an application control according to any one of the first aspect.
The beneficial effect of this application is: the application provides a test method of an application control, and specifically the method comprises the following steps: the method comprises the steps of obtaining first coverage tree information and second coverage tree information, comparing the first coverage tree information with the second coverage tree information to obtain whether difference node data exist or not, searching each difference node data of the first coverage tree information when the difference node data exist until downstream path information corresponding to all the difference node data is obtained, and finally updating the first coverage tree information according to all the downstream path information. In the method, the second coverage tree information is adopted, the user operation is introduced into the first coverage tree information generated by automatic test, and the second coverage tree information comprises the application control path information generated by the user operation, so that the method has human intelligence; updating the path information of the automatically tested application control according to the path information of the application control generated by user operation, namely, guiding the automatic test to search the application control which can be reached according to human intelligence by using the user operation with human knowledge; on the basis of high efficiency of automatic testing, the method breaks through the inherent test search strategy of automatic testing, improves the testing effect of automatic testing, realizes the coverage of more application control path information, breaks through the bottleneck that the coverage rate is basically leveled along with the increase of time in the current automatic testing, and is greatly helpful for finding more system bugs.
On the basis, the updated first coverage tree information can be submitted to a tester for research, the tester can know the uncovered application control path information by comparing the updated first coverage tree information with the application source code so as to guide the operation direction of a user behind the tester, and the process is repeated, so that the application control path information contained in the first coverage tree information is more and more complete, and the application coverage rate is continuously improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
Fig. 1 is a flowchart of a method for testing an application control according to an embodiment of the present application;
fig. 2 is a flowchart of a method for comparing first overlay tree information and second overlay tree information in a method for testing an application control according to another embodiment of the present application;
fig. 3 is a flowchart of a method for generating first overlay tree information in a method for testing an application control according to another embodiment of the present application;
fig. 4 is a flowchart illustrating a method for automatically testing and generating path information of an application control in a method for testing an application control according to yet another embodiment of the present application;
fig. 5 is a flowchart illustrating activation of each inactivated application control information in a method for testing an application control according to yet another embodiment of the present application;
fig. 6 is a schematic effect diagram of a testing method for an application control according to an embodiment of the present application;
fig. 7 is a flowchart of a method for generating second overlay tree information in a method for testing an application control according to a further third embodiment of the present application;
fig. 8 is a flowchart of a preset format processing method in a test method for an application control according to a further third embodiment of the present application;
fig. 9 is a schematic diagram of a testing apparatus for an application control according to an embodiment of the present application;
fig. 10 is a schematic view of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention.
In this application, unless explicitly stated or limited otherwise, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implying any number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one feature. In the description of the present invention, "a plurality" means at least two, for example, two, three, unless specifically defined otherwise. The terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
With the rapid development of informatization, the development period is forced to be continuously shortened by the pressure of rapid application delivery, and how to improve the application quality while ensuring the efficiency is a problem generally faced by application developers. In use, users not only pay attention to each basic function of the application, but also pay more and more attention to other aspects of the application, such as performance, experience and the like. Once an application makes a mistake, the user's evaluation of the application is also reduced, which may lead to a continuous reduction in user usage, on the one hand; on the other hand, if the rating is too low, the application may even be removed by the application marketplace. Therefore, quality assurance of the application from development to distribution becomes particularly important. The currently used quality testing methods mainly include two types: crowdsourcing tests and automated tests.
Crowdsourcing testing is manual testing performed by a plurality of testers from different sources under different application platforms. Because the application platforms tested by the method are not agreed and the environment is various, the test result of the test method is more reliable, economic, efficient and rapid. However, in the crowdsourcing test, when a tester performs the test, a large amount of repetitive work is usually required to achieve the purpose of regression testing. In addition, because the subjectivity of the tester is strong in the test, it is difficult to perfectly reproduce the repetitive work in each test. Meanwhile, the accuracy of the test also depends on the knowledge level of the tester, and if the level of the tester is insufficient, the recurrence is difficult to succeed due to the defects existing in the submitted test result.
In order to reduce the cost of application testing and optimize the execution efficiency, an application developer can also use an automatic testing framework and an automatic testing tool to complete the testing work.
An automated testing framework refers to a technical professional writing a script that can be repeatedly executed by the framework. Once the application is changed and regression testing is needed, the testing process can be perfectly reproduced only by slightly modifying the script. Although the script needs certain knowledge and time when being written, and different effects can be achieved according to the level of a writer, the written content can be perfectly reproduced even if the script is written. Most of the current testing platforms in the industry are biased to use an automated testing framework for automated testing. In many test platforms, a user can test on different platforms by adding automatic test scripts, and the scripts can be added by the user or written by assistance of technicians.
An automatic test tool is a test tool which can automatically traverse applications without manual operation or compiling automatic test scripts, such as Monkey. The testing mode triggers system BUGs (BUG) which may appear in the application through high application coverage rate, namely, large-area coverage of application content, records the system BUGs in results, and delivers the system BUGs to testers for reproduction and modification. Since 2011, many studies have been made by academia on automated testing tools, such as dynodoid, Sapienz, PUMA, evodorid, Stoat, A3E, and so on. These automated testing tools can indeed make a detailed coverage of the application controls, and as long as a new page is reached, the controls on that page must be completely recorded. However, due to the generation of special problems such as the pop-up window problem, the rollback problem, and the control combination type problem, even though most of the controls can be found by the automated testing tool, it is difficult to cover all the controls in practical use. In recent years, many of the related researches have been made to solve only one of the problems of the plurality of automated tools, and some minor improvements to the conventional tools have been proposed. The comparative experiments performed in the paper of these tools also generally focused on whether the coverage of the tool was improved compared to other tools. However, macroscopically, the coverage achieved by automated test tools is still far from that achieved by crowd sourced testing. Meanwhile, the test flow of most tools is often disposable, and in the one-time test flow, the automatic test tool cannot be repeatedly utilized for the control and the branch path which are found but cannot be covered due to various problems, so that the coverage rate of the automatic test tool is enhanced.
According to the analysis, in the crowdsourcing test, the test level of the tester is uneven, which may cause that the important user operation flow cannot reappear. The automatic testing tool improves the testing efficiency, but due to lack of human knowledge, the automatic testing tool is influenced by inherent strategies, and the actual testing effect is far inferior to that of manual testing. In order to solve the problems, embodiments of the present application provide various implementations of application control testing. The following is explained by way of a number of examples in connection with the drawings.
Fig. 1 is a flowchart of a method for testing an application control according to an embodiment of the present application, where the method for testing an application control can be implemented by an electronic device running the program, and the electronic device may be, for example, a terminal device or a server. As shown in fig. 1, the method includes:
step 101: obtaining first overlay tree information and second overlay tree information, the first overlay tree information representing application control path information generated via automatic testing; the second overlay tree information characterizes application control path information generated via at least one user operation.
It should be noted that the obtained first coverage tree information and second coverage tree information represent application control path information, and the application control path information may include one or more of the following types of information: the method includes the steps of obtaining a control path information, a control name, a control type, a control activation mode, a trigger event corresponding to the control and the like, wherein the specific content contained in the application control path information is not limited as long as the control path information and the trigger event information corresponding to the control can be represented. And obtaining first coverage tree information generated by automatic testing and second coverage tree information generated by at least one user operation according to different application control path information obtaining modes.
Step 102: the first coverage tree information is compared with the second coverage tree information.
Comparing the first coverage tree information with the second coverage tree information, in general, since the second coverage tree information is generated by user operation and contains human intelligent interaction information, the first coverage tree information generated by automatic testing often contains more application control path information. Therefore, by comparing the first coverage tree information and the second coverage tree information, it is possible to extract node data having a difference in the two coverage tree information.
Step 103: when the difference node data exists, searching each difference node data of the first overlay tree information until downstream path information corresponding to all the difference node data is obtained; the application control path information comprises node data, and the difference node data is the node data in which the first coverage tree information is consistent with the second coverage tree information and the corresponding downstream path has difference.
Through the comparison in step 102, if there is differential node data in the first overlay tree and the second overlay tree, each differential node data in the first overlay tree information is searched. In a possible implementation manner, the search for the difference node data may adopt a traversal search, for example, traversal manners such as for … in, for … of, filter (), map (), sound (), event () and the like are used, which is not limited in the present application as long as it can search and obtain downstream path information corresponding to all difference node data.
In one possible implementation, when there is differential node data, the first overlay tree information may be updated according to the application control path information corresponding to the differential node data of the second overlay tree until the differential node data is completely covered by the first overlay tree information. In another possible implementation manner, when there is difference node data, in addition to the application control path information corresponding to the difference node data purely according to the second overlay tree, other application control path information corresponding to the difference node data may be searched, so that omission of the application control path information due to insufficient user operation data is avoided. The above is merely an example, and in an actual implementation, the search for the difference node data may also have other forms, which is not limited in this application.
In a specific implementation manner, whether difference node data exists is judged, if the judgment result is yes, the first overlay tree information does not include all application control information in the second overlay tree information, and the difference node data is found from the first overlay tree information, wherein the difference node data indicates that the data exists in the second overlay tree information but does not include downstream path information of the node data in the first overlay tree information. And after confirming the node data, searching the downstream path of each node data, comparing the search result with the second overlay tree information, and if the different node data still exists, continuing searching until the different node data does not exist, namely acquiring the downstream path information corresponding to all the different node data. And judging whether the differential node data exists or not, if the judgment result is 'no', indicating that the first coverage tree information comprises all the application control information in the second coverage tree information, and ending the search.
In another specific implementation manner, when an automated test script written manually and having human knowledge is executed, related control information and page information may be automatically captured by modifying the first coverage tree automated test (for example, by modifying, instrumentation, repackaging, and the like an Appium related runtime class), so as to obtain downstream path information corresponding to the difference node data.
Step 104: and updating the first coverage tree information according to all the downstream path information.
And updating the first coverage tree information according to all the acquired downstream path information. The updated first overlay tree information comprises the application control path information generated by automatic testing and the application control path information generated by user operation.
It should be noted that after the search is completed in step 103, the first coverage tree information may further include more application control path information than the second coverage tree information, because after the difference node data is determined, the first coverage tree information does not completely depend on the specific process information of the user operation when the difference node data is searched, and therefore, the application control path information that is not included in the user operation may be acquired. Therefore, the information amount difference that may exist in the application control path information included in the updated first coverage tree information and the updated second coverage tree information is not limited in the present application, as long as the first coverage tree information includes all information of the second coverage tree information. Thus, the conditions for stopping the search in step 103 are as follows: stopping when the first coverage tree information comprises all the information of the second coverage tree information, otherwise, not establishing.
To sum up, an embodiment of the present application provides a method for testing an application control, and specifically, the method includes: the method comprises the steps of obtaining first coverage tree information and second coverage tree information, comparing the first coverage tree information with the second coverage tree information to obtain whether difference node data exist or not, searching each difference node data of the first coverage tree information when the difference node data exist until downstream path information corresponding to all the difference node data is obtained, and finally updating the first coverage tree information according to all the downstream path information. In the method, the second coverage tree information is adopted, the user operation is introduced into the first coverage tree information generated by automatic test, and the second coverage tree information comprises the application control path information generated by the user operation, so that the method has human intelligence; updating the path information of the automatically tested application control according to the path information of the application control generated by user operation, namely, guiding the automatic test to search the application control which can be reached according to human intelligence by using the user operation with human knowledge; on the basis of high efficiency of automatic testing, the method breaks through the inherent test search strategy of automatic testing, improves the testing effect of automatic testing, realizes the coverage of more application control path information, breaks through the bottleneck that the coverage rate is basically leveled along with the increase of time in the current automatic testing, and is greatly helpful for finding more system bugs.
On the basis, the updated first coverage tree information can be submitted to a tester for research, the tester can know the uncovered application control path information by comparing the updated first coverage tree information with the application source code so as to guide the operation direction of a user behind the tester, and the process is repeated, so that the application control path information contained in the first coverage tree information is more and more complete, and the application coverage rate is continuously improved.
Optionally, on the basis of fig. 1, the first coverage tree information and the second coverage tree information are generated by using a tree topology structure, and nodes in the tree topology structure are node data; fig. 2 is a flowchart of a method for comparing first coverage tree information with second coverage tree information in a test method for an application control according to another embodiment of the present disclosure; as shown in fig. 2, the method includes:
step 201: when the difference nodes exist, searching each difference node data of the first overlay tree information until downstream node data corresponding to all the difference node data and at least one node sequence information of the downstream node data are obtained; the differential node data is a node where the first coverage tree information is consistent with the second coverage tree information and the corresponding downstream node data has a difference.
It should be noted that the first coverage tree information and the second coverage tree information may be generated by using a tree topology structure, in a possible implementation manner, the node data includes control operation information, control information, trigger event information, and the like, and according to actual needs, a specific piece of information in the node data may be selected as a node, for example, the control operation information in the application control path information may be used as a leaf node, and the control operation information is formed into one piece of coverage tree information in sequence. The specific node content of the tree topology structure is not limited in the application.
And if the first coverage tree and the second coverage tree have different node data, searching each different node data in the first coverage tree information. In a possible implementation manner, the search for the differential node data may adopt traversal search, for example, traversal manners such as traversal before, during, and after a tree, breadth-first search, depth-first search, hierarchical traversal of a tree, and the like are used, which is not limited in the present application as long as it can search and obtain downstream node data corresponding to all the differential node data and at least one node sequence information of the downstream node data.
In one possible implementation, when there is differential node data, the first overlay tree information may be updated repeatedly according to the differential node data of the second overlay tree and the corresponding at least one node sequence information until the differential node data is completely covered by the first overlay tree information. In another possible implementation manner, when there is differential node data, the nodes corresponding to the differential node data can be searched in addition to the differential node data of the second overlay tree and the at least one node sequence information, so that omission of nodes due to insufficient user operation data is avoided. The above is merely an example, and in an actual implementation, the search for the difference node data may also have other forms, which is not limited in this application.
In a specific implementation manner, whether differential node data exists is judged, if yes, the first coverage tree information does not include all nodes in the second coverage tree information, and the differential node data is found from the first coverage tree information, wherein the differential node data indicates that the data exists in the second coverage tree information but does not include downstream node data of the node in the first coverage tree information. And after the differential node data are confirmed, searching the downstream path of each differential node data, comparing the search result with the second overlay tree information, and if the differential node data exist, continuing searching until the differential node data do not exist, namely the downstream node data corresponding to all the differential node data are obtained. And judging whether the differential node data exists or not, if the judgment result is 'no', indicating that the first coverage tree information comprises all nodes in the second coverage tree information, and finishing the search.
Step 202: and updating the first coverage tree information according to all the downstream node data and the node sequence information.
And updating the first coverage tree information according to all the acquired downstream node data. The updated first overlay tree information includes both nodes generated by automatic testing and nodes generated by user operation.
The first coverage tree information and the second coverage tree information are generated based on the tree topology structure, the structure is simple, the maintenance is convenient, and the expansion is easy.
Optionally, on the basis of fig. 2, the present application further provides a possible implementation manner of a method for generating first overlay tree information in a method for testing an application control, and fig. 3 is a flowchart of a method for generating first overlay tree information in a method for testing an application control according to another embodiment of the present application; as shown in fig. 3, the method includes:
step 301: a first coverage tree model is generated.
It should be noted that the first overlay tree model may be a blank model, and provides a generation control for generating the first overlay tree; the first overlay tree model may also be a blank content model including a generation template, that is, the model includes specific structure information and related parameters of model building. The above is merely an example, and in an actual implementation, the first coverage tree model may also have other forms, for example, the first coverage tree model may also be a first coverage tree generated after a past test, which is not limited in this application.
Step 302: and acquiring node data and node sequence information in the application control path information according to the application control path information generated by the automatic test.
In a possible implementation manner, the path information generated by the automatic test includes node data and sequence information of nodes, where the sequence information of nodes may indicate an occurrence sequence of two adjacent nodes, for example, node B, node C, and node D may occur after node a is triggered, and then the node sequence information indicates an occurrence sequence between node a and node B, node C, and node D, which may be recorded as a-B, a-C, A-D, and in the visualized representation of the tree topology, the sequence information of nodes may be indicated as a connection relationship between two nodes. The above is merely an example, and the recording manner and the obtaining manner of the node sequence are not limited in this application.
Step 303: and updating the first coverage tree model according to the node data and the node sequence information to generate a first coverage tree.
The first coverage tree model is updated according to the acquired nodes and the node sequence information, for example, the existing nodes may be extended according to the newly added node sequence information of the existing nodes, and the nodes and the like are added to the first coverage tree model according to the nodes in the extending direction corresponding to the node sequence.
In one particular implementation, the generation of the first overlay tree information may be performed using a framework of automated testing (e.g., Uiautormator developed by the android official). Through a series of interfaces provided by the automated testing framework, a series of automated testing operations such as clicking, sliding, keyboard input, touching, long pressing, even an assertion method and the like are performed on the application. Meanwhile, the framework of the automatic test can store all layout information and control information on the current interface of the equipment in a snapshot mode. For example: control id (resource-id), control text (text), class-name of the control, package-name of the control, control description information (desc), and the like. Through the attributes, the control or a series of controls of the target attribute can be positioned and operated by using an application program interface provided by the framework of the automatic test, and then the first overlay tree information is generated. The above is merely an example, and in an actual implementation, there may be other first overlay tree information generation manners, which is not limited in this application. In another specific implementation manner, the generation of the second coverage tree information may be performed by using a user test result of the crowdsourcing test. The above is merely an example, and the present application does not limit the specific generation manner of the first overlay tree information and the second overlay information, and may acquire the overlay tree information that meets the use requirement.
Through the steps, the first coverage tree is generated, and the first coverage tree can be used for describing the control structure of the application to be tested, which is covered, to an automatic test tool or an automatic test framework.
Optionally, on the basis of fig. 3, the present application further provides a possible implementation manner of a method for automatically testing and generating path information of an application control in a testing method of an application control, and fig. 4 is a flowchart of a method for automatically testing and generating path information of an application control in a testing method of an application control according to yet another embodiment of the present application; as shown in fig. 4, the method includes:
step 401: application control information on a first application interface is obtained.
In one possible implementation, when a page is traversed in the automatic test, all the application control information of the page is recorded first.
Step 402: and when the inactivated application control information exists in the first application interface, activating each inactivated application control information, and obtaining application control path information until obtaining the application control path information corresponding to all the application control information in the first application interface.
In a possible implementation manner, when there is application control information that is not activated in a recorded first application interface, each control is activated, application control path information such as a trigger event after the control is activated is recorded, and an automated testing tool completes coverage on the control according to a set search mode (for example, depth-first search, breadth-first search, and the like), where some complex logic functions may also be regarded as new branches, so as to obtain application control path information corresponding to all application control information in the first application interface. After the search is completed, recording application control path information corresponding to all the application control information in the first application interface, and then generating a first overlay tree according to the recorded content.
In a specific implementation manner, the app, which is a node.js-based open-source mobile application automation test framework, may be used to obtain the application control information. It does not only support android, but also supports the use of IOS and firefox. It is this cross-platform nature that has enabled the applicant to gain human acceptance in a wide variety of automated testing frameworks. The Apium can acquire application control information in a user operation flow and help the system to easily locate each control, so that corresponding operation can reappear in a subsequent automation process.
And acquiring application control path information corresponding to all the application control information in the first interface through the steps, and providing a data basis for the generation of the first coverage tree.
Optionally, on the basis of fig. 4, the present application further provides a possible implementation manner for activating each inactivated application control information and obtaining application control path information in the test method for an application control, and fig. 5 is a flowchart for activating each inactivated application control information in the test method for an application control according to yet another embodiment of the present application; as shown in fig. 5, the method includes:
step 501: and if the application control information is activated and enters the second application interface, acquiring the application control information on the second application interface.
In one possible implementation, after the application control information on the first interface is activated, an interface jump may occur, that is, the second application interface is entered. And if the jump happens, recording all the application control information on the second application interface.
Step 502: and when the inactivated application control information exists in the second application interface, activating each inactivated application control information, and obtaining application control path information until obtaining the application control path information corresponding to all the application control information in the second application interface.
In a possible implementation manner, when there is application control information that is not activated in the recorded second application interface, each control is activated, application control path information such as a trigger event after the control is activated is recorded, and the automated testing tool completes coverage on the control according to a set search mode (for example, depth-first search, breadth-first search, and the like), wherein some complex logic functions may also be regarded as new branches, so that the application control path information corresponding to all the application control information in the second application interface is obtained.
Step 503: and returning to the first application interface, and activating the inactivated application control information in the first application interface.
And after the search is finished, returning to the previous application interface, and activating the information of the single application control which is not activated in the previous application interface, namely returning to the step 402, namely realizing the depth-first search of the node.
In a specific implementation manner, activation of application control information in all application interfaces can be achieved through multiple rounds of automated testing, fig. 6 is an effect schematic diagram of a testing method for application controls provided in an embodiment of the present application, and after a first round of automated testing is completed as shown in fig. 6, a first coverage tree (or called an operation flow) and a second coverage tree obtained in the execution process are compared to find out nodes in the first coverage tree that are not yet covered, and coverage is preferentially performed in a next round of testing, so that a next round of testing is performed iteratively until all nodes in the second coverage tree are traversed;
for the activation manner of the application control information in the interface, only two application interfaces are exemplarily illustrated, and for the case that there are more application interfaces in the application, it is conceivable that, for the case that the entry into another application interface is triggered by activating the application control information from any one application interface, the activation manner of the control can be implemented by using the implementation manner.
Optionally, on the basis of fig. 2, the present application further provides a possible implementation manner of a method for generating second overlay tree information in a method for testing an application control, and fig. 7 is a flowchart of a method for generating second overlay tree information in a method for testing an application control according to a further third embodiment of the present application; as shown in fig. 7, the method includes:
step 701: and processing the application control path information generated by at least one user operation by adopting a preset format.
It should be noted that the application control path information generated by the user operation is from a test report generated by the user through a crowdsourcing test or the like, that is, because the problems of the application environment, knowledge reserve and the like of the user itself have a problem of being unqualified or wrong, the application control path information needs to be processed through a preset format so as to facilitate subsequent operations. In addition, some unqualified or wrong test reports can be processed by auditing testers, which is not limited in the application.
Step 702: and acquiring nodes and node sequence information in the application control path information according to the application control path information generated by at least one user operation.
And according to the processed application control path information, the nodes and the node sequence information in the application control path information can be obtained.
Step 703: and generating a second coverage tree according to the nodes and the node sequence information.
And generating a second coverage tree according to the acquired nodes and the node sequence information. The specific manner of generating the second overlay tree according to the node and the node sequence information is the same as the manner of generating the first overlay tree, and is not described herein again.
Optionally, on the basis of fig. 7, the present application further provides a possible implementation manner of preset format processing in the test method for an application control, and fig. 8 is a flowchart of a preset format processing method in a test method for an application control according to a further third embodiment of the present application; as shown in fig. 8, the method includes:
step 801: and creating a triple, wherein the triple comprises control information, behavior information and trigger event information.
In a specific implementation manner, the triplet may be W = (WidgetInfo, behavior, Activities), where the WidgetInfo refers to control information (including control id, text, desc, and the like); behavior refers to behavioral information, including (including Click, input, slide, etc.); activities refer to trigger information (e.g., the name of a trigger such as a registration, login, or other trigger-related information). The foregoing is merely an example, and in actual implementation, specific composition, structure, format, and the like of the triplet may be set according to actual test requirements, which is not limited in this application.
It should be noted that, for the application test, the order of the application control information coverage is far more important than the number thereof, and some application controls may need to perform a series of fixed operations to be reached, so that besides the condition that each covered application control information itself needs to be recorded, the correlation between the covered application control information needs to be recorded, and then the same or related information can be integrated through the correlation.
Step 802: and acquiring application control path information generated by at least one user operation.
It should be noted that the obtained application control path information may include one or more sets of control information, behavior information, and trigger event information.
Step 803: and generating at least one triple according to the application control path information.
And generating at least one triple according to the application control path information and the format requirement of the triple.
Step 804: according to repeated information in the triples, fusing the triples to obtain a triple operation list without repetition, wherein the repeated information comprises: repeated control information and/or trigger event information corresponding to the repeated control information; the triple operation list includes: a plurality of triples and an index order between the triples;
in a specific implementation manner, firstly, the application control path information generated by at least one user operation is sorted in a preset format to form a formatted data format with human knowledge, and considering that the repeatability of user operation processes tested by different testers in the user operation exists, the repeated operation information needs to be removed.
In one possible implementation, by fusing a plurality of triplets, second overlay tree information is generated that can be read by both a machine and a human, for example, for the following test procedures: the test user clicks the 'user name bar' control, inputs the user name, clicks the 'password bar' control, inputs the password, and clicks the 'login' control, so that an operation flow can be simplified into a triple W = (WidgetInfo, behavior, Activities) list:
List(W) = {
w1(ID control information (including control ID, text, desc, etc.), Click, LoginActivity);
w2(ID control information, input (user real ID), LoginActivity);
w3 (Passsword control information, Click, LoginActivity);
w4(Password control information, input (user real Password), LoginActivity);
w5 (Login Activity, Click) for login control information
Since the user's operation will certainly contact the application control, each user operation flow can be digitized into the list (w), and the index sequence among the triples in the list represents the sequence of the application control information of the current operation, and in general, there are overlapping controls among multiple operation flows, so that the operation flows need to be merged to finally generate a triple operation list without repeated control operation information, which represents the control and Activity status covered by the current application.
Step 805: and acquiring the path information of the application control based on the triple operation list.
And acquiring application control path information based on the acquired triple operation list without repetition to generate second coverage tree information. In a possible implementation manner, the no-duplicate triple Operation list may be subjected to second overlay tree information modeling and then uploaded to a cloud Operation Support System (OSS).
Through the preset format processing of the user operation information, the standardization of the user operation information is realized, the subsequent manual reading or program calling processing is facilitated, the operation time is saved, and the test process is accelerated.
Optionally, after the test is completed, the first coverage tree information of the coverage condition of the application to be tested is output for research after the second coverage tree information is introduced into the test, and a test report of the test is also output, which is not limited in the present application.
Optionally, the coverage rate of the first coverage tree may be calculated according to the number of the application control information in the first coverage tree information and the total number of the application control information.
Coverage = (number of application control information executed at least once/"total number of application control information) × 100%;
in one specific implementation, the calculation of the Coverage may be implemented using a Java Code Coverage counting tool (Jacoco). Jacoco is the most mature test coverage rate obtaining tool at present, test results can be observed and evaluated from the overall coverage rate value, and the coverage rates of six scales can be included, which are respectively: instruction coverage, branch coverage, circle complexity, row coverage, method coverage, class coverage. The above is merely an example, and the specific calculation method of the coverage rate is not limited in the present application.
In conclusion, the sequence and the related information of the control are recorded by extracting the operation flow information operated by the user and are stored in a triple form; then fusing a plurality of triples with repeated information, removing repeated control information, and finally forming a triple list without repetition; the triple list obtained by formatting fusion is introduced into an automatic test, so that the automatic test is guided to be deeply explored, and the man-machine cooperation test is realized; and feeding back the final application control information coverage result to the tester, thereby training the tester to form a new user operation flow by crossing complex interactive information, and further guiding the automatic test to continue to deeply explore. Through the steps, the method and the device can extract the user operation information (such as the user operation information in the crowdsourcing test), then guide the automatic test deep search, and break through the fixed test search strategy of the automatic test. Thereby improving the testing effect of the automatic test.
The present application is described globally below by way of a complete embodiment:
in the embodiment, the user operation information in the crowdsourcing test is simulated by selecting the running automatic test script, and a professional tester writes the related script to be repeatedly executed through the framework. Once the application is changed and regression testing is needed, the testing process can be perfectly reproduced only by slightly modifying the script. And then recording control coverage information and a sequence flow among the controls, and forming a user operation stream file through formatting fusion. The automatic test selects a simple DFS traversal mode, and the code coverage rate and the control coverage rate are improved through the guidance of user operation information.
The specific experimental environment is as follows: and a Ubuntu 16.04 and a MySQL 5.7 database record short information, and file information is stored in the Aliyun OSS. And operating the memory 16GB, JDK 1.8 and Node 8.12.0.
Firstly, the automatic test script is run by the Appium to replace a crowdsourcing test user to obtain user operation information, and then the user operation information is stored in a fixed form, and a triple list List (W) is finally formed by one piece of user operation information;
secondly, removing the multiple triple lists List (W) obtained by fusion, fusing the operation information to finally generate an application control coverage tree without repeated control operation information, namely first coverage tree information, wherein the tree represents the control covered by the current application and the Activity condition;
then, according to the first coverage tree information, guiding an automatic testing tool (the automatic testing tool is a tool for running an automatic testing script and carrying out automatic testing) to complete coverage of more controls, taking Activity as a node, then finding uncovered Activity by comparing the second coverage tree information, and then guiding the automatic testing tool to cover manually found Activity;
after the automated test is executed and a round of test is finished (namely the first coverage tree information is automatically generated), an initial control coverage tree (the initial first coverage tree information) is obtained, and then more interactive behaviors are found through the user operation information, and the deep exploration is continued through the control relocation. In addition, the automatic testing tool does not complete a round of testing, and mining an Activity stops, but continuously iterates until all controls covered by all user operation information are completely covered, namely, the first coverage tree information comprises all contents of the second coverage tree information, so that the automatic testing tool is completely tested. By investigating the actual control information, all controls are not missed due to control relocation and are all covered by an automatic test tool; and finally, the coverage condition is fed back to the manual work for training, so that deeper information can be continuously mined.
And then, when one piece of user operation information is completely covered by the automatic testing tool, namely one piece of second coverage tree information is completely covered, feeding back the coverage result of the automatic testing to a human for training. Then, more complex interaction behaviors are continuously finished by means of manpower, namely, more complex second coverage tree information is generated, and the exploration of an automatic testing tool is continuously guided;
the tester continuously introduces page Activity achieved through high-level logic thinking of human beings and then guides an automatic testing tool to search deeply. Human knowledge is introduced, so that a fixed test search strategy of an automatic test tool is broken, and more Activities can be explored to complete coverage of more controls and codes. Therefore, the bottleneck that the coverage rate is basically leveled with the increase of the automatic testing tool for a long time can be broken.
The following describes a test apparatus, an electronic device, a storage medium, and the like for executing the application control provided in the present application, and specific implementation processes and technical effects thereof are referred to above, and are not described again below.
The embodiment of the present application provides possible implementation examples of a testing apparatus for an application control, which is capable of executing the testing method for an application control provided in the foregoing embodiment. Fig. 9 is a schematic diagram of a testing apparatus for an application control according to an embodiment of the present application. As shown in fig. 9, the apparatus 100 for testing an application control includes: the device comprises an acquisition module 91, a comparison module 93, a processing module 95 and an updating module 97;
an obtaining module 91, configured to specifically obtain first overlay tree information and second overlay tree information, where the first overlay tree information represents application control path information generated through automatic testing; the second overlay tree information characterizes application control path information generated via at least one user operation;
a comparing module 93, specifically configured to compare the first coverage tree information with the second coverage tree information;
the processing module 95 is specifically configured to, when there is differential node data, search each differential node data of the first overlay tree information until downstream path information corresponding to all the differential node data is obtained; the application control path information comprises node data, and the difference node data is the node data of which the first coverage tree information is consistent with the second coverage tree information and the corresponding downstream paths have differences;
the updating module 97 is specifically configured to update the first overlay tree information according to all the downstream path information.
Optionally, the first coverage tree information and the second coverage tree information are generated by adopting a tree topology structure, and nodes in the tree topology structure are node data; the comparison module 93 is specifically configured to, when there is differential node data, search each differential node data of the first overlay tree information until downstream node data corresponding to all the differential node data and at least one node sequence information of the downstream node data are obtained; the difference node data is a node where the first coverage tree information is consistent with the second coverage tree information and corresponding downstream node data has difference;
the updating module 97 is specifically configured to update the first overlay tree information according to all the downstream node data and the node sequence information.
Optionally, the apparatus 100 for testing an application control further includes: a generation module;
a generating module, specifically configured to generate a first overlay tree model; acquiring node data and node sequence information in the application control path information according to the application control path information generated by automatic testing; and updating the first coverage tree model according to the node data and the node sequence information to generate a first coverage tree.
Optionally, the generating module is specifically configured to obtain application control information on the first application interface; and when the inactivated application control information exists in the first application interface, activating each inactivated application control information, and obtaining application control path information until obtaining the application control path information corresponding to all the application control information in the first application interface.
Optionally, the generating module is specifically configured to obtain the application control information on the second application interface if the application control information is activated and the second application interface is entered; when the inactivated application control information exists in the second application interface, activating each inactivated application control information, and obtaining application control path information until obtaining application control path information corresponding to all application control information in the second application interface; and returning to the first application interface, and activating the inactivated application control information in the first application interface.
Optionally, the generating module is specifically configured to process, in a preset format, application control path information generated by at least one user operation; acquiring nodes and node sequence information in the application control path information according to the application control path information generated by at least one user operation; and generating a second coverage tree according to the nodes and the node sequence information.
Optionally, the generating module is specifically configured to create a triple, where the triple includes control information, behavior information, and trigger event information; acquiring application control path information generated by at least one user operation; generating at least one triple according to the application control path information; according to repeated information in the triples, fusing the triples to obtain a triple operation list without repetition, wherein the repeated information comprises: repeated control information and/or trigger event information corresponding to the repeated control information; the triple operation list includes: a plurality of triples and an index order between the triples; and acquiring the path information of the application control based on the triple operation list.
The above-mentioned apparatus is used for executing the method provided by the foregoing embodiment, and the implementation principle and technical effect are similar, which are not described herein again.
These above modules may be one or more integrated circuits configured to implement the above methods, such as: one or more Application Specific Integrated Circuits (ASICs), or one or more microprocessors (DSPs), or one or more Field Programmable Gate Arrays (FPGAs), among others. For another example, when one of the above modules is implemented in the form of a Processing element scheduler code, the Processing element may be a general-purpose processor, such as a Central Processing Unit (CPU) or other processor capable of calling program code. For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).
Embodiments of the present application provide possible implementation examples of an electronic device, which can execute the method for testing an application control provided in the foregoing embodiments. Fig. 10 is a schematic diagram of an electronic device according to an embodiment of the present application, where the electronic device may be integrated in a terminal device or a chip of the terminal device, and the terminal may be a computing device with a data processing function.
The electronic device includes: the device comprises a processor 1001, a storage medium 1002 and a bus, wherein the storage medium stores program instructions executable by the processor, when the control device runs, the processor and the storage medium communicate through the bus, and the processor executes the program instructions to execute the steps of the test method of the application control. The specific implementation and technical effects are similar, and are not described herein again.
The embodiment of the present application provides a possible implementation example of a computer-readable storage medium, which is capable of executing the method for testing an application control provided in the above embodiment, where the storage medium stores a computer program, and the computer program is executed by a processor to execute the steps of the method for testing an application control.
A computer program stored in a storage medium may include instructions for causing a computer device (which may be a personal computer, a server, or a network device) or a processor (which may be a processor) to perform some steps of the methods according to the embodiments of the present invention. And the aforementioned storage medium includes: a U disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, a division of a unit is merely a logical division, and an actual implementation may have another division, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
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 units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
The integrated unit implemented in the form of a software functional unit may be stored in a computer readable storage medium. The software functional unit is stored in a storage medium and includes several instructions to enable a computer device (which may be a personal computer, a server, or a network device) or a processor (processor) to execute some steps of the methods according to the embodiments of the present invention. And the aforementioned storage medium includes: a U disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. A method for testing an application control, the method comprising:
obtaining first overlay tree information and second overlay tree information, the first overlay tree information characterizing application control path information generated via automatic testing; the second overlay tree information characterizes application control path information generated via at least one user operation;
comparing the first coverage tree information with the second coverage tree information;
when differential node data exists, searching each differential node data of the first overlay tree information until downstream path information corresponding to all the differential node data is obtained; the application control path information comprises node data, and the difference node data is the node data of which the first coverage tree information is consistent with the second coverage tree information and the corresponding downstream path has difference;
and updating the first coverage tree information according to all the downstream path information.
2. The method of claim 1, wherein the first overlay tree information and the second overlay tree information are generated using a tree topology; the step of comparing the first coverage tree information with the second coverage tree information comprises:
when differential node data exists, searching each differential node data of the first overlay tree information until downstream node data corresponding to all the differential nodes and at least one node sequence information of the downstream node data are obtained; the differential node data is a node where the first coverage tree information is consistent with the second coverage tree information and corresponding downstream node data is different;
and updating the first coverage tree information according to all the downstream node data and the node sequence information.
3. The method of claim 2, wherein the generating of the first overlay tree information comprises:
generating a first overlay tree model;
acquiring the node data and node sequence information in the application control path information according to the application control path information generated by the automatic test;
and updating the first coverage tree model according to the node data and the node sequence information to generate the first coverage tree.
4. The method of claim 3, wherein the automatically testing the method of generating the application control path information comprises:
obtaining application control information on a first application interface;
and when the inactivated application control information exists in the first application interface, activating each inactivated application control information, and obtaining the application control path information until obtaining the application control path information corresponding to all the application control information in the first application interface.
5. The method of claim 4, wherein the step of activating each of the inactive application control information and obtaining the application control path information comprises:
if the application control information is activated and enters a second application interface, acquiring the application control information on the second application interface;
when the inactivated application control information exists in the second application interface, activating each inactivated application control information, and obtaining the application control path information until obtaining the application control path information corresponding to all the application control information in the second application interface;
and returning to the first application interface, and activating the inactivated application control information in the first application interface.
6. The method of claim 2, wherein the method of generating the second overlay tree information comprises:
processing the application control path information generated by at least one user operation by adopting a preset format;
acquiring the nodes and the node sequence information in the application control path information according to the application control path information generated by at least one user operation;
and generating the second coverage tree according to the node data and the node sequence information.
7. The method of claim 6, wherein when processing the application control path information generated by at least one user operation in a preset format, the method further comprises:
creating a triple, wherein the triple comprises control information, behavior information and trigger event information;
acquiring the application control path information generated by the at least one user operation;
generating at least one triple according to the application control path information;
according to repeated information in the triples, fusing the triples to obtain a no-repeated triple operation list, wherein the repeated information comprises: the repeated control information and/or trigger event information corresponding to the repeated control information; the triple operation list includes: a plurality of triples and an index order between the triples;
and acquiring the path information of the application control based on the triple operation list.
8. The device for testing the application control is characterized by comprising an acquisition module, a comparison module, a processing module and an updating module;
the acquisition module is specifically used for acquiring first coverage tree information and second coverage tree information, wherein the first coverage tree information represents application control path information generated through automatic testing; the second overlay tree information characterizes application control path information generated via at least one user operation;
the comparison module is specifically configured to compare the first coverage tree information with the second coverage tree information;
the processing module is specifically configured to, when there is differential node data, search each differential node data of the first overlay tree information until downstream path information corresponding to all the differential node data is obtained; the application control path information comprises node data, and the difference node data is the node data of which the first coverage tree information is consistent with the second coverage tree information and the corresponding downstream path has difference;
the updating module is specifically configured to update the first overlay tree information according to all the downstream path information.
9. An electronic device, comprising: a processor, a storage medium and a bus, the storage medium storing program instructions executable by the processor, the processor and the storage medium communicating via the bus when the electronic device is running, the processor executing the program instructions to perform the steps of the method for testing an application control according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that the storage medium has stored thereon a computer program which, when being executed by a processor, carries out the steps of the method for testing an application control according to any one of claims 1 to 7.
CN202210000516.0A 2022-01-04 2022-01-04 Application control testing method and device, electronic equipment and storage medium Active CN114020648B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210000516.0A CN114020648B (en) 2022-01-04 2022-01-04 Application control testing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210000516.0A CN114020648B (en) 2022-01-04 2022-01-04 Application control testing method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114020648A true CN114020648A (en) 2022-02-08
CN114020648B CN114020648B (en) 2022-04-12

Family

ID=80069533

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210000516.0A Active CN114020648B (en) 2022-01-04 2022-01-04 Application control testing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114020648B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114490424A (en) * 2022-02-24 2022-05-13 北京启明星辰信息安全技术有限公司 Automatic testing method and device

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106649103A (en) * 2016-11-25 2017-05-10 深圳大学 Android application program automatically black box testing method and system
CN109618285A (en) * 2019-02-27 2019-04-12 广东工业大学 A kind of base station control method based on overlay tree, device and equipment
CN109656827A (en) * 2018-12-17 2019-04-19 北京云测信息技术有限公司 A kind of control tree generation method and terminal device
CN110413520A (en) * 2019-07-22 2019-11-05 深圳证券交易所 Method, server and the readable storage medium storing program for executing of control are obtained in page test
CN111258899A (en) * 2020-01-16 2020-06-09 北京奇艺世纪科技有限公司 Use case generation method and device, electronic equipment and computer readable storage medium
CN111934948A (en) * 2020-07-20 2020-11-13 浙江理工大学 EFSM executable test sequence generation method based on Monte Carlo tree search
CN112035337A (en) * 2020-05-29 2020-12-04 广州番禺职业技术学院 Software development capability and test capability analysis method and device
CN112612716A (en) * 2020-12-28 2021-04-06 上海品顺信息科技有限公司 Method, system, equipment and storage medium for enhancing marking of coverage rate of difference line codes
CN112905443A (en) * 2019-12-04 2021-06-04 阿里巴巴集团控股有限公司 Test case generation method, device and storage medium
CN113238931A (en) * 2021-04-26 2021-08-10 广东拓思软件科学园有限公司 Test coverage calculation method and device based on execution path tracking technology
CN113485909A (en) * 2021-06-01 2021-10-08 杭州网易云音乐科技有限公司 Test method, test device, computing device, and medium

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106649103A (en) * 2016-11-25 2017-05-10 深圳大学 Android application program automatically black box testing method and system
CN109656827A (en) * 2018-12-17 2019-04-19 北京云测信息技术有限公司 A kind of control tree generation method and terminal device
CN109618285A (en) * 2019-02-27 2019-04-12 广东工业大学 A kind of base station control method based on overlay tree, device and equipment
CN110413520A (en) * 2019-07-22 2019-11-05 深圳证券交易所 Method, server and the readable storage medium storing program for executing of control are obtained in page test
CN112905443A (en) * 2019-12-04 2021-06-04 阿里巴巴集团控股有限公司 Test case generation method, device and storage medium
CN111258899A (en) * 2020-01-16 2020-06-09 北京奇艺世纪科技有限公司 Use case generation method and device, electronic equipment and computer readable storage medium
CN112035337A (en) * 2020-05-29 2020-12-04 广州番禺职业技术学院 Software development capability and test capability analysis method and device
CN111934948A (en) * 2020-07-20 2020-11-13 浙江理工大学 EFSM executable test sequence generation method based on Monte Carlo tree search
CN112612716A (en) * 2020-12-28 2021-04-06 上海品顺信息科技有限公司 Method, system, equipment and storage medium for enhancing marking of coverage rate of difference line codes
CN113238931A (en) * 2021-04-26 2021-08-10 广东拓思软件科学园有限公司 Test coverage calculation method and device based on execution path tracking technology
CN113485909A (en) * 2021-06-01 2021-10-08 杭州网易云音乐科技有限公司 Test method, test device, computing device, and medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
徐悠然: "迭代式安卓应用自动化测试系统的设计与实现", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114490424A (en) * 2022-02-24 2022-05-13 北京启明星辰信息安全技术有限公司 Automatic testing method and device

Also Published As

Publication number Publication date
CN114020648B (en) 2022-04-12

Similar Documents

Publication Publication Date Title
Gross et al. Search-based system testing: high coverage, no false alarms
US8819642B2 (en) Method and system for generating and processing black box test cases
Islam et al. Bug replication in code clones: An empirical study
Xie et al. An empirical study of the fault-proneness of clone mutation and clone migration
Zhang et al. {APICraft}: Fuzz driver generation for closed-source {SDK} libraries
Siddiq et al. Exploring the effectiveness of large language models in generating unit tests
Roehm et al. Monitoring user interactions for supporting failure reproduction
Liu et al. Guided bug crush: Assist manual gui testing of android apps via hint moves
Alimadadi et al. Inferring hierarchical motifs from execution traces
CN114020648B (en) Application control testing method and device, electronic equipment and storage medium
Yandrapally et al. Fragment-based test generation for web apps
Gu et al. Logging practices in software engineering: A systematic mapping study
Aho et al. Automated extraction of GUI models for testing
Guo et al. Crowdsourced requirements generation for automatic testing via knowledge graph
Rahmani et al. An evaluation of code coverage adequacy in automatic testing using control flow graph visualization
Chambers et al. Utility and accuracy of smell-driven performance analysis for end-user programmers
Tahir et al. Maintainability dynamic metrics data collection based on aspect-oriented technology
Kruse Test oracles and test script generation in combinatorial testing
Koivisto et al. Evaluating CodeClusters for Effectively Providing Feedback on Code Submissions
Porfirio et al. A-learn evid: A method for identifying evidence of computer programming skills through automatic source code assessment
Lemos et al. Comparing identifiers and comments in engineered and non-engineered code: A large-scale empirical study
Guo et al. Decomposing composite changes for code review and regression test selection in evolving software
Nicolaescu et al. The ARAMIS Workbench for Monitoring, Analysis and Visualization of Architectures based on Run-time Interactions.
de Almeida Neves et al. Morpheus Web Testing: A Tool for Generating Test Cases for Widget Based Web Applications
Motogna et al. Formal concept analysis model for static code analysis

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
GR01 Patent grant
GR01 Patent grant