WO2022151876A1 - 应用程序的测试控制方法、装置、电子设备及存储介质 - Google Patents

应用程序的测试控制方法、装置、电子设备及存储介质 Download PDF

Info

Publication number
WO2022151876A1
WO2022151876A1 PCT/CN2021/136511 CN2021136511W WO2022151876A1 WO 2022151876 A1 WO2022151876 A1 WO 2022151876A1 CN 2021136511 W CN2021136511 W CN 2021136511W WO 2022151876 A1 WO2022151876 A1 WO 2022151876A1
Authority
WO
WIPO (PCT)
Prior art keywords
page
map
target
accessed page
target operation
Prior art date
Application number
PCT/CN2021/136511
Other languages
English (en)
French (fr)
Inventor
丁光磊
张钊
蔡天勤
Original Assignee
北京字节跳动网络技术有限公司
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 北京字节跳动网络技术有限公司 filed Critical 北京字节跳动网络技术有限公司
Priority to US18/272,424 priority Critical patent/US20240311285A1/en
Publication of WO2022151876A1 publication Critical patent/WO2022151876A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Prevention of errors by analysis, debugging or testing of software
    • G06F11/3668Testing of software
    • G06F11/3696Methods or tools to render software testable
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/0464Convolutional networks [CNN, ConvNet]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Prevention of errors by analysis, debugging or testing of software
    • G06F11/362Debugging of software
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Prevention of errors by analysis, debugging or testing of software
    • G06F11/3668Testing of software
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Prevention of errors by analysis, debugging or testing of software
    • G06F11/3668Testing of software
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/044Recurrent networks, e.g. Hopfield networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/049Temporal neural networks, e.g. delay elements, oscillating neurons or pulsed inputs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • the present disclosure relates to the technical field of automated testing, and in particular, the present disclosure relates to a test control method, device, electronic device and storage medium for an application program.
  • Application testing is a common and basic testing work, and its methods include manual testing and script testing.
  • manual testing of applications is expensive and inefficient, and some test paths are disconnected from users' real usage habits, but the cost is high and inefficiency; script testing requires manual scripting, which is difficult to implement and maintain for complex applications.
  • the present disclosure provides a test control method, device, electronic device and storage medium for an application program, which can solve the problem of automated testing.
  • the technical solution is as follows:
  • a method for application test control comprising:
  • test control device for an application program, the device comprising:
  • the first obtaining module is used to obtain the semantic segmentation map of the currently accessed page and at least two consecutive historically accessed pages associated with the currently accessed page and the history corresponding to each historically accessed page in response to an automated test request for the target application Operation type and historical operation location map;
  • the second acquisition module is used to input the semantic segmentation map, the historical operation type and the historical operation location map into the pre-trained behavior prediction model, and obtain the target operation type and target operation location probability predicted by the behavior prediction model on the currently accessed page.
  • Graph, the target operation position probability graph is used to represent the probability of executing the target operation on the page position;
  • the control module is used for controlling the test of the currently accessed page of the target application according to the target operation type and the target operation position probability map.
  • an electronic device comprising:
  • processors one or more processors
  • one or more application programs wherein the one or more application programs are stored in memory and configured to be executed by the one or more processors, the one or more programs are configured to execute the application program of the first aspect of the present disclosure Test control methods.
  • a storage medium is provided on which a computer program is stored, and when the program is executed by a processor, the test control method for the application program of the first aspect of the present disclosure is implemented.
  • the present disclosure uses a pre-trained behavior prediction model, after receiving an automated test request for a target application, separates the semantic segmentation map of the currently accessed page and at least two consecutive historically accessed pages associated with the currently accessed page, and the The operation type and historical operation location map of operations performed on the page are input into the pre-trained behavior prediction model, and the target operation type and target operation location probability map on the currently accessed page are predicted, and then based on the operation type and operation location of the currently accessed page. A probability map that controls testing against currently visited pages of the target application. And then automatically drive the entire test process, improve test efficiency.
  • FIG. 1 is a schematic flowchart of a test control method for an application program provided by an embodiment of the present disclosure
  • FIG. 2 provides a set of access pages and their corresponding semantic segmentation graphs and heatmaps provided by an embodiment of the present disclosure
  • FIG. 3 is a schematic structural diagram of a behavior prediction model provided by an embodiment of the present disclosure.
  • FIG. 4 is a schematic flowchart of another application testing control method provided by an embodiment of the present disclosure.
  • FIG. 5 is a schematic diagram of a test control method for a group of application programs provided by an embodiment of the present disclosure
  • FIG. 6 is a schematic structural diagram of a test control device for an application program provided by an embodiment of the present disclosure
  • FIG. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure.
  • the term “including” and variations thereof are open-ended inclusions, ie, "including but not limited to”.
  • the term “based on” is “based at least in part on.”
  • the term “one embodiment” means “at least one embodiment”; the term “another embodiment” means “at least one additional embodiment”; the term “some embodiments” means “at least some embodiments”. Relevant definitions of other terms will be given in the description below.
  • the behavior prediction method, device, electronic device and storage medium provided by the present disclosure are intended to solve the above technical problems in the prior art.
  • An embodiment of the present disclosure provides a method for testing control of an application, as shown in FIG. 1 , the method includes:
  • Step S101 In response to the automated test request for the target application, obtain the semantic segmentation map of the currently accessed page and at least two consecutive historically accessed pages associated with the currently accessed page, and the historical operation type and history corresponding to each historically accessed page Operation location map.
  • a model can be constructed to imitate the user's behavioral operation, thereby automatically driving the entire testing process for the target application.
  • the input content of the model includes a semantic segmentation graph of the current visited page and at least two consecutive historically visited pages associated with the current visited page, and a graph of historical operation types and historical operation positions corresponding to each historically visited page.
  • the extraction process of the semantic segmentation map includes:
  • At least one image element type in the image includes: at least one element type in text, picture and button;
  • a semantic segmentation map is an image obtained by segmenting an image according to at least one image element type.
  • it can be implemented by a deep learning-based semantic segmentation method or a control based on the extensible markup language XML.
  • the parsing generates a semantic segmentation map of the currently accessed page or generates a semantic segmentation map of the historically accessed pages.
  • the historical operation type is the operation type of the user on the historically accessed page, such as the operation type of sliding, click and long press
  • the historical operation location map indicates the location of the user's operation on the historically accessed page.
  • FIG. 2(a) is the original access page
  • FIG. 2(b) is the semantic segmentation map corresponding to the access page, wherein, areas of different depths can represent different semantic segmentation areas,
  • Figure 2(c) is the operation position map corresponding to the access page, which can be represented by a heat map, which refers to a single-channel two-dimensional image ( Black and white picture), the picture shows the operation position of the visited page, that is, the position of the light spot.
  • Step S102 Input the semantic segmentation map, the historical operation type and the historical operation location map into the pre-trained behavior prediction model, and obtain the target operation type and target operation location probability map predicted by the behavior prediction model on the currently accessed page, and the target operation A location probability map is used to characterize the probability of performing a target action on a page location.
  • the user's behavior can be predicted through a pre-trained behavior prediction model, that is, the pre-trained behavior can be input by inputting the acquired semantic segmentation map of each accessed page, the historical operation type and historical operation location map for each historically accessed page.
  • the prediction model the operation type of the target operation that needs to be performed on the currently accessed page and the probability of performing the target operation on the page position can be predicted.
  • the pre-trained behavior prediction model includes a cascaded 3D convolutional neural network layer, an LSTM long short-term memory neural network layer, and an output layer, wherein,
  • the 3D convolutional neural network layer is used to extract the spatial information of at least two consecutively accessed pages and the timing information between each accessed page.
  • the input dimension of the model can be (4, 288, 160, 4), which is (4 different XML semantic segmentation areas, the height of the page is 288, the width of the page is 160, and the user visits 4 consecutive times) page).
  • the 3D convolutional neural network includes but is not limited to 3D convolution, nonlinear activation function, and 3D convolution stacking of downsampling layers, and the 3D convolution stacking can be used to extract the spatial information and time series included in the semantic segmentation image. information.
  • the spatial information represents the position and size relationship between each semantic segmentation area in the same page, which is helpful to infer the position of the operation in the page.
  • the operation on the page usually occurs when there are images or texts. position, usually do not operate in the blank of the page; and the timing information refers to the correlation between different consecutive pages, which helps to infer the type of operation taken in the page from the timing, for example, when 3 consecutive pages are used.
  • the operation types in the history page are all swiping up in the center, so based on the inference of the timing information, the operation types in the pages after 3 historical pages are likely to also swipe up in the center.
  • the LSTM long short-term memory neural network layer is used to learn the time series information of different scales in the spatial information.
  • an LSTM layer can also be connected from different scales to enhance the learning of timing information at different image scales.
  • Cross-layer connections at different image scales help to learn the changes in time series for small objects and global large objects, respectively.
  • the output layer is used to output the predicted operation type and operation position probability map.
  • the output layer for the operation type includes a fully connected layer and a normalization layer, and the fully connected layer can output the operation type predicted on the page.
  • the predicted operation type can be predicted and output at the full connection layer according to the historical operation type of the historically associated page and the association relationship between different consecutive pages included in the time sequence information, and output at the normalization layer.
  • Valid codes each valid code has its corresponding operation type result.
  • TransCNN: 1 and TransCNN: 3 in Figure 3 represent the predicted operation type direct output results and the normalized one-hot encoding, respectively.
  • the output layer of the operation position probability map includes an upsampling layer and a normalization layer. Specifically, the position and size relationship between each semantic region included in the spatial information is upsampled, and then normalized.
  • a normalization layer which predicts the output operation position probability map. It is understandable that since 3D convolution stacking is the process of reducing the image, and upsampling is the process of enlarging the image, it is possible to predict the output operation position probability map through upsampling corresponding to the number of 3D convolution stacking. .
  • the manner of upsampling in this embodiment of the present disclosure includes, but is not limited to, 2D deconvolution. And the position of the maximum point in the figure is the position where the operation is most likely to occur.
  • TransCNN and TransCNN: 2 in Figure 3 respectively represent the direct output result of the predicted operation position, that is, the position of the maximum probability value point, and the normalized operation position probability map.
  • Step S103 Control the test for the currently accessed page of the target application according to the target operation type and the target operation position probability map.
  • the test of the current page accessed by the target application can be controlled. Specifically, the position point with the largest probability value in the operation position probability map can be controlled. Execute the target action type to complete the test against the currently visited page.
  • the present disclosure uses a pre-trained behavior prediction model, after receiving an automated test request for a target application, separates the semantic segmentation map of the currently accessed page and at least two consecutive historically accessed pages associated with the currently accessed page, and the The operation type and historical operation location map of operations performed on the page are input into the pre-trained behavior prediction model, and the target operation type and target operation location probability map on the currently accessed page are predicted, and then based on the operation type and operation location of the currently accessed page. A probability map that controls testing against currently visited pages of the target application. And then automatically drive the entire test process, improve test efficiency.
  • controlling the test for the currently accessed page of the target application program includes:
  • the operation corresponding to the target operation type fails to be executed for the first page position, the operation corresponding to the target operation type is executed at the second page position of the currently accessed page of the target application until the operation is successfully executed, wherein the second page position is the position corresponding to the second probability value in the target operation position probability map, where the first probability value is greater than the second probability value.
  • the first page position corresponding to the first probability value in the target operation position probability map where the first probability value is the probability in the target operation probability value
  • the probability value with the largest value, the first page position corresponding to the first probability value is the position where the test operation is most likely to be performed, and the test is automatically completed by executing the corresponding operation based on the target operation type at the first page position of the currently accessed page.
  • the operation can be continued at the second page position of the currently accessed page, wherein the second page position refers to the probability value of the target operation position probability map with the next largest probability. The position corresponding to the value, and so on, to ensure that the operation is performed successfully.
  • a pre-built behavior prediction model can also be used to simulate the actual operation behavior of the user, so as to perform large-scale automated testing on the application without human intervention.
  • a pre-built behavior prediction model can be deployed on the test server, and according to the semantic segmentation map of the first target access page D and the consecutive historically accessed pages A, B and C, and the operation types of the historically accessed pages A, B and C And the operation position probability map predicts the first target operation type and the first operation position probability map on the first target access page D, and then predicts the second target access according to the behavior data of the historical access pages B, C and the first target page D. The second target operation type and the second operation position probability map on page E. The cycle continues until the end of the entire test, and large-scale automated testing is completed through automated interactive operations.
  • the semantic segmentation map, the historical operation type and the historical operation location map are input into the pre-trained behavior prediction model, and the behavior prediction model predicts the current access page.
  • the target action type and target action position probability map which is used to represent the probability of executing the target action on the page position, including:
  • Step S401 Extract the first spatial information of the currently visited page and each historically visited page by using the 3D convolutional neural network in the behavior prediction model, wherein the first spatial information includes the position between each semantic segmentation area in each visited page relationship and size.
  • Step S402 Using the 3D convolutional neural network in the behavior prediction model to extract the first time sequence information between the currently accessed page and each historically accessed page, the first time sequence information includes the first time sequence information between each accessed page determined according to the appearance sequence of the accessed pages. an association relationship.
  • the 3D convolutional neural network includes but is not limited to 3D convolution, nonlinear activation function and 3D convolution stacking of downsampling layers.
  • the 3D convolutional neural network can be used to extract the first spatial information of the currently accessed page and each historically accessed page, and the first time series information between the currently accessed page and each historically accessed page.
  • the first spatial information represents the position and size relationship between each semantic segmentation area in the same page, which is helpful to infer the position of the operation in the page. It can be understood that the operation on the page usually occurs when there are images or images. Where there is text, operations are usually not performed on the margins of the page. By extracting the first space information of the currently visited page and each historically visited page, it is helpful to infer the position where the operation occurred in the currently visited page.
  • the first timing information refers to the correlation between different consecutive pages, which is helpful to infer the type of operations taken in the pages from the timing.
  • the types of operations in three consecutive historical pages are located in the center Swipe up, then based on the inference of time series information, the operation type in the page after 3 historical pages is likely to also swipe up from the center.
  • Step S403 Use the LSTM long short-term memory network in the behavior prediction model to learn the second time series information of each accessed page included in the first spatial information, where the second time series information includes the second association relationship between the accessed pages on different scales.
  • an LSTM layer can also be connected from different scales to enhance the learning of the second time series information on different image scales. It can be understood that when the number of 3D convolution stacks is small, the dimension of the second time series information learned by the LSTM long short-term memory network is small, which can reflect the more detailed information in the semantic segmentation image, such as the locked semantic segmentation area. The range is getting smaller and smaller; and when the number of 3D convolution stacks is large, the dimensions of the extracted spatial information and time series information are larger, which can reflect the global information in the semantically segmented image. Cross-layer connections at different image scales help to learn the changes in time series for small objects and global large objects, respectively.
  • Step S404 Output the target operation type on the currently accessed page by using the first association relationship between the accessed pages, or the second association relationship between the accessed pages on different scales.
  • the target operation type on the currently accessed page can be output by using the association relationship between the visited pages and the association relationship between the different scales between the visited pages.
  • the predicted target operation type can be output according to the historical operation types in the historically accessed pages and the association relationship between the accessed pages at different scales.
  • the target operation type on the currently accessed page is output by using the first association relationship between the accessed pages or the second association relationship between the accessed pages on different scales, including:
  • an effective one-bit code can be output, and the operation type corresponding to the one-bit effective code can be determined as the target operation type of the currently accessed page.
  • each valid code corresponds to an operation.
  • the output valid code is [1,0,0,0,0,0]
  • the output target operation type is a click operation
  • the valid one-bit code of the output is [0,1,0,0,0,0,0]
  • the target operation type of the output is a long press operation
  • the valid one-bit code of the output is [0,0,1, 0,0,0,0]
  • the output target operation type is left-swipe operation
  • the output one-bit valid code is [0,0,0,1,0,0,0]
  • the output target operation type It is a right-swipe operation.
  • the output target operation type is the up-sliding operation, and when the valid one-bit code of the output is [0] ,0,0,0,0,1,0], the output target operation type is sliding operation, and when the valid code of the output is [0,0,0,0,0,0,1], the output
  • the target operation type of is a return operation.
  • Step S405 output the target operation position probability map on the currently accessed page by using the positional relationship and size relationship between the current accessed page and each image segmented area in each historically accessed page.
  • the positional relationship and size relationship between each image segmented region in each accessed page are up-sampled, and then normalized to output a target operation position probability map.
  • the upsampling since the 3D convolution stacking is the process of reducing the image, and the upsampling is the process of enlarging the image, the upsampling corresponding to the number of 3D convolution stacking can be performed to predict the output operation position probability map.
  • the manner of upsampling in this embodiment of the present disclosure includes, but is not limited to, 2D deconvolution.
  • the position of the point with the maximum probability value in the operation position probability map is the position where the operation is most likely to occur.
  • a semantic segmentation map of the currently accessed page and at least two consecutive historically accessed pages associated with the currently accessed page, and the correspondence to each historically accessed page are obtained
  • the historical operation type and historical operation location map of including:
  • the semantic segmentation map of the currently accessed page and three consecutive historically accessed pages associated with the currently accessed page and the historical operation type and historical operation location map corresponding to each historically accessed page are obtained.
  • the embodiment of the present disclosure finds that predicting the operation situation on the next page based on the operation situation of three consecutive historically accessed pages can find a balance between prediction efficiency and prediction accuracy. Improve the prediction efficiency as much as possible under the condition of prediction accuracy, thereby improving the testing efficiency of the application.
  • Figs. 5(a) to 5(c) are semantic segmentation diagrams corresponding to three consecutive historically accessed pages, in which regions with different depths represent text regions, picture regions, and button regions, etc., respectively. And the light point in the figure represents the operation position on the historically accessed page.
  • Figure 5(d) is the semantic segmentation diagram corresponding to the currently accessed page.
  • Figures 5(a) to 5(d) and 5(a) to The historical operation type corresponding to Fig. 5(c) is input into the pre-trained behavior prediction model, and the output result is the heat map in Fig. 5(e) and a one-hot code.
  • the image refers to a single-channel two-dimensional image (black and white image), the value in the image represents the thermal value (in a single-channel image, that is, the brightness value), the center of the bright spot in the image is the brightest, and the thermal value is the highest, that is The probability value is the highest, and the bright spot position is the predicted position where the operation needs to be performed; the one-hot encoding indicates the target operation type of the operation on the currently accessed page.
  • the test is done automatically by automating the operation of the target operation type at the spot location.
  • test control device 60 for the application program may include: a first acquisition module 601 , a second acquisition module 602 and a control module 603 , wherein,
  • the first obtaining module 601 is configured to obtain, in response to an automated test request for a target application, a currently accessed page and a semantic segmentation map of at least two consecutive historically accessed pages associated with the currently accessed page, as well as the semantic segmentation map corresponding to each historically accessed page. Historical operation type and historical operation location diagram.
  • a model can be constructed to imitate the user's behavioral operation, thereby automatically driving the entire testing process for the target application.
  • the input content of the model includes a semantic segmentation graph of the current visited page and at least two consecutive historically visited pages associated with the current visited page, and a graph of historical operation types and historical operation positions corresponding to each historically visited page.
  • the second acquisition module 602 is configured to input the semantic segmentation map, the historical operation type and the historical operation location map into the pre-trained behavior prediction model, and acquire the target operation type and target operation location on the currently accessed page predicted by the behavior prediction model Probability Map, Target Action Location
  • the probability map is used to characterize the probability of performing a target action on a page location.
  • the user's behavior can be predicted through a pre-trained behavior prediction model, that is, the pre-trained behavior can be input by inputting the acquired semantic segmentation map of each accessed page, the historical operation type and historical operation location map for each historically accessed page.
  • the prediction model the operation type of the target operation that needs to be performed on the currently accessed page and the probability of performing the target operation on the page position can be predicted.
  • the control module 603 is configured to control the test for the currently accessed page of the target application according to the target operation type and the target operation position probability map.
  • the test of the current page accessed by the target application can be controlled. Specifically, the position point with the largest probability value in the operation position probability map can be controlled. Execute the target action type to complete the test against the currently visited page.
  • the present disclosure uses a pre-trained behavior prediction model, after receiving an automated test request for a target application, separates the semantic segmentation map of the currently accessed page and at least two consecutive historically accessed pages associated with the currently accessed page, and the The operation type and historical operation location map of operations performed on the page are input into the pre-trained behavior prediction model, and the target operation type and target operation location probability map on the currently accessed page are predicted, and then based on the operation type and operation location of the currently accessed page. A probability map that controls testing against currently visited pages of the target application. And then automatically drive the entire test process, improve test efficiency.
  • FIG. 7 it shows a schematic structural diagram of an electronic device 700 suitable for implementing an embodiment of the present disclosure.
  • the electronic devices in the embodiments of the present disclosure may include, but are not limited to, such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablets), PMPs (portable multimedia players), vehicle-mounted terminals (eg, mobile terminals such as in-vehicle navigation terminals), etc., and stationary terminals such as digital TVs, desktop computers, and the like.
  • the electronic device shown in FIG. 7 is only an example, and should not impose any limitation on the function and scope of use of the embodiments of the present disclosure.
  • the electronic device includes: a memory and a processor, wherein the processor here may be referred to as a processing device 701 described below, and the memory may include a read-only memory (ROM) 702, a random access memory (RAM) 703, and a storage device hereinafter At least one of 708 as follows:
  • ROM read-only memory
  • RAM random access memory
  • an electronic device 700 may include a processing device (eg, a central processing unit, a graphics processor, etc.) 701 that may be loaded into random access according to a program stored in a read only memory (ROM) 702 or from a storage device 708 Various appropriate actions and processes are executed by the programs in the memory (RAM) 703 . In the RAM 703, various programs and data required for the operation of the electronic device 700 are also stored.
  • the processing device 701, the ROM 702, and the RAM 703 are connected to each other through a bus 704.
  • An input/output (I/O) interface 705 is also connected to bus 704 .
  • I/O interface 705 the following devices can be connected to the I/O interface 705: input devices 706 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; including, for example, a liquid crystal display (LCD), speakers, vibration An output device 707 of a computer, etc.; a storage device 708 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 709. Communication means 709 may allow electronic device 700 to communicate wirelessly or by wire with other devices to exchange data.
  • FIG. 7 shows an electronic device 700 having various means, it should be understood that not all of the illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
  • embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer readable medium, the computer program containing program code for performing the method illustrated in the flowchart.
  • the computer program may be downloaded and installed from the network via the communication device 709, or from the storage device 708, or from the ROM 702.
  • the processing device 701 the above-mentioned functions defined in the methods of the embodiments of the present disclosure are executed.
  • the above-mentioned computer-readable storage medium of the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the above two.
  • the computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or a combination of any of the above.
  • Computer readable storage media may include, but are not limited to, electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), erasable Programmable read only memory (EPROM or flash memory), fiber optics, portable compact disk read only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
  • RAM random access memory
  • ROM read only memory
  • EPROM or flash memory erasable Programmable read only memory
  • CD-ROM compact disk read only memory
  • optical storage devices magnetic storage devices, or any suitable combination of the foregoing.
  • a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
  • a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave with computer-readable program code embodied thereon. Such propagated data signals may take a variety of forms including, but not limited to, electromagnetic signals, optical signals, or any suitable combination of the foregoing.
  • a computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device .
  • Program code embodied on a computer readable medium may be transmitted using any suitable medium including, but not limited to, electrical wire, optical fiber cable, RF (radio frequency), etc., or any suitable combination of the foregoing.
  • the client and server can use any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol) to communicate, and can communicate with digital data in any form or medium Communication (eg, a communication network) interconnects.
  • HTTP HyperText Transfer Protocol
  • Examples of communication networks include local area networks (“LAN”), wide area networks (“WAN”), the Internet (eg, the Internet), and peer-to-peer networks (eg, ad hoc peer-to-peer networks), as well as any currently known or future development network of.
  • the above-mentioned computer-readable medium may be included in the above-mentioned electronic device; or may exist alone without being assembled into the electronic device.
  • the above-mentioned computer-readable medium carries one or more programs, and when the above-mentioned one or more programs are executed by the electronic device, the electronic device causes the electronic device to: Historical behavior data corresponding to the target page, wherein the historical behavior data includes a historical page before the target page or at least two consecutive historical pages before the target page, and historical operation behavior on each historical page Or, the above-mentioned computer-readable medium carries one or more programs, and when the above-mentioned one or more programs are executed by the electronic device, the electronic device:
  • Computer program code for performing operations of the present disclosure may be written in one or more programming languages, including but not limited to object-oriented programming languages—such as Java, Smalltalk, C++, and This includes conventional procedural programming languages - such as the "C" language or similar programming languages.
  • the program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server.
  • the remote computer may be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (eg, using an Internet service provider via Internet connection).
  • LAN local area network
  • WAN wide area network
  • Internet service provider via Internet connection
  • each block in the flowchart or block diagrams may represent a module, segment, or portion of code that contains one or more functions for implementing the specified logical function(s) executable instructions.
  • the functions noted in the blocks 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.
  • each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations can be implemented in dedicated hardware-based systems that perform the specified functions or operations , or can be implemented in a combination of dedicated hardware and computer instructions.
  • the modules or units involved in the embodiments of the present disclosure may be implemented in software or hardware. Among them, the name of the module or unit does not constitute a limitation of the unit itself under certain circumstances.
  • exemplary types of hardware logic components include: Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), Systems on Chips (SOCs), Complex Programmable Logical Devices (CPLDs) and more.
  • FPGAs Field Programmable Gate Arrays
  • ASICs Application Specific Integrated Circuits
  • ASSPs Application Specific Standard Products
  • SOCs Systems on Chips
  • CPLDs Complex Programmable Logical Devices
  • a machine-readable medium may be a tangible medium that may contain or store a program for use by or in connection with the instruction execution system, apparatus or device.
  • the machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium.
  • Machine-readable media may include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or devices, or any suitable combination of the foregoing.
  • machine-readable storage media would include one or more wire-based electrical connections, portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM or flash memory), fiber optics, compact disk read only memory (CD-ROM), optical storage, magnetic storage, or any suitable combination of the foregoing.
  • RAM random access memory
  • ROM read only memory
  • EPROM or flash memory erasable programmable read only memory
  • CD-ROM compact disk read only memory
  • magnetic storage or any suitable combination of the foregoing.
  • a test control method for an application including:
  • the pre-trained behavior prediction model includes a cascaded 3D convolutional neural network layer, an LSTM long short-term memory neural network layer, and an output layer; wherein,
  • the 3D convolutional neural network layer is used to extract the spatial information of at least two consecutively accessed pages and the timing information between each accessed page;
  • the LSTM long short-term memory neural network layer is used to learn the time series information of different scales in the spatial information
  • the output layer is used to output the predicted action type and action location probability map.
  • the semantic segmentation map, the historical operation type and the historical operation location map are input into the pre-trained behavior prediction model, and the target operation type and target operation on the currently accessed page predicted by the behavior prediction model are obtained.
  • the location probability map, the target operation location probability map is used to represent the probability of performing the target operation on the page location, including:
  • the 3D convolutional neural network in the behavior prediction model is used to extract the first spatial information of the currently visited page and each historically visited page, wherein the first spatial information includes the positional relationship and size of each semantic segmentation area in each visited page relation;
  • the 3D convolutional neural network in the behavior prediction model is used to extract the first time series information between the currently accessed page and each historically accessed page, where the first time series information includes the first association relationship between the accessed pages determined according to the appearance time sequence of the accessed pages ;
  • the LSTM long short-term memory network in the behavior prediction model to learn the second time series information of each access page included in the first spatial information, and the second time series information includes the second association relationship between the access pages on different scales;
  • the target operation position probability map on the currently visited page is output by using the positional relationship and size relationship between the current visited page and each image segmented area in each historically visited page.
  • a semantic segmentation map of the currently accessed page and at least two consecutive historically accessed pages associated with the currently accessed page, and the correspondence to each historically accessed page are obtained
  • the historical operation type and historical operation location map of including:
  • the semantic segmentation map of the currently accessed page and three consecutive historically accessed pages associated with the currently accessed page and the historical operation type and historical operation location map corresponding to each historically accessed page are obtained.
  • controlling the test for the currently accessed page of the target application program includes:
  • the operation corresponding to the target operation type fails to be executed for the first page position, the operation corresponding to the target operation type is executed at the second page position of the currently accessed page of the target application until the operation is successfully executed, wherein the second page position is the target operation
  • the first probability value is greater than the second probability value.
  • the extraction process of the semantic segmentation map includes:
  • Obtain at least one image element type in the image and the at least one image element type includes: at least one element type in text, picture and button;
  • a test control device for an application program including:
  • the first obtaining module is used to obtain the semantic segmentation map of the currently accessed page and at least two consecutive historically accessed pages associated with the currently accessed page and the history corresponding to each historically accessed page in response to an automated test request for the target application Operation type and historical operation location map;
  • the second acquisition module is used to input the semantic segmentation map, the historical operation type and the historical operation location map into the pre-trained behavior prediction model, and obtain the target operation type and target operation location probability predicted by the behavior prediction model on the currently accessed page.
  • Graph, the target operation position probability graph is used to represent the probability of executing the target operation on the page position;
  • the control module is used for controlling the test of the currently accessed page of the target application according to the target operation type and the target operation position probability map.
  • the pre-trained behavior prediction model includes a cascaded 3D convolutional neural network layer, an LSTM long short-term memory neural network layer, and an output layer; wherein,
  • the 3D convolutional neural network layer is used to extract the spatial information of at least two consecutively accessed pages and the timing information between each accessed page;
  • the LSTM long short-term memory neural network layer is used to learn the time series information of different scales in the spatial information
  • the output layer is used to output the predicted action type and action location probability map.
  • the second acquisition module includes:
  • the first extraction sub-module is used to extract the first spatial information of the currently visited page and each historically visited page by using the 3D convolutional neural network in the behavior prediction model, wherein the first spatial information includes each semantic segmentation in each visited page The positional relationship and size relationship between regions;
  • the second extraction sub-module is used to extract the first time series information between the currently accessed page and each historically accessed page by using the 3D convolutional neural network in the behavior prediction model.
  • the learning submodule is used to learn the second time series information of each access page included in the first spatial information by using the LSTM long short-term memory network in the behavior prediction model, and the second time series information includes the second time series information on different scales between the access pages. connection relation;
  • a first output sub-module configured to output the target operation type on the currently accessed page by utilizing the first association relationship between the access pages, or the second association relationship between the access pages on different scales;
  • the second output sub-module is configured to output the target operation position probability map on the currently visited page by using the positional relationship and size relationship between the current visited page and each image segmented area in each historically visited page.
  • the first acquisition module includes: a first acquisition sub-module, configured to acquire the currently accessed page and three consecutive pages associated with the currently accessed page in response to an automated test request for the target application Semantic segmentation map of historically accessed pages and a map of historical operation types and historical operation locations corresponding to each historically accessed page.
  • control module includes: an acquisition sub-module for acquiring the first page position corresponding to the first probability value in the target operation position probability map; a first execution sub-module for in the target application program The first page position of the currently accessed page performs the operation corresponding to the target operation type; the second execution submodule is used to perform the operation corresponding to the target operation type for the first page position. Execute the operation corresponding to the target operation type on the second page position until the operation is successfully executed, wherein the second page position is the position corresponding to the second probability value in the target operation position probability map, and the first probability value is greater than the second probability value.
  • the process of extracting the semantic segmentation map includes: acquiring at least one image element type in the image, and the at least one image element type includes: at least one element type among text, picture, and button; At least one image element type is used to segment the image to obtain a semantic segmentation map.
  • an electronic device comprising one or more processors; a memory; one or more application programs, wherein the one or more application programs are stored in the memory and configured For execution by one or more processors, one or more programs are configured to execute the test control method of the application of the present disclosure.
  • a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, implements the test control method of the application program of the present disclosure.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Biomedical Technology (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Artificial Intelligence (AREA)
  • Biophysics (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Image Analysis (AREA)
  • Machine Translation (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

提供一种应用程序的测试控制方法、装置、电子设备及存储介质,该方法包括:响应于针对目标应用程序的自动化测试请求,获取当前访问页面及与当前访问页面相关联的至少两个连续历史访问页面的语义分割图及每一历史访问页面对应的历史操作类型及历史操作位置图;将语义分割图、历史操作类型及历史操作位置图输入预先训练的行为预测模型中,获取行为预测模型预测出的在当前访问页面上的目标操作类型和目标操作位置概率图;根据目标操作类型和目标操作位置概率图,控制针对目标应用程序的当前访问页面的测试。

Description

应用程序的测试控制方法、装置、电子设备及存储介质
相关申请的交叉引用
本申请要求于2021年1月15日提交的,申请名称为“应用程序的测试控制方法、装置、电子设备及存储介质”的、中国专利申请号为“202110055289.7”的优先权,该中国专利申请的全部内容通过引用结合在本申请中。
技术领域
本公开涉及自动化测试技术领域,具体而言,本公开涉及一种应用程序的测试控制方法、装置、电子设备及存储介质。
背景技术
应用程序测试是一项常见且基础的测试工作,其方法有人工测试,脚本测试。目前人工测试应用程序的成本高昂且效率低下,且部分测试路径和用户真实使用习惯脱节但是成本高且效率低下;脚本测试需要人工编写脚本,且对于复杂的应用程序来说难以实现和维护。
技术解决方案
本公开提供了一种应用程序的测试控制方法、装置、电子设备及存储介质,可以解决自动化测试的问题。技术方案如下:
第一方面,提供了一种应用程序测试控制的方法,该方法包括:
响应于针对目标应用程序的自动化测试请求,获取当前访问页面及与当前访问页面相关联的至少两个连续历史访问页面的语义分割图及每一历史访问页面对应的历史操作类型及历史操作位置图;
将语义分割图、历史操作类型及历史操作位置图输入预先训练的行为预测模型中,获取行为预测模型预测出的在当前访问页面上的目标操作类型和目标操作位置概率图,目标操作位置概率图用于表征在页面位置上执行目标操作的概率;
根据目标操作类型和目标操作位置概率图,控制针对目标应用程序的当前访问页面的测试。
第二方面,提供了一种应用程序的测试控制装置,该装置包括:
第一获取模块,用于响应于针对目标应用程序的自动化测试请求,获取当前访问页面及与当前访问页面相关联的至少两个连续历史访问页面的语义分割图及每一历史访问页面对应的历史操作类型及历史操作位置图;
第二获取模块,用于将语义分割图、历史操作类型及历史操作位置图输入预先训练的行为预测模型中,获取行为预测模型预测出的在当前访问页面上的目标操作类型和目标操作位置概率图,目标操作位置概率图用于表征在页面位置上执行目标操作的概率;
控制模块,用于根据目标操作类型和目标操作位置概率图,控制针对目标应用程序的当前访问页面的测试。
第三方面,提供了一种电子设备,该电子设备包括:
一个或多个处理器;
存储器;
一个或多个应用程序,其中一个或多个应用程序被存储在存储器中并被配置为由一个或多个处理器执行,一个或多个程序配置用于执行本公开第一方面的应用程序的测试控制方法。
第四方面,提供了一种存储介质,其上存储有计算机程序,该程序被处理器执行时实现本公开第一方面的应用程序的测试控制方法。
本公开提供的技术方案带来的有益效果是:
本公开通过预先训练的行为预测模型,在接收到针对目标应用程序的自动化测试请求后,将当前访问页面及与当前访问页面相关联的至少两个连续历史访问页面的语义分割图、在历史访问页面上进行操作的操作类型和历史操作位置图输入预先训练的行为预测模型中,预测出在当前访问页面上的目标操作类型和目标操作位置概率图,然后基于当前访问页面的操作类型和操作位置概率图,控制针对目标应用程序的当前访问页面的测试。进而自动化地驱动整个测试流程,提高测试效率。
附图说明
结合附图并参考以下具体实施方式,本公开各实施例的上述和其他特征、优点及方面将变得更加明显。贯穿附图中,相同或相似的附图标记表示相同或相似的元素。应当理解附图是示意性的,原件和元素不一定按照比例绘制。
图1为本公开实施例提供的一种应用程序的测试控制方法的流程示意图;
图2为本公开实施例提供的一组访问页面及其对应的语义分割图与热力图;
图3为本公开实施例提供的一种行为预测模型的结构示意图;
图4为本公开实施例提供的另一种应用程序的测试控制方法的流程示意图;
图5为本公开实施例提供的一组应用程序的测试控制方法的示意图;
图6为本公开实施例提供的一种应用程序的测试控制装置的结构示意图;
图7为本公开实施例提供的一种的电子设备的结构示意图。
具体实施方式
下面将参照附图更详细地描述本公开的实施例。虽然附图中显示了本公开的某些实施例,然而应当理解的是,本公开可以通过各种形式来实现,而且不应该被解释为限于这里阐述的实施例,相反提供这些实施例是为了更加透彻和完整地理解本公开。应当理解的是,本公开的附图及实施例仅用于示例性作用,并非用于限制本公开的保护范围。
应当理解,本公开的方法实施方式中记载的各个步骤可以按照不同的顺序执行,和/或并行执行。此外,方法实施方式可以包括附加的步骤和/或省略执行示出的步骤。本公开的范围在此方面不 受限制。
本文使用的术语“包括”及其变形是开放性包括,即“包括但不限于”。术语“基于”是“至少部分地基于”。术语“一个实施例”表示“至少一个实施例”;术语“另一实施例”表示“至少一个另外的实施例”;术语“一些实施例”表示“至少一些实施例”。其他术语的相关定义将在下文描述中给出。
需要注意,本公开中提及的“第一”、“第二”等概念仅用于对装置、模块或单元进行区分,并非用于限定这些装置、模块或单元一定为不同的装置、模块或单元,也并非用于限定这些装置、模块或单元所执行的功能的顺序或者相互依存关系。
需要注意,本公开中提及的“一个”、“多个”的修饰是示意性而非限制性的,本领域技术人员应当理解,除非在上下文另有明确指出,否则应该理解为“一个或多个”。
本公开实施方式中的多个装置之间所交互的消息或者信息的名称仅用于说明性的目的,而并不是用于对这些消息或信息的范围进行限制。
为使本公开的目的、技术方案和优点更加清楚,下面将结合附图对本公开实施方式作进一步地详细描述。
本公开提供的行为预测方法、装置、电子设备和存储介质,旨在解决现有技术的如上技术问题。
下面以具体地实施例对本公开的技术方案以及本公开的技术方案如何解决上述技术问题进行详细说明。下面这几个具体的实施例可以相互结合,对于相同或相似的概念或过程可能在某些实施例中不再赘述。下面将结合附图,对本公开的实施例进行描述。
本公开实施例中提供了一种应用程序的测试控制的方法,如图1所示,该方法包括:
步骤S101:响应于针对目标应用程序的自动化测试请求,获取当前访问页面及与当前访问页面相关联的至少两个连续历史访问页面的语义分割图及每一历史访问页面对应的历史操作类型及历史操作位置图。
其中,可以通过构建一个模型来模仿用户的行为操作,从而自动化地驱动针对目标应用程序的整个测试过程。在接收到针对目标应用程序的自动化测试请求后,可以获取模型的输入内容。模型的输入内容包括当前访问页面及与当前访问页面相关联的至少两个连续历史访问页面的语义分割图及每一历史访问页面对应的历史操作类型及历史操作位置图。
在本公开的一个实施例中,语义分割图的提取过程包括:
(1)获取图像中的至少一种图像元素类型,至少一种图像元素类型包括:文字、图片和按钮中的至少一种元素类型;
(2)按照至少一种图像元素类型对图像进行分割,得到语义分割图。
可以理解的是,语义分割图是将图像按照至少一种图像元素类型进行图像分割后的图像,在实际应用过程中,可以通过基于深度学习的语义分割方法或基于可扩展标记语言XML中控件的解析生成当前访问页面的语义分割图或者生成历史访问页面的语义分割图。
其中,历史操作类型为用户针对历史访问页面的操作类型,比如滑动、点击及长按等操作类型,历史操作位置图表明了用户针对历史访问页面进行操作的位置。
如图2所示,示例性的,图2(a)为原始的访问页面,图2(b)为该访问页面对应的语义分割图,其中,不同深度的区域可以代表不同的语义分割区域,比如文字语义分割区域、图片语义分割区域或者按钮语义分割区域,图2(c)为该访问页面对应的操作位置图,具体可以使用热力图表示,热力图是指一个单通道的二维图像(黑白图),图中展示了对该访问页面的操作位置,即光点位置。
步骤S102:将语义分割图、历史操作类型及历史操作位置图输入预先训练的行为预测模型中,获取行为预测模型预测出的在当前访问页面上的目标操作类型和目标操作位置概率图,目标操作位置概率图用于表征在页面位置上执行目标操作的概率。
可以理解的是,可以通过预先训练的行为预测模型预测用户的行为,即通过将获取的各访问页面的语义分割图、针对每一历史访问页面历史操作类型及历史操作位置图输入预先训练的行为预测模型中,可以预测出在当前访问页面上需要执行的目标操作的操作类型,及在页面位置上执行目标操作的概率。
在本公开的一个实施例中,如图3所示,预先训练的行为预测模型包括级联的3D卷积神经网络层、LSTM长短期记忆神经网络层以及输出层,其中,
(1)3D卷积神经网络层用于提取至少两个连续访问页面的空间信息及各访问页面之间的时序信息。
首先需要说明的是,示例性的,对于模型的输入维度可以是(4,288,160,4),即为(4个不同的XML语义分割区域,页面的高288,页面的宽160,用户连续4个访问页面)。
可以理解的是,3D卷积神经网络中包括但不限于3D卷积、非线性激活函数及下采样层的3D卷积堆叠,可以利用3D卷积堆叠提取语义分割图像中包括的空间信息和时序信息。
其中,空间信息表示在同一页面内各个语义分割区域之间的位置和大小关系,有助于推断在页面中发生操作的位置,可以理解的是,针对页面的操作通常发生在有图像或有文字的位置,通常不会在页面的空白处进行操作;而时序信息是指不同连续页面之间的关联性,有助于从时序上推断页面中采取的操作类型,示例性的,当连续3个历史页面中的操作类型都是位于正中心的上滑,那么基于时序信息的推断,3个历史页面后的页面中的操作类型很有可能也是正中心上滑。
(2)LSTM长短期记忆神经网络层用于学习空间信息中的不同尺度的时序信息。
其中,在使用3D卷积提取空间信息和时序信息后,还可以从不同的尺度连接一个LSTM层,用于加强在不同图像尺度上的时序信息的学习。不同图像尺度的跨层连接有助于分别学习小目标以及全局大目标在时序中的变化。
可以理解的是,当3D卷积堆叠的数目不多时,提取的空间信息和时序信息的维度较小,可以反映语义分割图像中较为细节的信息,比如锁定的各语义分割单元的范围越来越小;而当3D卷积堆叠的数目较多时,提取的空间信息和时序信息的维度较大,可以反映语以分割图像中的全局信息。
(3)输出层用于输出预测的操作类型和操作位置概率图。
其中,针对操作类型的输出层包括全连接层及归一化层,可以在全连接层输出在页面上预测的操作类型。具体的,在实际应用过程中,可以根据历史关联页面的历史操作类型和时序信息中包括的不同连续页面之间的关联关系在全连接层预测输出预测的操作类型,并在归一化层输出有效编码,每一有效编码均有其对应的操作类型结果。其中,图3中的TransCNN:1和TransCNN:3分别代表了预测的操作类型直接输出结果,以及经过归一化后的one-hot编码。
其中,操作位置概率图的输出层包括上采样层与归一化层,具体的,将空间信息中包括的在每一页面内各个语义区域之间的位置和大小关系进行上采样,然后经过归一化层,预测输出操作位置概率图。可以理解的是,由于3D卷积堆叠是将图像进行缩小的过程,上采样是将图像进行放大的过程,因此可以经过与3D卷积堆叠的数目相对应的上采样,预测输出操作位置概率图。本公开实施例对于上采样的方式包括但不限于2D反卷积。并且图中最大值点所在的位置,即为操作最有可能发生的位置。其中,图3中的TransCNN和TransCNN:2分别代表了预测的操作位置的直接输出结果,即概率值最大点所在的位置,以及经过归一化后的操作位置概率图。
步骤S103:根据目标操作类型和目标操作位置概率图,控制针对目标应用程序的当前访问页面的测试。
可以理解的是,当获取了针对当前访问页面的操作类型和操作位置概率图后,可以控制针对目标应用程序当前访问页面的测试,具体的,可以在操作位置概率图中概率值最大的位置点执行目标操作类型以完成针对当前访问页面的测试。
本公开通过预先训练的行为预测模型,在接收到针对目标应用程序的自动化测试请求后,将当前访问页面及与当前访问页面相关联的至少两个连续历史访问页面的语义分割图、在历史访问页面上进行操作的操作类型和历史操作位置图输入预先训练的行为预测模型中,预测出在当前访问页面上的目标操作类型和目标操作位置概率图,然后基于当前访问页面的操作类型和操作位置概率图,控制针对目标应用程序的当前访问页面的测试。进而自动化地驱动整个测试流程,提高测试效率。
在本公开的一个实施例中,根据目标操作类型和目标操作位置概率图,控制针对目标应用程序的当前访问页面的测试,包括:
(1)获取目标操作位置概率图中第一概率值对应的第一页面位置。
(2)在目标应用程序的当前访问页面的第一页面位置执行目标操作类型对应的操作。
(3)若针对第一页面位置执行目标操作类型对应的操作失败,在目标应用程序的当前访问页面的第二页面位置执行目标操作类型对应的操作,直至操作执行成功,其中,第二页面位置为目标操作位置概率图中第二概率值对应的位置,第一概率值大于第二概率值。
当获取了针对当前访问页面的操作类型和操作位置概率图后,可以继续获取目标操作位置概率图中第一概率值对应的第一页面位置,其中,第一概率值为目标操作概率值中概率值最大的概率值,第一概率值对应的第一页面位置为最有可能执行测试操作的位置,通过在当前访问页面的第一页面位置执行基于目标操作类型对应的操作,以自动化完成测试。
可以理解的是,若在第一页面位置执行操作失败时,可以在当前访问页面的第二页面位置继续执行该操作,其中,第二页面位置指概率值为目标操作位置概率图次大的概率值对应的位置,如此循环,以保证操作执行成功。
在本公开的一个实施例中,还可以通过预先构建的行为预测模型模拟用户的实际操作行为,从而对应用程序进行大规模自动化测试,且不需要人为的干预。具体的,可以将预先构建的行为预测模型部署在测试服务器,根据第一目标访问页面D及连续的历史访问页面A、B及C的语义分割图、历史访问页面A、B及C的操作类型及操作位置概率图预测在第一目标访问页面D的第一目标操作类型及第一操作位置概率图,然后根据历史访问页面B、C及第一目标页面D的行为数据预测在第二目标访问页面E上的第二目标操作类型及第二操作位置概率图。一直循环直至整个测试结束,通过自动化的交互操作,完成大规模的自动化测试。
在本公开的一个实施例中,如图4所示,将语义分割图、历史操作类型及历史操作位置图输入预先训练的行为预测模型中,获取行为预测模型预测出的在当前访问页面上的目标操作类型和目标操作位置概率图,目标操作位置概率图用于表征在页面位置上执行目标操作的概率,包括:
步骤S401:利用行为预测模型中的3D卷积神经网络提取当前访问页面及每一历史访问页面的第一空间信息,其中,第一空间信息包括每一访问页面中各个语义分割区域之间的位置关系和大小关系。
步骤S402:利用行为预测模型中的3D卷积神经网络提取当前访问页面和各历史访问页面之间的第一时序信息,第一时序信息包括根据访问页面出现时序确定的各访问页面之间的第一关联关系。
其中,3D卷积神经网络中包括但不限于3D卷积、非线性激活函数及下采样层的3D卷积堆叠。可以利用3D卷积神经网络提取当前访问页面及每一历史访问页面的第一空间信息、当前访问页面和各历史访问页面之间的第一时序信息。
其中,第一空间信息表示在同一页面内各个语义分割区域之间的位置和大小关系,有助于推断在页面中发生操作的位置,可以理解的是,针对页面的操作通常发生在有图像或有文字的位置,通常不会在页面的空白处进行操作。通过提取当前访问页面及每一历史访问页面的第一空间信息,有助于推断在当前访问页面中发生操作的位置。
而第一时序信息是指不同连续页面之间的关联性,有助于从时序上推断页面中采取的操作类型,示例性的,当连续3个历史页面中的操作类型都是位于正中心的上滑,那么基于时序信息的推断,3个历史页面后的页面中的操作类型很有可能也是正中心上滑。通过提取当前访问页面和各历史访问页面之间的第一时序信息,有助于推断当前访问页面中发生的操作类型。
步骤S403:利用行为预测模型中的LSTM长短期记忆网络学习第一空间信息中包括的各访问页面的第二时序信息,第二时序信息包括各访问页面之间不同尺度上的第二关联关系。
其中,在使用3D卷积网络提取第一空间信息和第一时序信息后,还可以从不同的尺度连接一个LSTM层,用于加强在不同图像尺度上的第二时序信息的学习。可以理解的是,当3D卷积堆叠的数目不多时,LSTM长短期记忆网络学习的第二时序信息的维度较小,可以反映语义分割图像中较为细节的信息,比如锁定的各语义分割区域的范围越来越小;而当3D卷积堆叠的数目较多时,提取的空间信息和时序信息的维度较大,可以反映语义分割图像中的全局信息。不同图像尺度的跨层连接有助于分别学习小目标以及全局大目标在时序中的变化。
步骤S404:利用各访问页面之间的第一关联关系,或各访问页面之间不同尺度上的第二关联关系输出在当前访问页面上的目标操作类型。
其中,可以利用各访问页面之间的关联关系,以及各访问页面之间不同尺度之间的关联关系输出在当前访问页面上目标操作类型。在实际应用过程中,可以根据历史访问页面中的历史操作类型和不同尺度上各访问页面之间的关联关系在输出预测目标操作类型。
在本公开的一个实施例中,利用各访问页面之间的第一关联关系或各访问页面之间不同尺度上的第二关联关系输出在当前访问页面上的目标操作类型,包括:
(1)将第一关联关系或第二关联关系输入行为预测模型中的全连接层,输出当前访问页面对应的操作类型编码。
(2)基于操作类型编码确定当前访问页面的目标操作类型。
可以理解的是,在第一关联关系或第二关联关系输入全连接层后,可以输出一位有效编码,并 可以将该一位有效编码对应的操作类型确定为当前访问页面的目标操作类型。
其中,每一位有效编码对应一种操作,示例性的,当输出的一位有效编码为[1,0,0,0,0,0,0]时,输出的目标操作类型为点击操作,当输出的一位有效编码为[0,1,0,0,0,0,0]时,输出的目标操作类型为长按操作,当输出的一位有效编码为[0,0,1,0,0,0,0]时,输出的目标操作类型为左滑操作,当输出的一位有效编码为[0,0,0,1,0,0,0]时,输出的目标操作类型为右滑操作,当输出的一位有效编码为[0,0,0,0,1,0,0]时,输出的目标操作类型为上滑操作,当输出的一位有效编码为[0,0,0,0,0,1,0]时,输出的目标操作类型为下滑操作,当输出的一位有效编码为[0,0,0,0,0,0,1]时,输出的目标操作类型为返回操作。
步骤S405:利用当前访问页面及每一历史访问页面中的各个图像分割区域之间的位置关系和大小关系输出在当前访问页面上的目标操作位置概率图。
可以理解的是,将各访问页面中各个图像分割区域之间的位置关系和大小关系进行上采样,然后归一化,输出目标操作位置概率图。其中,由于3D卷积堆叠是将图像进行缩小的过程,上采样是将图像进行放大的过程,因此可以经过与3D卷积堆叠的数目相对应的上采样,预测输出操作位置概率图。本公开实施例对于上采样的方式包括但不限于2D反卷积。并且操作位置概率图中概率值最大点所在的位置,即为操作最有可能发生的位置。
在本公开的一个实施例中,响应于针对目标应用程序的自动化测试请求,获取当前访问页面及与当前访问页面相关联的至少两个连续历史访问页面的语义分割图及每一历史访问页面对应的历史操作类型及历史操作位置图,包括:
响应于针对目标应用程序的自动化测试请求,获取当前访问页面及与当前访问页面相关联的三个连续历史访问页面的语义分割图及每一历史访问页面对应的历史操作类型及历史操作位置图。
可以理解的是,本公开实施例在实际应用过程中发现,基于三个连续历史访问页面的操作情况预测在下一个页面的操作情况,能够在预测效率和预测精准度间寻找到平衡点,在满足预测精准度的情况下尽可能提高预测效率,从而提高对应用程序的测试效率。
具体的,如图5所示,图5(a)~图5(c)为3个连续历史访问页面对应的语义分割图,其中不同深度的区域分别表示文字区域、图片区域及按钮区域等,并且图中的光点表示在该历史访问页面的操作位置,图5(d)为当前访问页面对应的语义分割图,将图5(a)~图5(d)以及图5(a)~图5(c)对应的历史操作类型输入预先训练好的行为预测模型中,输出的结果即为图5(e)中的热力图及一个one-hot编码,其中,图5(e)中热力图是指一个单通道的二维图像(黑白图),图像中的值代表了热力值(在单通道图像中也就是亮度值),该图中的亮点中心最亮,热力值最高,也即概率值最高,该亮点位置即为预测的需要执行操作的位置;one-hot编码表示了在当前访问页面 上操作的目标操作类型。通过在该亮点位置处自动执行该目标操作类型的操作,自动完成测试。
本公开实施例提供了一种应用程序的测试控制装置,如图6所示,该应用程序的测试控制装置60可以包括:第一获取模块601、第二获取模块602及控制模块603,其中,
第一获取模块601,用于响应于针对目标应用程序的自动化测试请求,获取当前访问页面及与当前访问页面相关联的至少两个连续历史访问页面的语义分割图及每一历史访问页面对应的历史操作类型及历史操作位置图。
其中,可以通过构建一个模型来模仿用户的行为操作,从而自动化地驱动针对目标应用程序的整个测试过程。在接收到针对目标应用程序的自动化测试请求后,可以获取模型的输入内容。模型的输入内容包括当前访问页面及与当前访问页面相关联的至少两个连续历史访问页面的语义分割图及每一历史访问页面对应的历史操作类型及历史操作位置图。
第二获取模块602,用于将语义分割图、历史操作类型及历史操作位置图输入预先训练的行为预测模型中,获取行为预测模型预测出的在当前访问页面上的目标操作类型和目标操作位置概率图,目标操作位置概率图用于表征在页面位置上执行目标操作的概率。
可以理解的是,可以通过预先训练的行为预测模型预测用户的行为,即通过将获取的各访问页面的语义分割图、针对每一历史访问页面历史操作类型及历史操作位置图输入预先训练的行为预测模型中,可以预测出在当前访问页面上需要执行的目标操作的操作类型,及在页面位置上执行目标操作的概率。
控制模块603,用于根据目标操作类型和目标操作位置概率图,控制针对目标应用程序的当前访问页面的测试。
可以理解的是,当获取了针对当前访问页面的操作类型和操作位置概率图后,可以控制针对目标应用程序当前访问页面的测试,具体的,可以在操作位置概率图中概率值最大的位置点执行目标操作类型以完成针对当前访问页面的测试。
本公开通过预先训练的行为预测模型,在接收到针对目标应用程序的自动化测试请求后,将当前访问页面及与当前访问页面相关联的至少两个连续历史访问页面的语义分割图、在历史访问页面上进行操作的操作类型和历史操作位置图输入预先训练的行为预测模型中,预测出在当前访问页面上的目标操作类型和目标操作位置概率图,然后基于当前访问页面的操作类型和操作位置概率图,控制针对目标应用程序的当前访问页面的测试。进而自动化地驱动整个测试流程,提高测试效率。
下面参考图7,其示出了适于用来实现本公开实施例的电子设备700的结构示意图。本公开实施例中的电子设备可以包括但不限于诸如移动电话、笔记本电脑、数字广播接收器、PDA(个人数字助理)、PAD(平板电脑)、PMP(便携式多媒体播放器)、车载终端(例如车载导航终端)等 等的移动终端以及诸如数字TV、台式计算机等等的固定终端。图7示出的电子设备仅仅是一个示例,不应对本公开实施例的功能和使用范围带来任何限制。
电子设备包括:存储器以及处理器,其中,这里的处理器可以称为下文所述的处理装置701,存储器可以包括下文中的只读存储器(ROM)702、随机访问存储器(RAM)703以及存储装置708中的至少一项,具体如下所示:
如图7所示,电子设备700可以包括处理装置(例如中央处理器、图形处理器等)701,其可以根据存储在只读存储器(ROM)702中的程序或者从存储装置708加载到随机访问存储器(RAM)703中的程序而执行各种适当的动作和处理。在RAM 703中,还存储有电子设备700操作所需的各种程序和数据。处理装置701、ROM 702以及RAM 703通过总线704彼此相连。输入/输出(I/O)接口705也连接至总线704。
通常,以下装置可以连接至I/O接口705:包括例如触摸屏、触摸板、键盘、鼠标、摄像头、麦克风、加速度计、陀螺仪等的输入装置706;包括例如液晶显示器(LCD)、扬声器、振动器等的输出装置707;包括例如磁带、硬盘等的存储装置708;以及通信装置709。通信装置709可以允许电子设备700与其他设备进行无线或有线通信以交换数据。虽然图7示出了具有各种装置的电子设备700,但是应理解的是,并不要求实施或具备所有示出的装置。可以替代地实施或具备更多或更少的装置。
特别地,根据本公开的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括承载在非暂态计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信装置709从网络上被下载和安装,或者从存储装置708被安装,或者从ROM 702被安装。在该计算机程序被处理装置701执行时,执行本公开实施例的方法中限定的上述功能。
需要说明的是,本公开上述的计算机可读存储介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。
在本公开中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本公开中,计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据 信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读信号介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:电线、光缆、RF(射频)等等,或者上述的任意合适的组合。
在一些实施方式中,客户端、服务器可以利用诸如HTTP(HyperText Transfer Protocol,超文本传输协议)之类的任何当前已知或未来研发的网络协议进行通信,并且可以与任意形式或介质的数字数据通信(例如,通信网络)互连。通信网络的示例包括局域网(“LAN”),广域网(“WAN”),网际网(例如,互联网)以及端对端网络(例如,ad hoc端对端网络),以及任何当前已知或未来研发的网络。
上述计算机可读介质可以是上述电子设备中所包含的;也可以是单独存在,而未装配入该电子设备中。
上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被该电子设备执行时,使得该电子设备:在对目标应用程序进行用户行为的测试过程中,获取当前待测的目标页面对应的历史行为数据,其中,所述历史行为数据包括所述目标页面之前的一个历史页面或所述目标页面之前的至少两个连续历史页面、以及在每一历史页面上的历史操作行为;或者,上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被该电子设备执行时,使得该电子设备:
响应于针对目标应用程序的自动化测试请求,获取当前访问页面及与当前访问页面相关联的至少两个连续历史访问页面的语义分割图及每一历史访问页面对应的历史操作类型及历史操作位置图;
将语义分割图、历史操作类型及历史操作位置图输入预先训练的行为预测模型中,获取行为预测模型预测出的在当前访问页面上的目标操作类型和目标操作位置概率图,目标操作位置概率图用于表征在页面位置上执行目标操作的概率;
根据目标操作类型和目标操作位置概率图,控制针对目标应用程序的当前访问页面的测试。
可以以一种或多种程序设计语言或其组合来编写用于执行本公开的操作的计算机程序代码,上述程序设计语言包括但不限于面向对象的程序设计语言—诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括局域网(LAN)或广域网(WAN)—连接到用户计算机,或者, 可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。
附图中的流程图和框图,图示了按照本公开各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。
描述于本公开实施例中所涉及到的模块或单元可以通过软件的方式实现,也可以通过硬件的方式来实现。其中,模块或单元的名称在某种情况下并不构成对该单元本身的限定。
本文中以上描述的功能可以至少部分地由一个或多个硬件逻辑部件来执行。例如,非限制性地,可以使用的示范类型的硬件逻辑部件包括:现场可编程门阵列(FPGA)、专用集成电路(ASIC)、专用标准产品(ASSP)、片上系统(SOC)、复杂可编程逻辑设备(CPLD)等等。
在本公开的上下文中,机器可读介质可以是有形的介质,其可以包含或存储以供指令执行系统、装置或设备使用或与指令执行系统、装置或设备结合地使用的程序。机器可读介质可以是机器可读信号介质或机器可读储存介质。机器可读介质可以包括但不限于电子的、磁性的、光学的、电磁的、红外的、或半导体系统、装置或设备,或者上述内容的任何合适组合。机器可读存储介质的更具体示例会包括基于一个或多个线的电气连接、便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦除可编程只读存储器(EPROM或快闪存储器)、光纤、便捷式紧凑盘只读存储器(CD-ROM)、光学储存设备、磁储存设备、或上述内容的任何合适组合。
根据本公开的一个或多个实施例,提供了一种应用程序的测试控制方法,包括:
响应于针对目标应用程序的自动化测试请求,获取当前访问页面及与当前访问页面相关联的至少两个连续历史访问页面的语义分割图及每一历史访问页面对应的历史操作类型及历史操作位置图;
将语义分割图、历史操作类型及历史操作位置图输入预先训练的行为预测模型中,获取行为预测模型预测出的在当前访问页面上的目标操作类型和目标操作位置概率图,目标操作位置概率图用于表征在页面位置上执行目标操作的概率;
根据目标操作类型和目标操作位置概率图,控制针对目标应用程序的当前访问页面的测试。
在本公开的一个实施例中,预先训练的行为预测模型包括级联的3D卷积神经网络层、LSTM 长短期记忆神经网络层以及输出层;其中,
3D卷积神经网络层用于提取至少两个连续访问页面的空间信息及各访问页面之间的时序信息;
LSTM长短期记忆神经网络层用于学习空间信息中的不同尺度的时序信息;
输出层用于输出预测的操作类型和操作位置概率图。
在本公开的一个实施例中,将语义分割图、历史操作类型及历史操作位置图输入预先训练的行为预测模型中,获取行为预测模型预测出的在当前访问页面上的目标操作类型和目标操作位置概率图,目标操作位置概率图用于表征在页面位置上执行目标操作的概率,包括:
利用行为预测模型中的3D卷积神经网络提取当前访问页面及每一历史访问页面的第一空间信息,其中,第一空间信息包括每一访问页面中各个语义分割区域之间的位置关系和大小关系;
利用行为预测模型中的3D卷积神经网络提取当前访问页面和各历史访问页面之间的第一时序信息,第一时序信息包括根据访问页面出现时序确定的各访问页面之间的第一关联关系;
利用行为预测模型中的LSTM长短期记忆网络学习第一空间信息中包括的各访问页面的第二时序信息,第二时序信息包括各访问页面之间不同尺度上的第二关联关系;
利用各访问页面之间的第一关联关系,或各访问页面之间不同尺度上的第二关联关系输出在当前访问页面上的目标操作类型;
利用当前访问页面及每一历史访问页面中的各个图像分割区域之间的位置关系和大小关系输出在当前访问页面上的目标操作位置概率图。
在本公开的一个实施例中,响应于针对目标应用程序的自动化测试请求,获取当前访问页面及与当前访问页面相关联的至少两个连续历史访问页面的语义分割图及每一历史访问页面对应的历史操作类型及历史操作位置图,包括:
响应于针对目标应用程序的自动化测试请求,获取当前访问页面及与当前访问页面相关联的三个连续历史访问页面的语义分割图及每一历史访问页面对应的历史操作类型及历史操作位置图。
在本公开的一个实施例中,根据目标操作类型和目标操作位置概率图,控制针对目标应用程序的当前访问页面的测试,包括:
获取目标操作位置概率图中第一概率值对应的第一页面位置;
在目标应用程序的当前访问页面的第一页面位置执行目标操作类型对应的操作;
若针对第一页面位置执行目标操作类型对应的操作失败,在目标应用程序的当前访问页面的第二页面位置执行目标操作类型对应的操作,直至操作执行成功,其中,第二页面位置为目标操作位置概率图中第二概率值对应的位置,第一概率值大于第二概率值。
在本公开的一个实施例中,语义分割图的提取过程包括:
获取图像中的至少一种图像元素类型,至少一种图像元素类型包括:文字、图片和按钮中的至少一种元素类型;
按照至少一种图像元素类型对图像进行分割,得到语义分割图。
根据本公开的一个或多个实施例,提供了一种应用程序的测试控制装置,包括:
第一获取模块,用于响应于针对目标应用程序的自动化测试请求,获取当前访问页面及与当前访问页面相关联的至少两个连续历史访问页面的语义分割图及每一历史访问页面对应的历史操作类型及历史操作位置图;
第二获取模块,用于将语义分割图、历史操作类型及历史操作位置图输入预先训练的行为预测模型中,获取行为预测模型预测出的在当前访问页面上的目标操作类型和目标操作位置概率图,目标操作位置概率图用于表征在页面位置上执行目标操作的概率;
控制模块,用于根据目标操作类型和目标操作位置概率图,控制针对目标应用程序的当前访问页面的测试。
在本公开的一个实施例中,预先训练的行为预测模型包括级联的3D卷积神经网络层、LSTM长短期记忆神经网络层以及输出层;其中,
3D卷积神经网络层用于提取至少两个连续访问页面的空间信息及各访问页面之间的时序信息;
LSTM长短期记忆神经网络层用于学习空间信息中的不同尺度的时序信息;
输出层用于输出预测的操作类型和操作位置概率图。
在本公开的一个实施例中,第二获取模块,包括:
第一提取子模块,用于利用行为预测模型中的3D卷积神经网络提取当前访问页面及每一历史访问页面的第一空间信息,其中,第一空间信息包括每一访问页面中各个语义分割区域之间的位置关系和大小关系;
第二提取子模块,用于利用行为预测模型中的3D卷积神经网络提取当前访问页面和各历史访问页面之间的第一时序信息,第一时序信息包括根据访问页面出现时序确定的各访问页面之间的第一关联关系;
学习子模块,用于利用行为预测模型中的LSTM长短期记忆网络学习第一空间信息中包括的各访问页面的第二时序信息,第二时序信息包括各访问页面之间不同尺度上的第二关联关系;
第一输出子模块,用于利用各访问页面之间的第一关联关系,或各访问页面之间不同尺度上的第二关联关系输出在当前访问页面上的目标操作类型;
第二输出子模块,用于利用当前访问页面及每一历史访问页面中的各个图像分割区域之间的位置关系和大小关系输出在当前访问页面上的目标操作位置概率图。
在本公开的一个实施例中,第一获取模块,包括:第一获取子模块,用于响应于针对目标应用程序的自动化测试请求,获取当前访问页面及与当前访问页面相关联的三个连续历史访问页面的语义分割图及每一历史访问页面对应的历史操作类型及历史操作位置图。
在本公开的一个实施例中,控制模块,包括:获取子模块,用于获取目标操作位置概率图中第一概率值对应的第一页面位置;第一执行子模块,用于在目标应用程序的当前访问页面的第一页面位置执行目标操作类型对应的操作;第二执行子模块,用于若针对第一页面位置执行目标操作类型对应的操作失败,在目标应用程序的当前访问页面的第二页面位置执行目标操作类型对应的操作,直至操作执行成功,其中,第二页面位置为目标操作位置概率图中第二概率值对应的位置,第一概率值大于第二概率值。
在本公开的一个实施例中,语义分割图的提取过程包括:获取图像中的至少一种图像元素类型,至少一种图像元素类型包括:文字、图片和按钮中的至少一种元素类型;按照至少一种图像元素类型对图像进行分割,得到语义分割图。
根据本公开的一个或多个实施例,提供了一种电子设备,包括一个或多个处理器;存储器;一个或多个应用程序,其中一个或多个应用程序被存储在存储器中并被配置为由一个或多个处理器执行,一个或多个程序配置用于执行本公开的应用程序的测试控制方法。
根据本公开的一个或多个实施例,提供了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现本公开的应用程序的测试控制方法。
以上描述仅为本公开的较佳实施例以及对所运用技术原理的说明。本领域技术人员应当理解,本公开中所涉及的公开范围,并不限于上述技术特征的特定组合而成的技术方案,同时也应涵盖在不脱离上述公开构思的情况下,由上述技术特征或其等同特征进行任意组合而形成的其它技术方案。例如上述特征与本公开中公开的(但不限于)具有类似功能的技术特征进行互相替换而形成的技术方案。
此外,虽然采用特定次序描绘了各操作,但是这不应当理解为要求这些操作以所示出的特定次序或以顺序次序执行来执行。在一定环境下,多任务和并行处理可能是有利的。同样地,虽然在上面论述中包含了若干具体实现细节,但是这些不应当被解释为对本公开的范围的限制。在单独的实施例的上下文中描述的某些特征还可以组合地实现在单个实施例中。相反地,在单个实施例的上下文中描述的各种特征也可以单独地或以任何合适的子组合的方式实现在多个实施例中。
尽管已经采用特定于结构特征和/或方法逻辑动作的语言描述了本主题,但是应当理解所附权利要求书中所限定的主题未必局限于上面描述的特定特征或动作。相反,上面所描述的特定特征和动作仅仅是实现权利要求书的示例形式。

Claims (10)

  1. 一种应用程序的测试控制方法,包括:
    响应于针对目标应用程序的自动化测试请求,获取当前访问页面及与当前访问页面相关联的至少两个连续历史访问页面的语义分割图及每一历史访问页面对应的历史操作类型及历史操作位置图;
    将所述语义分割图、所述历史操作类型及所述历史操作位置图输入预先训练的行为预测模型中,获取所述行为预测模型预测出的在所述当前访问页面上的目标操作类型和目标操作位置概率图,所述目标操作位置概率图用于表征在页面位置上执行目标操作的概率;
    根据所述目标操作类型和所述目标操作位置概率图,控制针对所述目标应用程序的当前访问页面的测试。
  2. 根据权利要求1所述的方法,其中,所述预先训练的行为预测模型包括级联的3D卷积神经网络层、LSTM长短期记忆神经网络层以及输出层;其中,
    所述3D卷积神经网络层用于提取至少两个连续访问页面的空间信息及各访问页面之间的时序信息;
    所述LSTM长短期记忆神经网络层用于学习所述空间信息中的不同尺度的时序信息;
    所述输出层用于输出预测的操作类型和操作位置概率图。
  3. 根据权利要求2所述的方法,其中,所述将所述语义分割图、所述历史操作类型及所述历史操作位置图输入预先训练的行为预测模型中,获取所述行为预测模型预测出的在所述当前访问页面上的目标操作类型和目标操作位置概率图,包括:
    利用所述行为预测模型中的3D卷积神经网络提取当前访问页面及每一历史访问页面的第一空间信息,其中,所述第一空间信息包括每一访问页面中各个语义分割区域之间的位置关系和大小关系;
    利用所述行为预测模型中的3D卷积神经网络提取当前访问页面和各历史访问页面之间的第一时序信息,所述第一时序信息包括根据访问页面出现时序确定的各访问页面之间的第一关联关系;
    利用所述行为预测模型中的LSTM长短期记忆网络学习所述第一空间信息中包括的各访问页面的第二时序信息,所述第二时序信息包括各访问页面之间不同尺度上的第二关联关系;
    利用各访问页面之间的第一关联关系,或各访问页面之间不同尺度上的第二关联关系输出在所述当前访问页面上的目标操作类型;
    利用当前访问页面及每一历史访问页面中的各个图像分割区域之间的位置关系和大小关系输出在所述当前访问页面上的目标操作位置概率图。
  4. 根据权利要求3所述的方法,其中,所述响应于针对目标应用程序的自动化测试请求,获取当前访问页面及与当前访问页面相关联的至少两个连续历史访问页面的语义分割图及每一历史访问页面对应的历史操作类型及历史操作位置图,包括:
    响应于针对目标应用程序的自动化测试请求,获取当前访问页面及与当前访问页面相关联的三个连续历史访问页面的语义分割图及每一历史访问页面对应的历史操作类型及历史操作位置图。
  5. 根据权利要求1-4任一项所述的方法,其中,所述根据所述目标操作类型和所述目标操作位置概率图,控制针对所述目标应用程序的当前访问页面的测试,包括:
    获取所述目标操作位置概率图中第一概率值对应的第一页面位置;
    在所述目标应用程序的当前访问页面的第一页面位置执行所述目标操作类型对应的操作;
    若针对所述第一页面位置执行所述目标操作类型对应的操作失败,在所述目标应用程序的当前访问页面的第二页面位置执行所述目标操作类型对应的操作,直至操作执行成功,其中,所述第二页面位置为所述目标操作位置概率图中第二概率值对应的位置,所述第一概率值大于所述第二概率值。
  6. 根据权利要求1所述的方法,其中,所述语义分割图的提取过程包括:
    获取图像中的至少一种图像元素类型,所述至少一种图像元素类型包括:文字、图片和按钮中的至少一种元素类型;
    按照至少一种图像元素类型对图像进行分割,得到所述语义分割图。
  7. 一种应用程序的测试控制装置,包括:
    第一获取模块,用于响应于针对目标应用程序的自动化测试请求,获取当前访问页面及与当前访问页面相关联的至少两个连续历史访问页面的语义分割图及每一历史访问页面对应的历史操作类型及历史操作位置图;
    第二获取模块,用于将所述语义分割图、所述历史操作类型及所述历史操作位置图输入预先训练的行为预测模型中,获取所述行为预测模型预测出的在所述当前访问页面上的目标操作类型和目标操作位置概率图,所述目标操作位置概率图用于表征在页面位置上执行目标操作的概率;
    控制模块,用于根据所述目标操作类型和所述目标操作位置概率图,控制针对所述目标应用程序的当前访问页面的测试。
  8. 根据权利要求7所述的装置,其中,所述第二获取模块,包括:
    第一提取子模块,用于利用行为预测模型中的3D卷积神经网络提取当前访问页面及每一历史访问页面的第一空间信息,其中,第一空间信息包括每一访问页面中各个语义分割区域之间的位置 关系和大小关系;
    第二提取子模块,用于利用行为预测模型中的3D卷积神经网络提取当前访问页面和各历史访问页面之间的第一时序信息,第一时序信息包括根据访问页面出现时序确定的各访问页面之间的第一关联关系;
    学习子模块,用于利用行为预测模型中的LSTM长短期记忆网络学习第一空间信息中包括的各访问页面的第二时序信息,第二时序信息包括各访问页面之间不同尺度上的第二关联关系;
    第一输出子模块,用于利用各访问页面之间的第一关联关系,或各访问页面之间不同尺度上的第二关联关系输出在当前访问页面上的目标操作类型;
    第二输出子模块,用于利用当前访问页面及每一历史访问页面中的各个图像分割区域之间的位置关系和大小关系输出在当前访问页面上的目标操作位置概率图。
  9. 一种电子设备,其包括:
    一个或多个处理器;
    存储器;
    一个或多个应用程序,其中所述一个或多个应用程序被存储在所述存储器中并被配置为由所述一个或多个处理器执行,所述一个或多个程序配置用于:执行根据权利要求1至6任一项所述的应用程序的测试控制方法。
  10. 一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现权利要求1至6任一项所述的应用程序的测试控制方法。
PCT/CN2021/136511 2021-01-15 2021-12-08 应用程序的测试控制方法、装置、电子设备及存储介质 WO2022151876A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US18/272,424 US20240311285A1 (en) 2021-01-15 2021-12-08 Testing control method and apparatus for application, and electronic device and storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110055289.7A CN112631947B (zh) 2021-01-15 2021-01-15 应用程序的测试控制方法、装置、电子设备及存储介质
CN202110055289.7 2021-01-15

Publications (1)

Publication Number Publication Date
WO2022151876A1 true WO2022151876A1 (zh) 2022-07-21

Family

ID=75294468

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/136511 WO2022151876A1 (zh) 2021-01-15 2021-12-08 应用程序的测试控制方法、装置、电子设备及存储介质

Country Status (3)

Country Link
US (1) US20240311285A1 (zh)
CN (1) CN112631947B (zh)
WO (1) WO2022151876A1 (zh)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112631947B (zh) * 2021-01-15 2023-04-25 抖音视界有限公司 应用程序的测试控制方法、装置、电子设备及存储介质
CN115037655B (zh) * 2022-05-19 2024-03-12 支付宝(杭州)信息技术有限公司 压测方法和系统
CN115048309B (zh) * 2022-06-27 2023-03-07 广州掌动智能科技有限公司 无侵入app软件性能测试方法和系统

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108255691A (zh) * 2018-01-29 2018-07-06 百度在线网络技术(北京)有限公司 热力图展示方法及装置
CN109408754A (zh) * 2018-11-07 2019-03-01 北京字节跳动网络技术有限公司 网页操作数据的处理方法、装置、电子设备及存储介质
CN109783094A (zh) * 2018-12-15 2019-05-21 深圳壹账通智能科技有限公司 前端页面生成方法、装置、计算机设备及存储介质
CN110555714A (zh) * 2018-06-04 2019-12-10 百度在线网络技术(北京)有限公司 用于输出信息的方法和装置
US20200019488A1 (en) * 2018-07-12 2020-01-16 Sap Se Application Test Automate Generation Using Natural Language Processing and Machine Learning
CN111857719A (zh) * 2020-07-31 2020-10-30 北京字节跳动网络技术有限公司 数据处理方法、装置、电子设备及介质
CN112631947A (zh) * 2021-01-15 2021-04-09 北京字节跳动网络技术有限公司 应用程序的测试控制方法、装置、电子设备及存储介质

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150169430A1 (en) * 2013-12-13 2015-06-18 International Business Machines Corporation Selecting webpage test paths
CN110892424A (zh) * 2017-05-23 2020-03-17 英特尔公司 用于深度学习中的特征的区分性语义转移和物理启发优化的方法和装置
CN110363210B (zh) * 2018-04-10 2023-05-05 腾讯科技(深圳)有限公司 一种图像语义分割模型的训练方法和服务器
US10832437B2 (en) * 2018-09-05 2020-11-10 Rakuten, Inc. Method and apparatus for assigning image location and direction to a floorplan diagram based on artificial intelligence
CN111143213A (zh) * 2019-12-24 2020-05-12 北京数衍科技有限公司 软件自动化测试方法和装置及电子设备
CN111242027B (zh) * 2020-01-13 2023-04-14 北京工业大学 一种融合语义信息的无监督学习场景特征快速提取方法

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108255691A (zh) * 2018-01-29 2018-07-06 百度在线网络技术(北京)有限公司 热力图展示方法及装置
CN110555714A (zh) * 2018-06-04 2019-12-10 百度在线网络技术(北京)有限公司 用于输出信息的方法和装置
US20200019488A1 (en) * 2018-07-12 2020-01-16 Sap Se Application Test Automate Generation Using Natural Language Processing and Machine Learning
CN109408754A (zh) * 2018-11-07 2019-03-01 北京字节跳动网络技术有限公司 网页操作数据的处理方法、装置、电子设备及存储介质
CN109783094A (zh) * 2018-12-15 2019-05-21 深圳壹账通智能科技有限公司 前端页面生成方法、装置、计算机设备及存储介质
CN111857719A (zh) * 2020-07-31 2020-10-30 北京字节跳动网络技术有限公司 数据处理方法、装置、电子设备及介质
CN112631947A (zh) * 2021-01-15 2021-04-09 北京字节跳动网络技术有限公司 应用程序的测试控制方法、装置、电子设备及存储介质

Also Published As

Publication number Publication date
US20240311285A1 (en) 2024-09-19
CN112631947A (zh) 2021-04-09
CN112631947B (zh) 2023-04-25

Similar Documents

Publication Publication Date Title
CN112184738B (zh) 一种图像分割方法、装置、设备及存储介质
WO2022151876A1 (zh) 应用程序的测试控制方法、装置、电子设备及存储介质
CN113313064B (zh) 字符识别方法、装置、可读介质及电子设备
CN111767371A (zh) 一种智能问答方法、装置、设备及介质
US20240233334A1 (en) Multi-modal data retrieval method and apparatus, medium, and electronic device
CN112035092A (zh) 一种表单的处理方法、装置、设备和可读介质
WO2023179310A1 (zh) 图像修复方法、装置、设备、介质及产品
CN115640815A (zh) 翻译方法、装置、可读介质及电子设备
CN113961280B (zh) 视图的展示方法、装置、电子设备及计算机可读存储介质
CN111311609B (zh) 一种图像分割方法、装置、电子设备及存储介质
CN114997115B (zh) 文档处理方法、装置、设备和介质
CN116266206A (zh) 页面显示方法、装置和电子设备
CN114004229A (zh) 文本识别方法、装置、可读介质及电子设备
CN113760254A (zh) 数据模型生成方法、装置、电子设备和计算机可读介质
US20240282139A1 (en) Method, apparatus and electronic device for image processing
CN112270170B (zh) 一种隐式表述语句的分析方法、装置、介质和电子设备
CN116974684B (zh) 地图页面布局方法、装置、电子设备与计算机可读介质
CN113283115B (zh) 图像模型生成方法、装置和电子设备
CN112488094B (zh) 光学字符识别方法、装置和电子设备
CN115409044B (zh) 翻译方法、装置、可读介质及电子设备
CN118097674B (zh) 基于深度学习的企业文本信息智能自动审核方法与装置
CN111797932B (zh) 图像分类方法、装置、设备和计算机可读介质
CN113835697B (zh) 事件响应方法和装置
CN111461227B (zh) 样本生成方法、装置、电子设备和计算机可读介质
CN111026983B (zh) 一种实现超链接的方法、装置、介质和电子设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21919066

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 18272424

Country of ref document: US

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 24.10.2023)

122 Ep: pct application non-entry in european phase

Ref document number: 21919066

Country of ref document: EP

Kind code of ref document: A1