Movatterモバイル変換


[0]ホーム

URL:


CN113392008B - Applet testing method, device, electronic equipment, storage medium and program product - Google Patents

Applet testing method, device, electronic equipment, storage medium and program product
Download PDF

Info

Publication number
CN113392008B
CN113392008BCN202110675007.3ACN202110675007ACN113392008BCN 113392008 BCN113392008 BCN 113392008BCN 202110675007 ACN202110675007 ACN 202110675007ACN 113392008 BCN113392008 BCN 113392008B
Authority
CN
China
Prior art keywords
control
applet
text
image
page
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
CN202110675007.3A
Other languages
Chinese (zh)
Other versions
CN113392008A (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.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBCfiledCriticalIndustrial and Commercial Bank of China Ltd ICBC
Priority to CN202110675007.3ApriorityCriticalpatent/CN113392008B/en
Publication of CN113392008ApublicationCriticalpatent/CN113392008A/en
Application grantedgrantedCritical
Publication of CN113392008BpublicationCriticalpatent/CN113392008B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Classifications

Landscapes

Abstract

The present disclosure provides an applet testing method that may be used in the financial and technological field or other fields. The test method comprises the following steps: performing text matching on the text control on the applet page to locate the position of the text control on the applet page; performing image recognition on the image control on the applet page to locate the position of the image control on the applet page; extracting behavior characteristics corresponding to the text control and the image control; according to the position and the behavior characteristics, associating the text control or the image control with the corresponding behavior characteristics to generate a test script; and testing the applet according to the test script. The present disclosure also provides an applet testing apparatus, an electronic device, a storage medium and a computer program product.

Description

Applet testing method, device, electronic equipment, storage medium and program product
Technical Field
The present disclosure relates to the field of computer technology, and may be used in the field of financial technology or other fields, and in particular, to an applet testing method, apparatus, storage medium and program product.
Background
With the rapid development of applets, the need for automated testing for applets is becoming more and more urgent. In implementing the concepts of the present disclosure, the inventors have found that the existing applet test method has at least the following drawbacks: the grabbing of the small program control by the open source tool can be achieved by the aid of the wall turning tool, and various use limitations exist, so that the control is difficult to position in the automatic test. The suitability of the automatic test is poor by using machine vision to carry out picture comparison by the influence of the resolution ratio, the pixel density and the like of the mobile phone.
Disclosure of Invention
In view of this, the present disclosure provides, in one aspect, an applet testing method, including: performing text matching on the text control on the applet page to locate the position of the text control on the applet page; performing image recognition on the image control on the applet page to locate the position of the image control on the applet page; extracting behavior characteristics corresponding to the text control and the image control; according to the position and the behavior characteristics, associating the text control or the image control with the corresponding behavior characteristics to generate a test script; and testing the applet according to the test script.
According to an embodiment of the present disclosure, the text matching of the text control on the applet page includes: extracting keywords corresponding to the text control; analyzing the WXML file of the applet to obtain the label of the text control corresponding to the keyword; and positioning the text control on the applet page according to the behavior characteristics contained in the label and the text control to obtain the position of the text control.
According to an embodiment of the present disclosure, the method further comprises: creating a virtual control according to the keywords; constructing a control tree according to the virtual control and the label; and based on the control tree, performing matching search through the behavior characteristics contained by the labels and the text controls until the text controls are positioned.
According to an embodiment of the disclosure, the image recognition of the image control on the applet page includes: obtaining icon category data, wherein the icon category data comprises data with commonalities among different applets; acquiring a characteristic control picture of an applet to be tested; training an image recognition model based on the icon category data and the characteristic control picture; and carrying out image recognition on the image control on the applet page based on the characteristic control picture.
According to an embodiment of the present disclosure, extracting the behavior features corresponding to the text control and the image control includes: classifying operations performed on pages of the applet; analyzing the WXML file of the applet to obtain the label name and value of each control; based on the label name and the value of each control, the response of different types of operations on different controls is obtained, and the behavior characteristics of the different controls are obtained.
According to an embodiment of the present disclosure, the method further comprises: and converting the text control and the image control into a view level, and converting the position corresponding to the text control and the position corresponding to the image control into an absolute position.
According to an embodiment of the present disclosure, the method further comprises: and storing the text control, the image control and the position corresponding to the text control and the position corresponding to the image control by adopting a stack structure.
Another aspect of the present disclosure provides an applet testing apparatus comprising: the text matching module is used for performing text matching on the text control on the applet page so as to locate the position of the text control on the applet page; the image recognition module is used for carrying out image recognition on the image control on the applet page so as to position the image control on the applet page; the extraction module is used for extracting the behavior characteristics corresponding to the text control and the image control; the generation module is used for associating the text control or the image control with the corresponding behavior characteristic according to the position and the behavior characteristic so as to generate a test script; and the test module is used for testing the applet according to the test script.
According to an embodiment of the present disclosure, the text matching module includes: the extraction unit is used for extracting keywords corresponding to the text control; the analysis unit is used for analyzing the WXML file of the applet to obtain the label of the text control corresponding to the keyword; and the positioning unit is used for positioning the text control on the applet page according to the behavior characteristics contained in the label and the text control to obtain the position of the text control.
According to an embodiment of the disclosure, the text matching module further includes: the creation unit is used for creating a virtual control according to the keywords; the building unit is used for building a control tree according to the virtual control and the label; and the matching unit is used for carrying out matching search through the behavior characteristics contained in the labels and the text controls based on the control tree until the text controls are positioned.
According to an embodiment of the disclosure, the image recognition module includes: the first acquisition unit is used for acquiring icon category data, wherein the icon category data comprise data with commonalities among different applets; the second acquisition unit is used for acquiring a characteristic control picture of the applet to be tested; the training unit is used for training an image recognition model based on the icon category data and the characteristic control picture; and the identification unit is used for carrying out image identification on the image control on the applet page based on the characteristic control picture.
According to an embodiment of the disclosure, the extraction module comprises: a classification unit configured to classify operations performed on pages of the applet; the analysis unit is used for analyzing the WXML file of the applet to obtain the label name and value of each control; the third obtaining unit is used for obtaining the response of different types of operations on different controls based on the label names and the values of the controls, and obtaining the behavior characteristics of the different controls.
According to an embodiment of the present disclosure, the apparatus further comprises: and the conversion module is used for converting the text control and the image control into a view level and converting the position corresponding to the text control and the position corresponding to the image control into an absolute position.
According to an embodiment of the present disclosure, the apparatus further comprises: and the storage module is used for storing the text control, the image control and the position corresponding to the text control and the position corresponding to the image control by adopting a stack structure.
Another aspect of the present disclosure provides an electronic device, comprising: one or more processors; and a memory for storing one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method as described above.
Another aspect of the present disclosure provides a computer-readable storage medium storing computer-executable instructions that, when executed, are configured to implement a method as described above.
Another aspect of the present disclosure provides a computer program comprising computer executable instructions which when executed are for implementing a method as described above.
Drawings
FIG. 1 schematically illustrates a system architecture 100 of an applet testing method and apparatus according to an embodiment of the disclosure;
FIG. 2 schematically illustrates an internal block diagram of the server 104, according to an embodiment of the disclosure;
FIG. 3 schematically illustrates a flow chart of an applet testing method according to one embodiment of the disclosure;
FIG. 4 schematically illustrates a text matching method flowchart of a text control according to an embodiment of the present disclosure;
FIG. 5 schematically illustrates a text matching method flowchart of a text control according to yet another embodiment of the present disclosure;
FIG. 6 schematically illustrates an image recognition method flowchart of an image control according to an embodiment of the present disclosure;
FIG. 7 schematically illustrates a behavioral characteristic extraction method flow diagram according to an embodiment of the disclosure;
FIG. 8 schematically illustrates a flow chart of an applet testing method according to yet another embodiment of the disclosure;
FIG. 9 schematically illustrates a block diagram of an applet testing apparatus according to an embodiment of the disclosure;
FIG. 10 schematically illustrates a block diagram of an applet testing apparatus according to yet another embodiment of the disclosure;
FIG. 11 schematically illustrates a block diagram of an applet testing apparatus according to yet another embodiment of the disclosure;
FIG. 12 schematically illustrates a block diagram of a text matching module according to an embodiment of the disclosure;
FIG. 13 schematically illustrates a block diagram of a text matching module according to an embodiment of the disclosure;
FIG. 14 schematically illustrates a block diagram of an image recognition module according to an embodiment of the disclosure;
FIG. 15 schematically illustrates a block diagram of an extraction module according to an embodiment of the disclosure;
Fig. 16 schematically illustrates a block diagram of an electronic device adapted to implement the above-described method according to an embodiment of the present disclosure.
Detailed Description
Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. It should be understood that the description is only exemplary and is not intended to limit the scope of the present disclosure. In the following detailed description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the present disclosure. It may be evident, however, that one or more embodiments may be practiced without these specific details. In addition, in the following description, descriptions of well-known structures and techniques are omitted so as not to unnecessarily obscure the concepts of the present disclosure.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The terms "comprises," "comprising," and/or the like, as used herein, specify the presence of stated features, steps, operations, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, or components.
All terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art unless otherwise defined. It should be noted that the terms used herein should be construed to have meanings consistent with the context of the present specification and should not be construed in an idealized or overly formal manner.
Where a convention analogous to "at least one of A, B and C, etc." is used, in general such a convention should be interpreted in accordance with the meaning of one of skill in the art having generally understood the convention (e.g., "a system having at least one of A, B and C" would include, but not be limited to, systems having a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.). Where a formulation similar to at least one of "A, B or C, etc." is used, in general such a formulation should be interpreted in accordance with the ordinary understanding of one skilled in the art (e.g. "a system with at least one of A, B or C" would include but not be limited to systems with a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.).
Some of the block diagrams and/or flowchart illustrations are shown in the figures. It will be understood that some blocks of the block diagrams and/or flowchart illustrations, or combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the instructions, when executed by the processor, create means for implementing the functions/acts specified in the block diagrams and/or flowchart. The techniques of this disclosure may be implemented in hardware and/or software (including firmware, microcode, etc.). Additionally, the techniques of this disclosure may take the form of a computer program product on a computer-readable storage medium having instructions stored thereon, the computer program product being for use by or in connection with an instruction execution system.
The embodiment of the disclosure provides an applet testing method, comprising the following steps: text matching is performed on the text control on the applet page to locate the position of the text control on the applet page. And carrying out image recognition on the image control on the applet page to locate the position of the image control on the applet page. And extracting the behavior characteristics corresponding to the text control and the image control. And associating the text control or the image control with the corresponding behavior characteristic according to the position and the behavior characteristic so as to generate the test script. According to the test script, the applet is tested.
Fig. 1 schematically illustrates a system architecture 100 of an applet testing method and apparatus according to an embodiment of the disclosure. It should be noted that fig. 1 is only an example of a system architecture to which embodiments of the present disclosure may be applied to assist those skilled in the art in understanding the technical content of the present disclosure, but does not mean that embodiments of the present disclosure may not be used in other devices, systems, environments, or scenarios.
As shown in fig. 1, a system architecture 100 according to this embodiment may include an applet 101, a storage unit 102, a network 103, and a server 104. The network 103 is used to provide a communication link between the applet 101, the storage unit 102, the applet 101, the storage unit 102 and the server 104.
The applet 101 may be various application applets, such as, for example, a financial related business transacting applet, a shopping applet, an evaluation applet, a statistics applet, a live game viewing applet, a travel applet, and the like. The network 103 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others. The wired mode can be, for example, connection by adopting any one of the following interfaces: the wireless mode may be, for example, a wireless communication mode, where the wireless communication may be, for example, any one of a plurality of wireless technology standards such as bluetooth, wi-Fi, infrared, zigBee, etc.
Server 104 may be a server capable of applet testing on applets. Fig. 2 schematically illustrates an internal block diagram of the server 104 according to an embodiment of the present disclosure. It should be noted that fig. 2 is only an example of a system architecture to which the embodiments of the present disclosure may be applied, so as to help those skilled in the art understand the technical content of the present disclosure. As shown in FIG. 2, according to one embodiment of the present disclosure, the internal structure of the server 104 may include, for example, a text matching engine 1041, an image recognition model 1042, an element locator 1043, a behavior recognition library construction module 1044, an operation parser 1045, and an automation script generator 1046. In the process of applet testing, the text matching engine 1041 communicates with the applet through the network 103, identifies the position of the text control on the applet page, the image identification model 1042 communicates with the applet through the network 103, identifies the position of the image control on the applet page, and the element locator 1043 receives the control and the position generated by the text matching engine 1041 and the image identification model 1042, converts the control and the position into the view level and the absolute position of the element, and realizes the accurate positioning of the element. The behavior recognition library construction module 1044 acquires behavior characteristics corresponding to the control from the storage unit through the network 103, and constructs a behavior recognition library. The operation parser 1045 parses the behavior features into specific actions acting on the control, such as: clicking, inputting, etc., trigger the action to be automatically performed. The automation script generator 1046 correlates the text controls or image controls with corresponding behavioral characteristics according to the location and behavioral characteristics to generate test scripts, according to which the applet is tested.
It should be noted that the applet testing method provided in the embodiments of the present disclosure may be executed by the server 104. Accordingly, the applet testing apparatus provided by the embodiments of the present disclosure may be provided in the server 104. Or the applet testing methods provided by embodiments of the present disclosure may be performed by a server or cluster of servers other than server 104 and capable of communicating with applet 101, storage unit 102 and/or server 104. Accordingly, the applet testing apparatus provided by embodiments of the present disclosure may also be disposed in a server or cluster of servers other than server 104 and capable of communicating with applet 101 and/or server 104. Alternatively, the applet test method provided in the embodiments of the present disclosure may be partially executed by the server 104, and partially executed by the applet 101 and the storage unit 102. Correspondingly, the applet test device provided in the embodiment of the present disclosure may be partially disposed in the server 104, and partially disposed in the applet 101 and the storage unit 102.
It should be understood that the number of applets, networks and servers in fig. 1 are merely illustrative. There may be any number of applets, networks and servers as desired by the implementation.
The applet testing method provided by the embodiment of the disclosure can be applied to the field of financial services, and takes a bank as an example, a user can quickly know relevant offers and dynamics of the bank through the applet of the bank to conduct online consultation, account opening, large-amount cash taking, credit card application, financial product reservation handling and other various services, a new use channel is provided for the user, a distribution recommending function is supported, no matter whether staff or clients recommend new services, commission is available, user experience and handling efficiency are greatly improved, meanwhile, service expansion of the bank is facilitated, and the performance of the applet is a key for ensuring normal popularization of the services. The existing applet test method is limited by various uses and has poor suitability, so that the test popularization of the applet of the bank is greatly limited, and the popularization of related business is further influenced. By adopting the applet testing method provided by the embodiment of the disclosure, the automatic test script can be automatically generated and operated, the safety and convenience of the automatic test are improved, and the testing efficiency is improved. The automatic control positioning mode can adapt to the changes of mobile phone equipment, resolution and the like, and solves the adaptation difficult problems of inaccurate control positioning due to the difference of different mobile phone models and page UI of resolution.
It should be understood that the applet testing method provided by the embodiments of the present disclosure is not limited to application to the technical field of financial services, but may be applied to any field other than the financial field, and the above description is only exemplary, and the applet testing method of the embodiments of the present disclosure may be applied to fields related to applet testing, such as e-commerce field, logistics field, cultural entertainment field, and the like.
Fig. 3 schematically illustrates a flow chart of an applet testing method according to an embodiment of the disclosure.
As shown in FIG. 3, the applet test method may include operations S301-S305, for example.
In operation S301, text matching is performed on the text control on the applet page to locate the position of the text control on the applet page.
In operation S302, image recognition is performed on the image control on the applet page to locate the position of the image control on the applet page.
In operation S303, behavior features corresponding to the text control and the image control are extracted.
In operation S304, the text control or the image control is associated with the corresponding behavior feature according to the position and the behavior feature to generate the test script.
In operation S305, the applet is tested according to the test script.
In the embodiment of the disclosure, the control may refer to a text, an input box, a picture, a button, and the like on the applet page that may present operable elements. An applet page (UI) may refer to an operating interface that the system presents to a user. Behavior characteristics may refer to operation behaviors supported by the page control, and corresponding specific actions include: clicking, inputting, selecting, checking, uploading and downloading files and the like.
According to the applet testing method provided by the embodiment of the disclosure, the text control on the page is automatically identified through text matching, and the image control on the page is automatically identified through image identification, so that the positions of the text control and the image space are automatically positioned, and the difficult problem of positioning elements of the automatic testing control is solved. The automatic positioning mode can adapt to the changes of mobile phone equipment, resolution and the like, solves the adaptation problems of inaccurate control positioning caused by the difference of different mobile phone models and resolution page UI, and is beneficial to the smooth development of automatic compatibility tests and regression tests. And the control is associated with the corresponding behavior characteristic, so that the dynamic binding of the control and the operation is realized, the automatic generation and operation of an automatic test script are further realized, the safety and convenience of the automatic test are improved, the test efficiency is improved, and the automatic compatibility test and the regression test are facilitated.
The method for testing the small program provided by the embodiment of the disclosure is further described below with reference to the accompanying drawings.
Fig. 4 schematically illustrates a text matching method flowchart of a text control according to an embodiment of the present disclosure.
As shown in FIG. 4, the text matching method may include operations S401 to S403, for example.
In operation S401, keywords corresponding to the text control are extracted.
In the embodiment of the disclosure, keywords of the text control can be extracted by constructing a text matching engine. For example, for an industrial service applet, when a user applies for a credit card through the applet, the user matches a text control "apply" after applying for the credit card, and clicks "apply" to perform credit card application operation, and after the application data is filled out, the text control "submit" is correspondingly displayed.
In operation S402, the wuml file of the applet is parsed to obtain the label of the text control corresponding to the keyword.
In the embodiment of the disclosure, each applet corresponds to a WXML file, and the WXML file contains a control or text corresponding tag. Continuing to use the above example, for the text control "apply", "submit", the wuml file will have a corresponding tag < tag >, so that in order to facilitate the subsequent fast search matching of the text control, the tag < tag > may be used as a good search basis, so that the wuml file corresponding to the working line service applet needs to be parsed to extract the tag < tag > corresponding to the text control "apply", "submit".
In operation S403, the text control is positioned on the applet page according to the behavior characteristics included in the label and the text control, and the position of the text control is obtained.
Continuing to use the above example, for the industrial personal service applet, if the text control "apply" includes the keyword "apply", and the other content does not include the keyword "apply", the automatic accurate positioning of the text control "apply" can be completely realized by directly searching according to the label. While for other content than the text control "application" including the keyword "application", the keyword "application" may be included, for example, in the introduction of the flow of the credit card application. Correspondingly, the text control application of the WXML file corresponds to a tag, the keyword application contained in the flow introduction of the credit card application corresponds to a tag, namely, the keyword application of the WXML file possibly corresponds to a plurality of tags at the same time, the tags of the text control application corresponding to the parsed keyword application are further multiple, intelligent search matching is directly carried out in a page according to the tags, the obtained text control application also has multiple positions, wherein the positions correspond to the keyword application contained in the flow introduction of the credit card application, and the positions correspond to the text control application. Therefore, automatic and accurate positioning of the text control application cannot be completely realized by directly searching according to the label. In the embodiment of the disclosure, the intelligent search matching can be performed in the page by acquiring the behavior operation (such as clicking) corresponding to the text control application and combining the label, and when the behavior operation containing the keyword application and having clicking is searched, the behavior operation can be determined to be the text control application, so that the automatic accurate positioning of the text control application can be completely realized.
According to the text matching method of the text control, which is provided by the embodiment of the disclosure, the text control can be automatically and accurately positioned due to the fact that intelligent searching, matching and positioning are performed by combining the keywords and the corresponding behavior characteristics of the text control.
Fig. 5 schematically illustrates a text matching method flowchart of a text control according to yet another embodiment of the present disclosure.
As shown in FIG. 5, the text matching method may further include operations S501 to S503 in addition to operations S501 to S503.
In operation S501, a virtual control is created from keywords.
In operation S502, a control tree is constructed according to the virtual control and the label.
In operation S503, a matching search is performed through the behavior features contained in the labels and the text controls based on the control tree until the text controls are located.
In the embodiment of the disclosure, intelligent searching, matching and positioning can be performed by creating the virtual control and performing intelligent searching, matching and positioning in a control tree mode without directly performing intelligent searching, matching and positioning in the applet page, so that the speed of text control and text matching is further increased, and the efficiency of automatic applet testing is further improved.
Fig. 6 schematically illustrates an image recognition method flowchart of an image control according to an embodiment of the present disclosure.
As shown in FIG. 6, the image recognition method may include operations S601-S603, for example.
In operation S601, icon category data including data having commonalities among different applets is acquired.
In operation S602, an image recognition model is trained based on icon category data and feature control pictures.
In operation S603, image recognition is performed on the image control on the applet page based on the above-described feature control picture.
In the embodiment of the disclosure, some common image controls, such as a head portrait control, are included between different applets, and can be stored as a common training set, so that when different applets are identified, the common training sets can be used for image identification models, the acquisition time of training data is reduced, the identification efficiency of the image controls is improved, and the test efficiency of the applets is further improved. Image recognition training can be performed by using a character recognition technology to generate an image recognition model.
According to the image recognition method for the image control, which is provided by the embodiment of the disclosure, the image control is performed based on the pre-trained image recognition model, so that the automatic and accurate positioning of the image control can be realized.
In the embodiment of the disclosure, a stack structure may be used to store the text control, the image control, and the position corresponding to the text control and the position corresponding to the image control obtained by the text matching method and the image recognition method.
Fig. 7 schematically illustrates a behavioral characteristic extraction method flowchart according to an embodiment of the disclosure.
As shown in FIG. 7, the behavior feature extraction method may include operations S701-S703, for example.
In operation S701, operations performed on pages of an applet are classified.
In operation S702, the wuml file of the applet is parsed to obtain the tag name and value of each control.
In operation S703, based on the label name and the value of each control, responses of different types of operations on different controls are obtained, and behavior features of different controls are obtained.
The behavior characteristics of all the controls on the applet page can be obtained by the method, and the behavior characteristics are analyzed into specific actions acting on the controls when the automatic test script is generated, such as: clicking, inputting, etc., trigger the action to be automatically performed. And dynamically binding the control and the operation behavior according to the control position and the operation behavior acted on the control, and translating the natural language-like script into executable machine codes to realize automatic generation and operation of the automatic test script.
Fig. 8 schematically illustrates a flow chart of an applet testing method according to a further embodiment of the disclosure.
As shown in fig. 8, the applet test method may include, for example, operation S801.
In operation S801, a text control and an image control are converted into view levels, and a position corresponding to the text control and a position corresponding to the image control are converted into absolute positions.
Based on the method, accurate positioning of the text control and the image control can be further realized.
In summary, according to the applet testing method provided by the embodiment of the disclosure, text controls on the page are automatically identified through text matching, and image controls on the page are automatically identified through image identification, so that the positions of the text controls and the image space are automatically positioned, and the difficult problem of positioning elements of the automatic testing controls is solved. The automatic positioning mode can adapt to the changes of mobile phone equipment, resolution and the like, solves the adaptation problems of inaccurate control positioning caused by the difference of different mobile phone models and resolution page UI, and is beneficial to the smooth development of automatic compatibility tests and regression tests. And the control is associated with the corresponding behavior characteristic, so that the dynamic binding of the control and the operation is realized, the automatic generation and operation of an automatic test script are further realized, the safety and convenience of the automatic test are improved, the test efficiency is improved, and the automatic compatibility test and the regression test are facilitated. In addition, the small program testing method reduces the threshold of automatic small program testing, saves time and labor cost, enables common business testers to quickly construct and operate automatic testing cases, does not need to pay attention to programming details, only lists operation steps according to manual operation processes, prepares test data needed by the cases, can automatically assemble codes and data by the cases, constructs and operates for many times by a machine, quickly covers various testing scenes and data branches, and greatly improves testing efficiency.
Fig. 9 schematically illustrates a block diagram of an applet testing apparatus according to an embodiment of the disclosure.
As shown in fig. 9, the applet testing apparatus 900 may include, for example, a text matching module 910, an image recognition module 920, an extraction module 930, a generation module 940, and a testing module 950.
The text matching module 910 is configured to perform text matching on the text control on the applet page to locate a position of the text control on the applet page.
And the image recognition module is used for carrying out image recognition on the image control on the applet page so as to position the image control on the applet page.
And the extraction module is used for extracting the behavior characteristics corresponding to the text control and the image control.
And the generation module is used for associating the text control or the image control with the corresponding behavior characteristic according to the position and the behavior characteristic so as to generate the test script.
And the test module is used for testing the applet according to the test script.
Fig. 10 schematically illustrates a block diagram of an applet testing apparatus according to a further embodiment of the disclosure.
As shown in fig. 10, the applet testing apparatus 900 may also include a conversion module 960, for example.
The conversion module 960 is configured to convert the text control and the image control into view levels, and convert the position corresponding to the text control and the position corresponding to the image control into absolute positions.
Fig. 11 schematically illustrates a block diagram of an applet testing apparatus according to a further embodiment of the disclosure.
As shown in FIG. 11, the applet testing apparatus 900 may also include a storage module 970, for example.
The storage module 970 is configured to store the text control, the image control, and a position corresponding to the text control and a position corresponding to the image control in a stack structure.
Fig. 12 schematically illustrates a block diagram of a text matching module according to an embodiment of the disclosure.
As shown in fig. 12, the text matching module 910 may include, for example, an extracting unit 911, an analyzing unit 912, and a positioning unit 913.
And an extracting unit 911, configured to extract keywords corresponding to the text control.
And the parsing unit 912 is used for parsing the WXML file of the applet to obtain the label of the text control corresponding to the keyword.
And the positioning unit 913 is configured to position the text control on the applet page according to the behavior characteristics included in the label and the text control, so as to obtain the position of the text control.
Fig. 13 schematically illustrates a block diagram of a text matching module according to an embodiment of the disclosure.
As shown in fig. 13, the text matching module 910 may further include, for example, a creating unit 914, a constructing unit 915, and a matching unit 916.
A creating unit 914, configured to create a virtual control according to the keyword.
A building unit 915, configured to build a control tree according to the virtual control and the label.
And the matching unit 916 is configured to perform a matching search through the behavior features included in the labels and the text controls based on the control tree until the text controls are located.
Fig. 14 schematically illustrates a block diagram of an image recognition module according to an embodiment of the disclosure.
As shown in fig. 14, the image recognition module 920 may include, for example, a first acquisition unit 921, a second acquisition unit 922, a training unit 923, and a recognition unit 924.
And a first obtaining unit 921 configured to obtain icon category data, where the icon category data includes data having commonalities among different applets.
And the second obtaining unit 922 is configured to obtain a feature control picture of the applet to be tested.
And the training unit 923 is used for training the image recognition model based on the icon category data and the characteristic control picture.
And the identifying unit 924 is configured to identify an image of the image control on the applet page based on the characteristic control picture.
Fig. 15 schematically illustrates a block diagram of an extraction module according to an embodiment of the disclosure.
As shown in fig. 15, the extraction module 930 may include, for example, a classification unit 931, a parsing unit 932 and a third obtaining unit 933.
And a classification unit 931 for classifying operations performed on the pages of the applet.
And the parsing unit 932 is configured to parse the WXML file of the applet to obtain the tag name and value of each control.
The third obtaining unit 933 is configured to obtain, based on the label name and the value of each control, responses of different types of operations on different controls, and obtain behavior features of the different controls.
Any number of modules, sub-modules, units, sub-units, or at least some of the functionality of any number of the sub-units according to embodiments of the present disclosure may be implemented in one module. Any one or more of the modules, sub-modules, units, sub-units according to embodiments of the present disclosure may be implemented as split into multiple modules. Any one or more of the modules, sub-modules, units, sub-units according to embodiments of the present disclosure may be implemented at least in part as a hardware circuit, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system-on-chip, a system-on-substrate, a system-on-package, an Application Specific Integrated Circuit (ASIC), or in any other reasonable manner of hardware or firmware that integrates or encapsulates the circuit, or in any one of or a suitable combination of three of software, hardware, and firmware. Or one or more of the modules, sub-modules, units, sub-units according to embodiments of the present disclosure may be at least partially implemented as computer program modules, which, when executed, may perform the corresponding functions.
For example, any of text matching module 910, image recognition module 920, extraction module 930, generation module 940, and test module 950 may be combined in one module/unit/sub-unit or any of the modules/units/sub-units may be split into multiple modules/units/sub-units. Or at least some of the functionality of one or more of these modules/units/sub-units may be combined with at least some of the functionality of other modules/units/sub-units and implemented in one module/unit/sub-unit. At least one of the text matching module 910, the image recognition module 920, the extraction module 930, the generation module 940, and the test module 950 may be implemented, at least in part, as hardware circuitry, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system-on-chip, a system-on-substrate, a system-on-package, an Application Specific Integrated Circuit (ASIC), or as hardware or firmware in any other reasonable manner of integrating or packaging the circuitry, or as any one of or a suitable combination of three of software, hardware, and firmware, according to embodiments of the present disclosure. Or at least one of the text matching module 910, the image recognition module 920, the extraction module 930, the generation module 940, and the test module 950 may be at least partially implemented as computer program modules, which when executed, perform the corresponding functions.
It should be noted that, in the embodiment of the present disclosure, the part of the small-program testing device corresponds to the part of the small-program testing method in the embodiment of the present disclosure, and specific implementation details and technical effects thereof are the same, which are not described herein.
Fig. 16 schematically illustrates a block diagram of an electronic device adapted to implement the above-described method according to an embodiment of the present disclosure. The electronic device shown in fig. 16 is merely an example, and should not impose any limitation on the functionality and scope of use of the embodiments of the present disclosure.
As shown in fig. 16, an electronic device 1600 according to an embodiment of the present disclosure includes a processor 1601 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 1602 or a program loaded from a storage section 1608 into a Random Access Memory (RAM) 1603. The processor 1601 may include, for example, a general purpose microprocessor (e.g., a CPU), an instruction set processor and/or an associated chipset and/or a special purpose microprocessor (e.g., an Application Specific Integrated Circuit (ASIC)), or the like. The processor 1601 may also include on-board memory for caching purposes. The processor 1601 may include a single processing unit or multiple processing units for performing different actions in accordance with the method flows of the disclosed embodiments.
In the RAM1603, various programs and data necessary for the operation of the electronic device 1600 are stored. The processor 1601, ROM 1602, and RAM1603 are connected to each other by a bus 1604. The processor 1601 performs various operations of the method flow according to the embodiments of the present disclosure by executing programs in the ROM 1602 and/or RAM 1603. Note that the program can also be stored in one or more memories other than the ROM 1602 and the RAM 1603. The processor 1601 may also perform various operations of the method flow according to an embodiment of the present disclosure by executing programs stored in the one or more memories.
According to an embodiment of the disclosure, the electronic device 1600 may also include an input/output (I/O) interface 1605, the input/output (I/O) interface 1605 also being connected to the bus 1604. The electronic device 1600 may also include one or more of the following components connected to the I/O interface 1605: an input portion 1606 including a keyboard, a mouse, and the like; an output portion 1607 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker, and the like; a storage section 1608 including a hard disk or the like; and a communication section 1609 including a network interface card such as a LAN card, a modem, or the like. The communication section 1609 performs communication processing via a network such as the internet. The drive 1610 is also connected to the I/O interface 1605 as needed. A removable medium 1611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is installed as needed on the drive 1610 so that a computer program read out therefrom is installed into the storage section 1608 as needed.
According to embodiments of the present disclosure, the method flow according to embodiments of the present disclosure may be implemented as a computer software program. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable storage medium, the computer program comprising program code for performing the method shown in the flowcharts. In such embodiments, the computer program may be downloaded and installed from a network via the communication portion 1609, and/or installed from the removable media 1611. The above-described functions defined in the system of the embodiments of the present disclosure are performed when the computer program is executed by the processor 1601. The systems, devices, apparatus, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the disclosure.
The present disclosure also provides a computer-readable storage medium that may be embodied in the apparatus/device/system described in the above embodiments; or may exist alone without being assembled into the apparatus/device/system. The computer-readable storage medium carries one or more programs which, when executed, implement methods in accordance with embodiments of the present disclosure.
According to embodiments of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium. Examples may include, but are not limited to: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this disclosure, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
For example, according to embodiments of the present disclosure, the computer-readable storage medium may include ROM1602 and/or RAM 1603 described above and/or one or more memories other than ROM1602 and RAM 1603.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions. Those skilled in the art will appreciate that the features recited in the various embodiments of the disclosure and/or in the claims may be combined in various combinations and/or combinations, even if such combinations or combinations are not explicitly recited in the disclosure. In particular, the features recited in the various embodiments of the present disclosure and/or the claims may be variously combined and/or combined without departing from the spirit and teachings of the present disclosure. All such combinations and/or combinations fall within the scope of the present disclosure.

Claims (13)

CN202110675007.3A2021-06-172021-06-17Applet testing method, device, electronic equipment, storage medium and program productActiveCN113392008B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN202110675007.3ACN113392008B (en)2021-06-172021-06-17Applet testing method, device, electronic equipment, storage medium and program product

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202110675007.3ACN113392008B (en)2021-06-172021-06-17Applet testing method, device, electronic equipment, storage medium and program product

Publications (2)

Publication NumberPublication Date
CN113392008A CN113392008A (en)2021-09-14
CN113392008Btrue CN113392008B (en)2024-08-06

Family

ID=77621843

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202110675007.3AActiveCN113392008B (en)2021-06-172021-06-17Applet testing method, device, electronic equipment, storage medium and program product

Country Status (1)

CountryLink
CN (1)CN113392008B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN113900932A (en)*2021-09-262022-01-07东软集团股份有限公司Test script generation method, device, medium and electronic equipment
CN113849415B (en)*2021-10-182025-05-30东软集团股份有限公司 Control testing method, device, storage medium and electronic device
CN115550639A (en)*2022-10-082022-12-30湖南国科微电子股份有限公司 Set-top box test method, test host, set-top box and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20040190773A1 (en)*2003-03-312004-09-30American Megatrends, Inc.Method, apparatus, and computer-readable medium for identifying character coordinates
CN109933530A (en)*2019-03-142019-06-25百度在线网络技术(北京)有限公司Components testing method and device, equipment and storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20040190773A1 (en)*2003-03-312004-09-30American Megatrends, Inc.Method, apparatus, and computer-readable medium for identifying character coordinates
CN109933530A (en)*2019-03-142019-06-25百度在线网络技术(北京)有限公司Components testing method and device, equipment and storage medium

Also Published As

Publication numberPublication date
CN113392008A (en)2021-09-14

Similar Documents

PublicationPublication DateTitle
CN113392008B (en)Applet testing method, device, electronic equipment, storage medium and program product
US20190243848A1 (en)Generating a structured document guiding view
CN113038153B (en)Financial live broadcast violation detection method, device, equipment and readable storage medium
US9766868B2 (en)Dynamic source code generation
US9619209B1 (en)Dynamic source code generation
CN112711526A (en)UI test method, device, equipment and storage medium
EP3908977A1 (en)Improving image classification modeling while mantaining data privacy compliance
CN113450147B (en)Product matching method, device, equipment and storage medium based on decision tree
US10733247B2 (en)Methods and systems for tag expansion by handling website object variations and automatic tag suggestions in dynamic tag management
CN109814868B (en)Network transmission simulation method and device, computer equipment and storage medium
CN111475722B (en)Method and apparatus for transmitting information
CN111355628A (en)Model training method, business recognition device and electronic device
CN116483372A (en)Information processing method, device and storage medium
CN114676705B (en)Dialogue relation processing method, computer and readable storage medium
CN111709716A (en)Data approval method, device, equipment and storage medium
CN117389890A (en)Method and device for generating test case, electronic equipment and storage medium
US10719482B2 (en)Data comparison
US10489728B1 (en)Generating and publishing a problem ticket
CN112633341A (en)Interface testing method and device, computer equipment and storage medium
CN112615873A (en)Internet of things equipment safety detection method, equipment, storage medium and device
US20210012060A1 (en)Structured document conversion and display system and method
CN110275820B (en)Page compatibility testing method, system and equipment
CN115859973B (en) Text feature extraction method, device, non-volatile storage medium and electronic device
CN115118687B (en)Message pushing method and device, storage medium and computer equipment
WO2024067039A1 (en)Application automated testing method, electronic device, and computer readable medium

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp