CN112597066B - Page testing method and device - Google Patents

Page testing method and device Download PDF

Info

Publication number
CN112597066B
CN112597066B CN202110236485.4A CN202110236485A CN112597066B CN 112597066 B CN112597066 B CN 112597066B CN 202110236485 A CN202110236485 A CN 202110236485A CN 112597066 B CN112597066 B CN 112597066B
Authority
CN
China
Prior art keywords
page
target page
elements
target
structure tree
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.)
Active
Application number
CN202110236485.4A
Other languages
Chinese (zh)
Other versions
CN112597066A (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.)
Rajax Network Technology Co Ltd
Zhejiang Koubei Network Technology Co Ltd
Original Assignee
Rajax Network Technology Co Ltd
Zhejiang Koubei Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Rajax Network Technology Co Ltd, Zhejiang Koubei Network Technology Co Ltd filed Critical Rajax Network Technology Co Ltd
Priority to CN202110236485.4A priority Critical patent/CN112597066B/en
Publication of CN112597066A publication Critical patent/CN112597066A/en
Application granted granted Critical
Publication of CN112597066B publication Critical patent/CN112597066B/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/3688Test management for test execution, e.g. scheduling of test suites

Abstract

The invention discloses a page testing method and device, and relates to the technical field of testing. The method comprises the following steps: receiving test configuration information of a target page, wherein the test configuration information comprises a page traversal mode switching threshold; determining a page traversal mode of a target page according to a page traversal mode switching threshold and the number of elements in the target page, and traversing the elements in the target page through the page traversal mode of the target page to generate an element structure tree of the target page; performing voice conversion operation on each element in the element structure tree of the target page to obtain a voice text of each element in the target page; and comparing the voice text of each element in the target page with the attribute value of each element in the element structure tree of the target page to obtain the test result of the target page. The method can reduce the waste of test resources, improve the test efficiency and ensure the stability of the link, thereby solving the experience problem of the visually impaired users in time.

Description

Page testing method and device
Technical Field
The invention relates to the technical field of testing, in particular to a page testing method and device.
Background
With the rapid development of the mobile internet, the complexity of page design of various application software begins to become higher and higher, so as to meet more requirements of users in such a manner, but meanwhile, the more and more complex page design also brings great inconvenience for visually impaired users to operate the application software. Currently, the visually impaired user generally reads page elements on the application software through the screen reading software, and then performs the following operations according to the heard contents. Although the operating system of the mobile terminal can provide the most basic barrier-free use experience for the user, the complex page design causes many problems that the barrier-free function is not supported, so that the experience of the visually impaired user is poor, and therefore, it is particularly important to perform some barrier-free design optimization for visually impaired people.
Meanwhile, testing the page after barrier-free optimization also becomes an important task, because the method for operating the application software is different between the visually impaired and the naked eye, the visually impaired opens the screen reading software first when operating the application software, and then operates each element in the page through barrier-free operation gestures, such as single-finger touch/two-finger dragging/single-point double-click and the like, however, for such an operation mode, the naked eye is not familiar when simulating the page operation of the visually impaired, and simultaneously cannot be in the use scene of the visually impaired to simulate the integrity of the verification function, especially under the normal state of barrier-free experience optimization, each page involves a large number of element controls, any change optimization not only needs to verify the new function, but also needs to test and return the old function, under such a condition, the manual verification is time-consuming and labor-consuming, and a user scene cannot be simulated rapidly and repeatedly, so that the stability of a link cannot be ensured, the traditional page testing method cannot be adapted to all page testing scenes effectively, and a single page testing method can also cause the waste of testing resources, so that the experience problem of a visually impaired user cannot be solved in time.
Disclosure of Invention
In view of this, the present application provides a page testing method and apparatus, and mainly aims to solve the technical problems that testing of a page after barrier-free optimization is time-consuming and labor-consuming, and cannot adapt to various page testing scenarios, which may result in waste of testing resources and failure in ensuring link stability.
According to a first aspect of the present invention, there is provided a page testing method, the method comprising:
receiving test configuration information of a target page, wherein the test configuration information comprises a page traversal mode switching threshold;
determining a page traversal mode of a target page according to a page traversal mode switching threshold and the number of elements in the target page, and traversing the elements in the target page through the page traversal mode of the target page to generate an element structure tree of the target page;
performing voice conversion operation on each element in the element structure tree of the target page to obtain a voice text of each element in the target page;
and comparing the voice text of each element in the target page with the attribute value of each element in the element structure tree of the target page to obtain the test result of the target page.
According to a second aspect of the present invention, there is provided a page testing apparatus, comprising:
the device comprises a configuration information receiving module, a configuration information processing module and a configuration information processing module, wherein the configuration information receiving module is used for receiving test configuration information of a target page, and the test configuration information comprises a page traversal mode switching threshold;
the page element traversing module is used for determining a page traversing mode of a target page according to the page traversing mode switching threshold and the number of elements in the target page, and traversing the elements in the target page through the page traversing mode of the target page to generate an element structure tree of the target page;
the element voice conversion module is used for executing voice conversion operation on each element in the element structure tree of the target page to obtain a voice text of each element in the target page;
and the test result generation module is used for comparing the voice text of each element in the target page with the attribute value of each element in the element structure tree of the target page to obtain the test result of the target page.
According to a third aspect of the present invention, there is provided a storage medium having stored thereon a computer program which, when executed by a processor, implements the page testing method described above.
According to a fourth aspect of the present invention, there is provided a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the page test method when executing the program.
The invention provides a page testing method and a device, which firstly receive testing configuration information, compare a page traversal mode switching threshold value in the testing configuration information with the number of elements in a target page to determine a page traversal mode of the target page, traverse the elements in the target page through the page traversal mode to generate an element structure tree of the target page, then execute voice conversion operation on each element in the element structure tree of the target page to obtain a voice text of each element in the target page, and finally compare the voice text of each element in the target page with the attribute value of each element in the element structure tree of the target page to obtain a testing result of the target page. According to the method, the page traversal mode is switched by setting the page traversal mode switching threshold, and the page traversal mode is switched by the page traversal mode switching threshold, so that the page designs with different element numbers and different types can be automatically adapted to the page traversal mode matched with the page traversal mode, the waste of test resources is reduced, and the test efficiency is improved. In addition, the method establishes the element structure tree, converts the attribute values of the elements in the element structure tree into the voice texts, and compares the voice texts of the elements with the attribute values of the corresponding elements, so that whether the barrier-free function of each element in the page reaches the expected level can be quickly verified, the efficiency of page testing is further improved, the stability of a link is also ensured, and the experience problem of visually impaired users is solved in time.
The foregoing description is only an overview of the technical solutions of the present application, and the present application can be implemented according to the content of the description in order to make the technical means of the present application more clearly understood, and the following detailed description of the present application is given in order to make the above and other objects, features, and advantages of the present application more clearly understandable.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
fig. 1 is a schematic flowchart illustrating a page testing method according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating another page testing method according to an embodiment of the present invention;
FIG. 3 is a flowchart illustrating a further page testing method according to an embodiment of the present invention;
FIG. 4 is a schematic structural diagram of a page testing apparatus according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram illustrating another page testing apparatus according to an embodiment of the present invention.
Detailed Description
The invention will be described in detail hereinafter with reference to the accompanying drawings in conjunction with embodiments. It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
As described in the background art, methods for operating application software by visually impaired people and eyesight impaired people are different, and when operating application software, visually impaired people may first open screen reading software, and then operate each element in a page through a barrier-free operation gesture, for example, visually impaired people may read an element attribute value through a one-finger touch operation, turn a page through a two-finger drag operation, and perform element selection or jump to a related page through a single-point double-click operation. Although the screen reading software can provide the most basic barrier-free use experience for the user, the complex page design causes many problems that the barrier-free function is not supported, for example, the screen reading software may read some elements as english, or the read information is not consistent with the actual information, or some elements in the page cannot be selected, and the problem that the barrier-free function is not supported brings inconvenience to the visually impaired user to operate the application software.
Furthermore, after the barrier-free function of the page is optimized, it also becomes an important task to test the page after the barrier-free function is optimized. Specifically, when the barrier-free function of the page is tested, barrier-free operation is often required to be performed on each element in the page one by one to trigger the screen reading software to read each element in the page, then whether the reading result is consistent with the actual meaning of the element or not is compared, and finally, a page test result is generated according to the comparison result. Although one-time barrier-free function optimization may be performed only on one picture control in the page, when the picture control is tested and verified, regression testing needs to be performed on other elements in the page to verify whether the picture control interferes with barrier-free functions of the other elements in the page. Under the circumstance, the testing method of triggering the elements one by the tester and comparing the reading results and the attribute values of the elements is obviously too time-consuming and labor-consuming, and the identification of the elements by the traditional element identification method can cause the problem of non-adaptation of the test scene, for example, the identification of the elements in a complex page by a simple element identification method can cause some elements in the page to be effectively identified, the identification of the elements in the simple page by a complex element identification method can cause more test resource waste, and the problems can cause the completeness of the page function and the test efficiency to be effectively verified, so that the purpose of page test cannot be achieved.
In view of the above problem, in an embodiment, as shown in fig. 1, a page testing method is provided, which is described by taking an example that the method is applied to a client such as a smart phone, a smart tablet, a smart portable device, and the like, and includes the following steps:
101. and receiving test configuration information of the target page, wherein the test configuration information comprises a page traversal mode switching threshold.
Specifically, before testing the target page, the client may first receive test configuration information issued by the server, and perform customized design on the page testing process through the test configuration information. The test configuration information may include a page traversal mode switching threshold. In this embodiment, the page traversal mode may be multiple, and the applicable page test scenario of each mode is different. For example, the page traversal mode may include a screen segmentation traversal mode, an element identification traversal mode, an image text traversal mode, and the like, where the screen segmentation traversal mode refers to a traversal mode in which a page is cut by a boundary coordinate value of an element to obtain the element, and the page traversal mode may be applicable to page design with fewer page elements and clearer element boundaries, and has the advantages of less resource occupation and high traversal efficiency; the element identification traversal mode refers to a traversal mode for acquiring elements through page image characteristics or page structure information, and the page traversal mode can be suitable for page design with fewer page elements, clear image characteristics or complete page structure, and has the advantages of less occupied resources and high traversal efficiency; the image text traversal mode refers to a traversal mode of acquiring elements through image control identification and text identification, and the page traversal mode can be suitable for page design with more page elements or more complex element design and has the advantage of high element identification accuracy. The tester can adjust the page traversal mode switching threshold according to the actual situation of the target page, so that the target page can adapt to the page traversal mode which accords with the characteristics of the target page to perform element traversal. In this embodiment, the test content is customized and set through the test configuration information, so that the page test accuracy and the test efficiency can be improved.
102. And determining the page traversal mode of the target page according to the page traversal mode switching threshold and the number of elements in the target page, and traversing the elements in the target page through the page traversal mode of the target page to generate an element structure tree of the target page.
Wherein, the target page refers to a page to be tested; the page traversal mode refers to a method for identifying attribute values and coordinate values of elements in a page; the element structure tree refers to a page element list of a tree structure composed of element attribute values and element coordinate values.
Specifically, the client may obtain the number of elements in the target page in an image control recognition manner, and then compare the number of elements in the target page with a configured page traversal mode switching threshold, so as to determine the page traversal mode of the target page according to the comparison result, for example, the determined page traversal mode may be one of a screen segmentation traversal mode, an element identification traversal mode, and an image text traversal mode, and finally, the client may traverse each element in the target page by using the determined page traversal mode, so as to generate an element structure tree of the target page. In this embodiment, although the mode of traversing the pattern recognition elements of various pages is different, the finally generated element structure tree includes the attribute values and coordinate values of the elements in the target page.
103. And executing voice conversion operation on each element in the element structure tree of the target page to obtain a voice text of each element in the target page.
The voice conversion operation refers to an operation of decoding and converting voice signals read aloud into voice texts, the operation of performing voice conversion on the elements refers to an operation of performing selection on the elements, triggering screen reading software to read attribute values of the elements, and then decoding and converting the read voice signals into the voice texts.
Specifically, the element structure tree of the target page comprises attribute values and coordinate values of elements, and according to the coordinate values of the elements in the element structure tree, the client can select the elements in the element structure tree in a screen reading mode to simulate a one-finger touch operation of a visually impaired person, so that the screen reading software is triggered to perform voice reading on the attribute values of the elements in the element structure tree in sequence, and the client can acquire the read voice signals through the voice signal acquirer and decode and output the acquired voice signals, so that the voice text of the elements in the target page is obtained.
104. And comparing the voice text of each element in the target page with the attribute value of each element in the element structure tree of the target page to obtain the test result of the target page.
The attribute value of the element refers to information which is read when screen reading software is triggered to carry out voice reading on the element, and the information comprises information such as the name, the type and the numerical value of the element. For example, the attribute value of an element may be "filter button", or "message tag", or "picture", or the like.
Specifically, the voice text after the voice conversion of each element in the target page should be consistent with the attribute value comparison of each corresponding element in the element structure tree of the target page, or consistent with the key information comparison. For example, after image control recognition and text recognition are performed on one element in the target page, it is obtained that the character information of the element is 'food takeout', the type of the image control is 'button', after information integration, the attribute value of the element is 'food takeout button', the coordinate value of the element is a coordinate value '(10, 10)' after character coordinate value and image control coordinate value are integrated, after voice conversion operation is performed on the coordinate value of the element, it is obtained that the voice text of the element is also 'food takeout button', then the element comparison is successful, and a piece of comparison information is generated. In this embodiment, the client may perform one-to-one comparison between the speech text of each element and the attribute values of each element in the element structure tree while decoding and outputting the speech text to obtain the information comparison result of each element, or may perform one-to-one comparison between the entire speech text of each element and the attribute values of all elements in the element structure tree after decoding and outputting all the speech texts to obtain the information comparison result of each element, and the client may further integrate the two comparison results, i.e., integrate the result of the real-time comparison and the result of the offline comparison to obtain the information comparison result of each element, and finally, the client may retain and store the information that is consistent in comparison, and label the information that is inconsistent in comparison or the information that is missing in comparison, so as to obtain the final test result of the target page, and in addition, the test result of the target page can also comprise information such as an element structure tree of the target page, a voice text and a comparison passing rate of each element in the target page and the like.
The page testing method provided by this embodiment includes first receiving test configuration information, comparing a page traversal mode switching threshold in the test configuration information with the number of elements in a target page to determine a page traversal mode of the target page, traversing the elements in the target page through the page traversal mode to generate an element structure tree of the target page, then performing a voice conversion operation on each element in the element structure tree of the target page to obtain a voice text of each element in the target page, and finally comparing the voice text of each element in the target page with an attribute value of each element in the element structure tree of the target page to obtain a test result of the target page. According to the method, the page traversal mode is switched by setting the page traversal mode switching threshold, and the page traversal mode is switched by the page traversal mode switching threshold, so that the page designs with different element numbers and different types can be automatically adapted to the page traversal mode matched with the page traversal mode, the waste of test resources is reduced, and the test efficiency is improved. In addition, the method establishes the element structure tree, converts the attribute values of the elements in the element structure tree into the voice texts, and compares the voice texts of the elements with the attribute values of the corresponding elements, so that whether the barrier-free function of each element in the page reaches the expected level can be quickly verified, the efficiency of page testing is further improved, the stability of a link is also ensured, and the experience problem of visually impaired users is solved in time.
Further, as a refinement and an extension of the specific implementation of the above embodiment, in order to fully illustrate the implementation process of the embodiment, a page testing method is provided, as shown in fig. 2, the method includes the following steps:
201. receiving test configuration information of a target page, wherein the test configuration information comprises a page traversal mode switching threshold, page links, page traversal time, element operation times and target test content.
Specifically, before testing the target page, the client may first receive test configuration information issued by the server, and perform customized design on the page testing process through the test configuration information. The test configuration information may include one or more items of information of a page traversal mode switching threshold, a page link, a page traversal time, an element operation number, and target test content. In this embodiment, the page traversal mode may be multiple, and the applicable page test scenario of each mode is different. For example, the page traversal pattern may include a screen segmentation traversal pattern, an element identification traversal pattern, an image text traversal pattern, and the like, where the screen segmentation traversal pattern may be applicable to a page design with fewer page elements and a clearer element boundary, and has the advantages of less resource occupation and high traversal efficiency; the element identification traversal mode can be suitable for page design with fewer page elements and clear image features or complete page structure, and has the advantages of less occupied resources and high traversal efficiency; the image text traversal mode is suitable for page design with more page elements or more complex element design, and has the advantage of high element identification accuracy. The tester can adjust the page traversal mode switching threshold according to the actual situation of the target page, so that the target page can adapt to the page traversal mode which accords with the characteristics of the target page to perform element traversal.
Furthermore, the tester can further improve the accuracy, comprehensiveness and testing efficiency of the page testing by configuring page links, page traversal time, element operation times and target testing content. For example, through page linking, a client can directly jump to a target page for development testing, so that the link jump operation is reduced, and the page testing efficiency is improved; through the page traversal time, the client can perform cyclic traversal on the target page within the specified time, so that all elements in the target page can be obtained completely, and element omission is avoided; through the element operation times, the client can repeatedly operate each element in the target page, so that all the elements in the target page are ensured to be completely executed; through the target test content, the client can quickly verify the specified content and obtain a verification result.
In the embodiment, the test configuration information of the target page is issued by using the server, so that the test efficiency and the test integrity can be improved, the test effect can be improved, and the test method can be applied to various types of page test scenes.
202. And determining the page traversal mode of the target page according to the page traversal mode switching threshold and the number of elements in the target page, and traversing the elements in the target page through the page traversal mode of the target page to generate an element structure tree of the target page.
Wherein, the target page refers to a page to be tested; the page traversal mode refers to a method for identifying attribute values and coordinate values of elements in a page; the element structure tree refers to a page element list of a tree structure composed of element attribute values and element coordinate values.
Specifically, the client may obtain the number of elements in the target page in an image control recognition manner, and then compare the number of elements in the target page with a configured page traversal mode switching threshold, so as to determine the page traversal mode of the target page according to the comparison result, for example, the determined page traversal mode may be one of a screen segmentation traversal mode, an element identification traversal mode, and an image text traversal mode, and finally, the client may traverse each element in the target page by using the determined page traversal mode, so as to generate an element structure tree of the target page. In this embodiment, although the mode of traversing the pattern recognition elements of various pages is different, the finally generated element structure tree includes the attribute values and coordinate values of the elements in the target page.
In an optional embodiment, if the test configuration information includes a page link, step 202 may specifically be: and jumping to a target page according to the page link, calling an image control library, identifying the image controls in the target page to obtain the number of the image controls in the target page, and finally comparing the number of the image controls in the target page with a page traversal mode switching threshold value of the target page to obtain a page traversal mode of the target page. In the embodiment, the client can directly jump to the target page through the page link of the target page, so that the jump logic before the target page is omitted. For example, when performing page optimization, a page developer only modifies one page of the "shop detail page", so that the client can directly jump to the "shop detail page" for testing through page links in the test configuration information, and does not need to jump to the "shop detail page" through a home page search. By the mode, the page testing efficiency can be improved, and the target page can not be effectively tested and verified when the jump logic in front of the target page is in a problem.
In an optional embodiment, if the test configuration information includes a page traversal time, step 202 may specifically be: and before the page traversal time is over, circularly traversing the elements in the target page through a set page traversal mode of the target page to generate an element structure tree of the target page. In the embodiment, after the first element traversal is finished, the target page can be subjected to second traversal, third traversal and the like until the configured page traversal time is finished.
In an alternative embodiment, the page traversal mode switching threshold includes a first threshold and a second threshold, and the page traversal mode includes a screen segmentation traversal mode, an element identification traversal mode, and an image text traversal mode. Then, the method for determining the page traversal pattern of the target page in step 203 may include the following steps: if the number of elements in the target page is less than or equal to a first threshold value, determining that the page traversal mode of the target page is a screen segmentation traversal mode; if the number of elements in the target page is larger than a first threshold and smaller than a second threshold, determining that the page traversal mode of the target page is an element identification traversal mode; and if the number of the elements in the target page is larger than or equal to the second threshold, determining that the page traversal mode of the target page is the image text traversal mode.
In this embodiment, both the first threshold and the second threshold of the page traversal mode switching threshold may be configured at the server, so that before testing, a tester may configure the first threshold and the second threshold according to the number of elements of the test page, the page design complexity, and the page design characteristics, thereby enabling the test page to adapt to the page traversal mode most suitable for its own characteristics. For example, for a page with definite page module division, the first threshold and the second threshold may be set relatively higher, so as to save testing resources of the client; for a page with complex page design and easy recognition error, the first threshold and the second threshold can be set relatively lower to improve the accuracy of element recognition.
In an alternative embodiment, when the page traversal mode of the target page is the screen division traversal mode, the method for generating the element structure tree of the target page may include the following steps: firstly, according to the page size of a target page, traversing the boundary coordinate values of all elements in the target page according to a preset coordinate sequence, carrying out block segmentation on the target page according to the boundary coordinate values of all elements, then calculating the central coordinate values of all blocks in the target page according to the coordinate values of the elements corresponding to all blocks in the target page, finally reading the attribute values of the elements corresponding to all blocks in the target page, and generating an element structure tree of the target page according to the attribute values of the elements corresponding to all blocks in the target page and the central coordinate values of all blocks. The element identification method is suitable for the condition that the number of page elements is small and the element boundaries are clear, and the elements in the page are traversed through a screen segmentation traversal mode, so that the resource consumption can be reduced, and the test efficiency can be improved.
In an optional embodiment, when the page traversal pattern of the target page identifies a traversal pattern for an element, the method for generating the element structure tree of the target page may include the following steps: firstly, extracting information from image features in a target page and/or page structure information in the target page to obtain identification information of each element in the target page and coordinate values of each element, then reading an attribute value of each element in the target page according to the identification information of each element in the target page, and finally generating an element structure tree of the target page according to the attribute value of each element in the target page and the coordinate values of each element in the target page. The element identification method is suitable for the conditions that page elements are few, image features are clear or a page structure is complete, the elements in the page are traversed through the element identification traversal mode, resource consumption can be reduced, and testing efficiency is improved.
In an alternative embodiment, when the page traversal pattern of the target page is the image text traversal pattern, the method for generating the element structure tree of the target page may include the following steps: firstly, calling an image control library, identifying image controls in a target page to obtain the type and coordinate values of each image control in the target page, then carrying out text identification on the target page to obtain a character list of the target page and the central coordinate values of each segment of characters, and finally generating an element structure tree of the target page according to the type and coordinate values of each image control in the target page, the character list of the target page and the central coordinate values of each segment of characters.
In this embodiment, the image control library refers to a set of image controls, in which all designed image controls, including icons and pictures of various types, are stored, and by uploading the screenshot image of the target page to the image control library, the page image can be compared with each image control in the image control library, so that each image control in the page image and the type of each image control are identified, and by positioning each image control, the coordinate value of each image control can be obtained.
Further, the text recognition may specifically be an OCR text recognition technology, and by the text recognition technology, all the characters in the target page may be recognized, and by positioning the coordinate positions where the characters are located and analyzing the character contents, the character information and the central coordinate values of each segment of characters may be obtained. Finally, the coordinate value of each image control is compared with the central coordinate value of each segment of characters, the corresponding relation between the image control and each segment of characters can be found, so that the coordinate value of each element is determined, the attribute value of each element can be obtained according to the character information of each segment of characters in the character list and the type of the image control, and the element structure tree of the target page can be constructed according to the coordinate value of each element and the attribute value of each element.
The element identification method in the embodiment does not need to depend on element control types and page writing specifications, is suitable for the condition that page elements are more or page design is more complex, and can effectively reduce the problem of element identification deviation caused by different screen sizes of the test terminal and the problem of element identification errors caused by unobvious page image characteristics, thereby effectively improving the accuracy of element identification.
203. And executing voice conversion operation on each element in the element structure tree of the target page to obtain a voice text of each element in the target page.
The voice conversion operation refers to an operation of decoding and converting voice signals read aloud into voice texts, the operation of performing voice conversion on the elements refers to an operation of performing selection on the elements, triggering screen reading software to read attribute values of the elements, and then decoding and converting the read voice signals into the voice texts.
Specifically, the element structure tree of the target page comprises attribute values and coordinate values of elements, and according to the coordinate values of the elements in the element structure tree, the client can select the elements in the element structure tree in a screen reading mode to simulate a one-finger touch operation of a visually impaired person, so that the screen reading software is triggered to perform voice reading on the attribute values of the elements in the element structure tree in sequence, and the client can acquire the read voice signals through the voice signal acquirer and decode and output the acquired voice signals, so that the voice text of the elements in the target page is obtained.
In an optional embodiment, if the test configuration information includes the number of element operations, step 203 may specifically be: and executing the voice conversion operation with the corresponding times of the element operation times on each element in the element structure tree of the target page to obtain the voice text of each element in the target page. For example, the number of element operations in the test configuration information is 3, and then the number of element operations performed on each element in the element structure tree of the target page is also 3. By the method, each element of the target page can be operated for multiple times, so that the integrity of operation is ensured, and the elements are prevented from being omitted.
In an alternative embodiment, the specific implementation flow of step 203 may include the following steps: the method comprises the steps of firstly, carrying out clicking operation on each element in an element structure tree of a target page to obtain a voice signal of each element in the target page, then carrying out feature extraction on the voice signal of each element in the target page through a voice signal collector, inputting the extracted features into an acoustic model to obtain a voice signal coding value of each element, and finally decoding the voice signal coding value of each element through a voice model and a pronunciation dictionary to obtain a voice text of each element in the target page.
In the embodiment, the voice signal is obtained by performing the automatic click operation on each element in the element structure tree, and the voice signal is converted into the voice text, so that the element operation speed can be increased, and the test efficiency can be improved.
204. And comparing the voice text of each element in the target page with the attribute value of each element in the element structure tree of the target page to obtain the test result of the target page.
The attribute value of the element refers to information which is read when screen reading software is triggered to carry out voice reading on the element, and the information comprises information such as the name, the type and the numerical value of the element. For example, the attribute value of an element may be "filter button", or "message tag", or "picture", or the like.
Specifically, the voice text after the voice conversion of each element in the target page should be consistent with the attribute value comparison of each corresponding element in the element structure tree of the target page, or consistent with the key information comparison. For example, after image control recognition and text recognition are performed on one element in the target page, it is obtained that the character information of the element is 'food takeout', the type of the image control is 'button', after information integration, the attribute value of the element is 'food takeout button', the coordinate value of the element is a coordinate value '(10, 10)' after character coordinate value and image control coordinate value are integrated, after voice conversion operation is performed on the coordinate value of the element, it is obtained that the voice text of the element is also 'food takeout button', then the element comparison is successful, and a piece of comparison information is generated.
In this embodiment, the client may perform one-to-one comparison between the speech text of each element and the attribute values of each element in the element structure tree while decoding and outputting the speech text to obtain the information comparison result of each element, or may perform one-to-one comparison between the entire speech text of each element and the attribute values of all elements in the element structure tree after decoding and outputting all the speech texts to obtain the information comparison result of each element, and the client may further integrate the two comparison results, i.e., integrate the result of the real-time comparison and the result of the offline comparison to obtain the information comparison result of each element, and finally, the client may retain and store the information that is consistent in comparison, and label the information that is inconsistent in comparison or the information that is missing in comparison, so as to obtain the final test result of the target page, and in addition, the test result of the target page can also comprise information such as an element structure tree of the target page, a voice text and a comparison passing rate of each element in the target page and the like.
In an optional embodiment, if the test configuration information includes target test content, step 204 may specifically be: and comparing the voice text of each element corresponding to the target test content in the target page with the attribute value of each element corresponding to the element structure tree of the target page to obtain the test result of the target page. In the embodiment, by pre-configuring the target test content in the target page, the elements corresponding to the target test content can be quickly verified, the verification result is obtained, and the page test efficiency is improved.
In an alternative embodiment, the specific implementation flow of step 204 may include the following steps: firstly, comparing the voice text of each element in a target page converted in real time with the attribute value of each corresponding element in an element structure tree of the target page one by one to obtain a real-time first comparison result, then integrating the voice text of each element in the target page to obtain the voice text of the target page, integrally comparing the voice text of the target page with the attribute values of all elements in the element structure tree of the target page to obtain an offline second comparison result, and finally integrating the real-time first comparison result and the offline second comparison result to obtain a test result of the target page. In the embodiment, by combining the real-time information comparison result with the offline information comparison result, the comparison results can be verified and complemented mutually, and the integrity of data comparison is ensured.
In the above embodiment, the method for performing real-time alignment may include the following steps: the method comprises the steps of comparing the voice texts of all elements in a target page with the attribute values of corresponding elements in an element structure tree of the target page one by one, generating comparison success information of the elements for the elements with the same comparison value, reading the attribute values of the elements for the elements with different comparison values, converting the elements into voice texts, comparing the attribute values of the elements with the voice texts of the elements again, generating comparison success information of the elements for the elements with the same comparison value after the comparison again, generating comparison failure information of the elements for the elements with different comparison values after the comparison again, and generating a first comparison result according to the comparison success information of the elements and the comparison failure information of the elements. It is to be understood that the method for off-line comparison may also refer to the present embodiment, and will not be described herein again. According to the embodiment, the information which fails in comparison is verified again, so that the comparison error caused by element identification error or decoding error can be avoided, and the test accuracy is improved.
In the above embodiment, the method for integrating the first alignment result and the second alignment result may comprise the following steps: and reserving the same comparison information in the first comparison result and the second comparison result, and labeling the different comparison information and the missing comparison information in the first comparison result and the second comparison result so as to obtain the test result of the target page. In addition, the test result of the target page may further include information such as an element structure tree of the target page, a voice text and a comparison passing rate of each element in the target page. In the embodiment, the information with the same comparison is reserved, and the information with different or missing comparison is marked, so that the testing personnel can quickly know the process information and the result information of information comparison, and the accuracy of the test result is improved.
205. And when the element structure tree of the target page contains the page jump element, executing operation on the page jump element, and jumping to the associated page corresponding to the page jump element.
206. And carrying out image control identification and text identification on the associated page, and generating an element structure tree of the associated page according to the identification result.
207. And executing voice conversion operation on each element in the element structure tree of the associated page to obtain a voice text of each element in the associated page.
208. And comparing the voice text of each element in the associated page with the attribute value of each element in the element structure tree of the associated page to obtain the test result of the associated page.
The page jump element refers to an element capable of jumping to other pages, and other related pages of the target page can be jumped to, for example, an upper page or a lower page of the target page by executing a single-point double-click operation on the page jump element, so that a new page is entered.
Specifically, if the element structure tree of the target page includes a page jump element, a single-point double-click operation may be performed on the page jump element, and the page jump may be performed to an associated page corresponding to the page jump element, where the associated page may be an upper page or a lower page of the target page. And finally, comparing the voice text of each element in the associated page with the attribute value of each element in the element structure tree of the associated page to obtain a test result of the associated page. In this embodiment, the description of each embodiment in steps 202 to 204 may be referred to for a manner of performing element recognition, voice conversion, and comparison test on the associated page, and this embodiment is not described herein again.
The page testing method provided by this embodiment can improve the testing efficiency and testing integrity of the target page by receiving the testing configuration information of the target page, and is helpful for improving the testing effect, so that the testing method can be applied to various types of page testing scenarios, and the method can automatically adapt the page traversal mode suitable for the current testing scenario by comparing the number of elements in the page with the page traversal mode switching threshold, and can identify the elements in the target page and the associated page through the automatically adapted page convenience mode, so as to improve the comprehensiveness of the page testing, reduce the resource consumption of the client, improve the accuracy of element identification, and avoid the elements from being missed during identification, and in addition, the method can convert the attribute values of the elements in the element structure tree into the voice text by establishing the element structure tree, and the voice text of each element is compared with the attribute value of the corresponding element, so that the efficiency of page testing can be improved, the stability of a link is ensured, and the experience problem of a visually impaired user is solved in time.
Further, as a refinement and an extension of the above embodiments, in order to fully describe the implementation process of the present embodiment, the present embodiment describes the page testing method proposed by the above embodiments by an example. As shown in fig. 3, the implementation flow of the page testing method in this example is as follows: a tester configures test configuration information at a server according to a test scene, such as a page traversal mode switching threshold, a page link, page traversal time, element operation times and target test content, then issues the test configuration information to a client through the server, the client opens application software to be tested, jumps to a target page through the configured page link, identifies and acquires the number of elements in the target page through an image control, compares the number of elements with the page traversal mode switching threshold, obtains a page traversal mode according to a comparison result, such as one of a screen segmentation traversal mode, an element identification traversal mode and an image text traversal mode, traverses the elements in the target page through the page traversal mode to obtain an element structure tree of the target page, and selects each element in the element structure tree by using screen reading software, and reading the information of each element, collecting and converting the read voice signal by using a voice signal collector, outputting a voice text, comparing the voice text with the attribute values of each element in the element structure tree, storing the comparison result, generating a test report of a target page after all the elements are traversed, and completing the page test. It should be understood that the steps of the page test are only used to illustrate the whole process of the page test, and are not a limitation on the implementation method of each step.
Further, as a specific implementation of the method shown in fig. 1 to fig. 3, the present embodiment provides a page testing apparatus, as shown in fig. 4, the apparatus includes: a configuration information receiving module 31, a page element traversing module 32, an element voice converting module 33, and a test result generating module 34.
A configuration information receiving module 31, configured to receive test configuration information of a target page, where the test configuration information includes a page traversal mode switching threshold;
the page element traversing module 32 is configured to determine a page traversal pattern of the target page according to the page traversal pattern switching threshold and the number of elements in the target page, traverse the elements in the target page through the page traversal pattern of the target page, and generate an element structure tree of the target page;
the element voice conversion module 33 is configured to perform a voice conversion operation on each element in the element structure tree of the target page to obtain a voice text of each element in the target page;
the test result generating module 34 may be configured to compare the voice text of each element in the target page with the attribute value of each element in the element structure tree of the target page, so as to obtain a test result of the target page.
In a specific application scenario, the test configuration information further includes a page link; the page element traversal module 32 may be further configured to jump to a target page according to the page link; calling an image control library, and identifying the image controls in the target page to obtain the number of the image controls in the target page; and comparing the number of the image controls in the target page with a page traversal mode switching threshold value of the target page to obtain a page traversal mode of the target page.
In a specific application scenario, the test configuration information further includes page traversal time; the page element traversal module 32 may be further configured to perform a cyclic traversal on the elements in the target page through the page traversal mode of the target page before the page traversal time is over, so as to generate an element structure tree of the target page.
In a specific application scenario, the page traversal mode switching threshold comprises a first threshold and a second threshold, and the page traversal mode comprises a screen segmentation traversal mode, an element identification traversal mode and an image text traversal mode; the page element traversal module 32 is specifically configured to determine that the page traversal mode of the target page is the screen segmentation traversal mode if the number of elements in the target page is less than or equal to a first threshold; if the number of elements in the target page is larger than a first threshold and smaller than a second threshold, determining that the page traversal mode of the target page is an element identification traversal mode; and if the number of the elements in the target page is larger than or equal to the second threshold, determining that the page traversal mode of the target page is the image text traversal mode.
In a specific application scenario, when the page traversal mode of the target page is the screen segmentation traversal mode, the page element traversal module 32 is specifically configured to traverse the boundary coordinate values of the elements in the target page according to the page size of the target page and according to a predetermined coordinate sequence, and perform block segmentation on the target page according to the boundary coordinate values of the elements; calculating the central coordinate value of each block in the target page according to the coordinate value of the element corresponding to each block in the target page; and reading the attribute value of the element corresponding to each block in the target page, and generating an element structure tree of the target page according to the attribute value of the element corresponding to each block in the target page and the central coordinate value of each block.
In a specific application scenario, when the page traversal mode of the target page is the element identification traversal mode, the page element traversal module 32 may be specifically configured to perform information extraction on image features in the target page and/or page structure information in the target page, so as to obtain identification information of each element in the target page and a coordinate value of each element; reading the attribute values of the elements in the target page according to the identification information of the elements in the target page; and generating an element structure tree of the target page according to the attribute value of each element in the target page and the coordinate value of each element in the target page.
In a specific application scenario, when the page traversal mode of the target page is the image text traversal mode, the page element traversal module 32 may be specifically configured to invoke an image control library, identify an image control in the target page, and obtain coordinate values of each image control in the target page; performing text recognition on the target page to obtain a character list of the target page and a central coordinate value of each segment of characters; and generating an element structure tree of the target page according to the coordinate values of the image controls in the target page, the character list of the target page and the central coordinate values of the characters.
In a specific application scenario, the test configuration information further includes element operation times; the element voice conversion module 33 is further configured to determine, according to the number of element operations, a predetermined number of times for performing voice conversion on each element in the element structure tree of the target page; and executing voice conversion operation for preset times on each element in the element structure tree of the target page to obtain a voice text of each element in the target page.
In a specific application scenario, the element voice conversion module 33 may be specifically configured to perform a click operation on each element in an element structure tree of a target page to obtain a voice signal of each element in the target page; extracting the characteristics of the voice signals of all elements in the target page through a voice signal collector, and inputting the extracted characteristics into an acoustic model to obtain the voice signal coding values of all elements; and decoding the voice signal coding value of each element through the voice model and the pronunciation dictionary to obtain the voice text of each element in the target page.
In a specific application scenario, the test configuration information further includes target test content; the test result generating module 34 may further be configured to compare the voice text of each element in the target page corresponding to the target test content with the attribute value of each element in the element structure tree of the target page, so as to obtain the test result of the target page.
In a specific application scenario, the test result generating module 34 is specifically configured to compare the speech text of each element in the target page with the attribute values of each corresponding element in the element structure tree of the target page one by one, so as to obtain a first comparison result; integrating the voice texts of all elements in the target page to obtain the voice text of the target page, and integrally comparing the voice text of the target page with the attribute values of all elements in the element structure tree of the target page to obtain a second comparison result; and integrating the first comparison result and the second comparison result to obtain a test result of the target page.
In a specific application scenario, the test result generating module 34 is specifically configured to compare the voice texts of the elements in the target page with the attribute values of the corresponding elements in the element structure tree of the target page one by one; generating comparison success information of the elements aiming at the elements with the same comparison value, reading attribute values of the elements aiming at the elements with different comparison values, converting the elements into voice texts, and comparing the attribute values of the elements with the voice texts of the elements again; generating comparison success information of the elements aiming at the elements with the same comparison values after the secondary comparison, and generating comparison failure information of the elements aiming at the elements with different comparison values after the secondary comparison; and generating a first comparison result according to the comparison success information of the elements and the comparison failure information of the elements.
In a specific application scenario, the test result generating module 34 may be specifically configured to reserve the same comparison information in the first comparison result and the second comparison result, and label the different comparison information and the missing comparison information in the first comparison result and the second comparison result to obtain the test result of the target page.
In a specific application scenario, as shown in fig. 5, the apparatus further includes a page jump module 35, where the page jump module 35 is specifically configured to, when an element structure tree of a target page includes a page jump element, perform an operation on the page jump element, and jump to an associated page corresponding to the page jump element; the page element traversing module 32 may be further configured to determine a page traversing mode of the associated page according to the page traversing mode switching threshold and the number of elements in the associated page, traverse the elements in the associated page through the page traversing mode of the associated page, and generate an element structure tree of the associated page; the element voice conversion module 33 may be further configured to perform a voice conversion operation on each element in the element structure tree of the associated page to obtain a voice text of each element in the associated page; the test result generating module 34 may be further configured to compare the voice text of each element in the associated page with the attribute value of each element in the element structure tree of the associated page, so as to obtain a test result of the associated page.
It should be noted that other corresponding descriptions of the functional units related to the page testing apparatus provided in this embodiment may refer to the corresponding descriptions in fig. 1 to fig. 3, and are not repeated herein.
Based on the method shown in fig. 1 to 3, correspondingly, the present embodiment further provides a storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements the page testing method shown in fig. 1 to 3.
Based on such understanding, the technical solution of the present application may be embodied in the form of a software product, and the software product to be identified may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, or the like), and include several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute the method according to the implementation scenarios of the present application.
Based on the method shown in fig. 1 to fig. 3 and the embodiments of the page testing apparatus shown in fig. 4 and fig. 5, in order to achieve the above object, the present embodiment further provides an entity device for page testing, which may specifically be a personal computer, a server, a smart phone, a tablet computer, a smart watch, or other network devices, and the entity device includes a storage medium and a processor; a storage medium for storing a computer program; a processor for executing a computer program for implementing the above-described method as shown in fig. 1 to 3.
Optionally, the entity device may further include a user interface, a network interface, a camera, a Radio Frequency (RF) circuit, a sensor, an audio circuit, a WI-FI module, and the like. The user interface may include a Display screen (Display), an input unit such as a keypad (Keyboard), etc., and the optional user interface may also include a USB interface, a card reader interface, etc. The network interface may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface), etc.
Those skilled in the art will appreciate that the physical device structure for page testing provided in the present embodiment does not constitute a limitation to the physical device, and may include more or fewer components, or combine some components, or arrange different components.
The storage medium may further include an operating system and a network communication module. The operating system is a program for managing the hardware of the above-mentioned entity device and the software resources to be identified, and supports the operation of the information processing program and other software and/or programs to be identified. The network communication module is used for realizing communication among components in the storage medium and communication with other hardware and software in the information processing entity device.
Through the above description of the embodiments, those skilled in the art will clearly understand that the present application can be implemented by software plus a necessary general hardware platform, and can also be implemented by hardware. By applying the technical scheme of the application, compared with the prior art, the method has the advantages that the page traversal mode is switched by setting the page traversal mode switching threshold value and switching the page traversal mode through the page traversal mode switching threshold value, so that page designs with different element numbers and different types can be automatically adapted to the page traversal mode matched with the page traversal mode, the waste of test resources is reduced, and the test efficiency is improved. In addition, the method establishes the element structure tree, converts the attribute values of the elements in the element structure tree into the voice texts, and compares the voice texts of the elements with the attribute values of the corresponding elements, so that whether the barrier-free function of each element in the page reaches the expected level can be quickly verified, the efficiency of page testing is further improved, the stability of a link is also ensured, and the experience problem of visually impaired users is solved in time.
Those skilled in the art will appreciate that the figures are merely schematic representations of one preferred implementation scenario and that the blocks or flow diagrams in the figures are not necessarily required to practice the present application. Those skilled in the art will appreciate that the modules in the devices in the implementation scenario may be distributed in the devices in the implementation scenario according to the description of the implementation scenario, or may be located in one or more devices different from the present implementation scenario with corresponding changes. The modules of the implementation scenario may be combined into one module, or may be further split into a plurality of sub-modules.
The above application serial numbers are for description purposes only and do not represent the superiority or inferiority of the implementation scenarios. The above disclosure is only a few specific implementation scenarios of the present application, but the present application is not limited thereto, and any variations that can be made by those skilled in the art are intended to fall within the scope of the present application.

Claims (10)

1. A page testing method is characterized by comprising the following steps:
receiving test configuration information of a target page, wherein the test configuration information comprises a page traversal mode switching threshold;
determining a page traversal mode of a target page according to the page traversal mode switching threshold and the number of elements in the target page, and traversing the elements in the target page through the page traversal mode of the target page to generate an element structure tree of the target page, wherein the page traversal mode comprises a screen segmentation traversal mode, an element identification traversal mode and an image text traversal mode;
performing voice conversion operation on each element in the element structure tree of the target page to obtain a voice text of each element in the target page;
and comparing the voice text of each element in the target page with the attribute value of each element in the element structure tree of the target page to obtain a test result of the target page.
2. The method of claim 1, wherein the test configuration information further includes page links, page traversal time, number of element operations, and target test content;
the determining the page traversal pattern of the target page according to the page traversal pattern switching threshold and the number of elements in the target page includes:
skipping to the target page according to the page link;
calling an image control library, and identifying the image controls in the target page to obtain the number of the image controls in the target page;
comparing the number of the image controls in the target page with a page traversal mode switching threshold of the target page to obtain a page traversal mode of the target page;
the traversing the elements in the target page through the page traversing mode of the target page to generate the element structure tree of the target page includes:
before the page traversal time is over, circularly traversing the elements in the target page through the page traversal mode of the target page to generate an element structure tree of the target page;
the performing a voice conversion operation on each element in the element structure tree of the target page to obtain a voice text of each element in the target page includes:
executing the voice conversion operation with the corresponding times of the element operation times on each element in the element structure tree of the target page to obtain the voice text of each element in the target page;
the comparing the voice text of each element in the target page with the attribute value of each element in the element structure tree of the target page to obtain the test result of the target page includes:
and comparing the voice text of each element corresponding to the target test content in the target page with the attribute value of each element corresponding to the element structure tree of the target page to obtain a test result of the target page.
3. The method according to claim 1 or 2, wherein the page traversal mode switching threshold comprises a first threshold and a second threshold, and the page traversal mode comprises a screen segmentation traversal mode, an element identification traversal mode, and an image text traversal mode;
the determining the page traversal pattern of the target page according to the page traversal pattern switching threshold and the number of elements in the target page specifically includes:
if the number of elements in the target page is less than or equal to the first threshold, determining that the page traversal mode of the target page is the screen segmentation traversal mode;
if the number of elements in the target page is greater than the first threshold and less than the second threshold, determining that the page traversal mode of the target page is the element identification traversal mode;
and if the number of the elements in the target page is greater than or equal to the second threshold, determining that the page traversal mode of the target page is the image text traversal mode.
4. The method according to claim 3, wherein if the page traversal pattern of the target page is the screen splitting traversal pattern, the traversing the elements in the target page through the page traversal pattern of the target page to generate the element structure tree of the target page specifically includes:
traversing boundary coordinate values of elements in the target page according to a preset coordinate sequence according to the page size of the target page, and carrying out block segmentation on the target page according to the boundary coordinate values of the elements;
calculating the central coordinate value of each block in the target page according to the coordinate value of the element corresponding to each block in the target page;
reading the attribute value of the element corresponding to each block in the target page, and generating an element structure tree of the target page according to the attribute value of the element corresponding to each block in the target page and the central coordinate value of each block;
if the page traversal pattern of the target page is the element identification traversal pattern, traversing the elements in the target page through the page traversal pattern of the target page to generate an element structure tree of the target page, which specifically includes:
extracting information from the image features in the target page and/or the page structure information in the target page to obtain identification information of each element in the target page and coordinate values of each element;
reading the attribute values of the elements in the target page according to the identification information of the elements in the target page;
generating an element structure tree of the target page according to the attribute value of each element in the target page and the coordinate value of each element in the target page;
if the page traversal mode of the target page is the image text traversal mode, traversing the elements in the target page through the page traversal mode of the target page to generate an element structure tree of the target page, which specifically includes:
calling an image control library, and identifying the image controls in the target page to obtain the types and coordinate values of the image controls in the target page;
performing text recognition on the target page to obtain a character list of the target page and a central coordinate value of each segment of characters;
and generating an element structure tree of the target page according to the type and the coordinate value of each image control in the target page, the character list of the target page and the central coordinate value of each segment of characters.
5. The method according to claim 1 or 2, wherein the performing a speech conversion operation on each element in the element structure tree of the target page to obtain a speech text of each element in the target page specifically includes:
executing click operation on each element in the element structure tree of the target page to obtain a voice signal of each element in the target page;
extracting the characteristics of the voice signals of all elements in the target page through a voice signal collector, and inputting the extracted characteristics into an acoustic model to obtain the voice signal coding values of all elements;
and decoding the voice signal coding value of each element through a voice model and a pronunciation dictionary to obtain the voice text of each element in the target page.
6. The method according to claim 1 or 2, wherein the comparing the speech text of each element in the target page with the attribute value of each element in the element structure tree of the target page to obtain the test result of the target page specifically comprises:
comparing the voice text of each element in the target page with the attribute values of each corresponding element in the element structure tree of the target page one by one to obtain a first comparison result;
integrating the voice texts of all elements in the target page to obtain the voice text of the target page, and integrally comparing the voice text of the target page with the attribute values of all elements in the element structure tree of the target page to obtain a second comparison result;
and integrating the first comparison result and the second comparison result to obtain a test result of the target page.
7. The method according to claim 6, wherein the comparing the speech text of each element in the target page with the attribute value of each corresponding element in the element structure tree of the target page one by one to obtain a first comparison result specifically comprises:
comparing the voice texts of the elements in the target page with the attribute values of the corresponding elements in the element structure tree of the target page one by one;
generating comparison success information of the elements aiming at the elements with the same comparison value, reading attribute values of the elements aiming at the elements with different comparison values, converting the elements into voice texts, and comparing the attribute values of the elements with the voice texts of the elements again;
generating comparison success information of the elements aiming at the elements with the same comparison values after the re-comparison, and generating comparison failure information of the elements aiming at the elements with different comparison values after the re-comparison;
and generating the first comparison result according to the comparison success information of the elements and the comparison failure information of the elements.
8. The method according to claim 6, wherein the integrating the first comparison result and the second comparison result to obtain the test result of the target page specifically comprises:
and reserving the same comparison information in the first comparison result and the second comparison result, and labeling the different comparison information and the missing comparison information in the first comparison result and the second comparison result to obtain the test result of the target page.
9. The method of claim 1, further comprising:
if the element structure tree of the target page contains a page jump element, executing operation on the page jump element, and jumping to an associated page corresponding to the page jump element;
carrying out image control identification and text identification on the associated page, and generating an element structure tree of the associated page according to an identification result;
performing voice conversion operation on each element in the element structure tree of the associated page to obtain a voice text of each element in the associated page;
and comparing the voice text of each element in the associated page with the attribute value of each element in the element structure tree of the associated page to obtain a test result of the associated page.
10. A page testing apparatus, characterized in that the apparatus comprises:
the device comprises a configuration information receiving module, a configuration information processing module and a configuration information processing module, wherein the configuration information processing module is used for receiving test configuration information of a target page, and the test configuration information comprises a page traversal mode switching threshold;
the page element traversing module is used for determining a page traversing mode of a target page according to the page traversing mode switching threshold and the number of elements in the target page, traversing the elements in the target page through the page traversing mode of the target page, and generating an element structure tree of the target page, wherein the page traversing mode comprises a screen segmentation traversing mode, an element identification traversing mode and an image text traversing mode;
the element voice conversion module is used for executing voice conversion operation on each element in the element structure tree of the target page to obtain a voice text of each element in the target page;
and the test result generation module is used for comparing the voice text of each element in the target page with the attribute value of each element in the element structure tree of the target page to obtain the test result of the target page.
CN202110236485.4A 2021-03-03 2021-03-03 Page testing method and device Active CN112597066B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110236485.4A CN112597066B (en) 2021-03-03 2021-03-03 Page testing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110236485.4A CN112597066B (en) 2021-03-03 2021-03-03 Page testing method and device

Publications (2)

Publication Number Publication Date
CN112597066A CN112597066A (en) 2021-04-02
CN112597066B true CN112597066B (en) 2021-05-18

Family

ID=75210221

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110236485.4A Active CN112597066B (en) 2021-03-03 2021-03-03 Page testing method and device

Country Status (1)

Country Link
CN (1) CN112597066B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116185808A (en) * 2021-11-26 2023-05-30 腾讯科技(深圳)有限公司 Method, device, equipment and storage medium for testing target program
CN115437823B (en) * 2022-08-31 2024-02-06 北京云脉芯联科技有限公司 Timeout traversing method and chip

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109359029A (en) * 2018-08-27 2019-02-19 浙江大学 It is a kind of automate non-intrusion type Android apply accessible support detection method
CN110136721A (en) * 2019-04-09 2019-08-16 北京大米科技有限公司 A kind of scoring generation method, device, storage medium and electronic equipment
CN110221969A (en) * 2019-05-21 2019-09-10 深圳壹账通智能科技有限公司 A kind of page function test method and relevant apparatus
CN111563218B (en) * 2020-04-03 2023-03-14 南方科技大学 Page repairing method and device

Also Published As

Publication number Publication date
CN112597066A (en) 2021-04-02

Similar Documents

Publication Publication Date Title
CN112597065B (en) Page testing method and device
CN109871326B (en) Script recording method and device
US11194448B2 (en) Apparatus for vision and language-assisted smartphone task automation and method thereof
US20180173614A1 (en) Technologies for device independent automated application testing
US10705892B2 (en) Automatically generating conversational services from a computing application
US20170351371A1 (en) Touch interaction based search method and apparatus
CN112597066B (en) Page testing method and device
CN109033772B (en) Verification information input method and device
CN103714333A (en) Apparatus and method for recognizing a character in terminal equipment
CN109828906B (en) UI (user interface) automatic testing method and device, electronic equipment and storage medium
CN110795175A (en) Method and device for analog control of intelligent terminal and intelligent terminal
CN107025393A (en) A kind of method and device of resource transfer
CN106959919B (en) Software testing method and device based on testing path diagram
CN108845955B (en) Chinese input method test method and device and electronic equipment
CN113626441A (en) Text management method, device and equipment based on scanning equipment and storage medium
CN112799656B (en) Script file configuration method, device, equipment and storage medium for automation operation
CN112905451B (en) Automatic testing method and device for application program
JP7029557B1 (en) Judgment device, judgment method and judgment program
CN109992514B (en) Mobile application dynamic analysis method based on visual content
CN113515280A (en) Page code generation method and device
CN110895924B (en) Method and device for reading document content aloud, electronic equipment and readable storage medium
CN112328308A (en) Method and device for recognizing text
Chu et al. Automated GUI testing for android news applications
CN116361193B (en) Method and device for testing layout document text selection
CN112130744B (en) Content input method and content input device for intelligent equipment

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
EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20210402

Assignee: CHEZHUBANG (BEIJING) TECHNOLOGY Co.,Ltd.

Assignor: RAJAX NETWORK TECHNOLOGY (SHANGHAI) Co.,Ltd.|ZHEJIANG KOUBEI NETWORK TECHNOLOGY Co.,Ltd.

Contract record no.: X2023980032937

Denomination of invention: Page test method and device

Granted publication date: 20210518

License type: Common License

Record date: 20230227

EE01 Entry into force of recordation of patent licensing contract
EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20210402

Assignee: May 8 home Co.,Ltd.

Assignor: RAJAX NETWORK TECHNOLOGY (SHANGHAI) Co.,Ltd.|ZHEJIANG KOUBEI NETWORK TECHNOLOGY Co.,Ltd.

Contract record no.: X2023980033563

Denomination of invention: Page testing methods and devices

Granted publication date: 20210518

License type: Common License

Record date: 20230315

EE01 Entry into force of recordation of patent licensing contract
OL01 Intention to license declared
OL01 Intention to license declared