CN113821433A - Method, device, equipment, medium and product for testing cloud mobile phone application program - Google Patents

Method, device, equipment, medium and product for testing cloud mobile phone application program Download PDF

Info

Publication number
CN113821433A
CN113821433A CN202111012328.1A CN202111012328A CN113821433A CN 113821433 A CN113821433 A CN 113821433A CN 202111012328 A CN202111012328 A CN 202111012328A CN 113821433 A CN113821433 A CN 113821433A
Authority
CN
China
Prior art keywords
control
tested
mobile phone
cloud mobile
position information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111012328.1A
Other languages
Chinese (zh)
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.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202111012328.1A priority Critical patent/CN113821433A/en
Publication of CN113821433A publication Critical patent/CN113821433A/en
Pending legal-status Critical Current

Links

Images

Classifications

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

Abstract

The disclosure provides a testing method, a testing device, equipment, a testing medium and a testing product for cloud mobile phone application programs, and relates to the field of data processing, in particular to the technical field of cloud computing. The specific implementation scheme is as follows: acquiring a page screenshot of an application program to be tested, which is sent by a cloud mobile phone; determining the position information of the to-be-detected control in the cloud mobile phone according to the icon information of the to-be-detected control in the predetermined to-be-detected application program and the page screenshot; and sending the test operation instruction carrying the position information to be tested to the cloud mobile phone, so that the cloud mobile phone tests the control to be tested at the position of the position information to be tested according to the test operation instruction. According to the scheme, the automatic testing of the application program in the cloud mobile phone is realized, and the testing efficiency of the application program of the cloud mobile phone is improved.

Description

Method, device, equipment, medium and product for testing cloud mobile phone application program
Technical Field
The disclosure relates to the field of data processing, in particular to the technical field of cloud computing, and specifically relates to a method, a device, equipment, a medium and a product for testing a cloud mobile phone application program.
Background
The cloud mobile phone applies the cloud computing technology to network terminal service and realizes the cloud service through a cloud server. However, the cloud mobile phone cannot provide a method for remotely operating the cloud mobile phone, that is, cannot operate with a simulator or a real phone by using a debugging bridge tool, and cannot provide a method for directly acquiring a page control element of the cloud mobile phone, so that the traditional test tool cannot complete automatic test of an application program on the cloud mobile phone.
Disclosure of Invention
The disclosure provides a testing method, device, equipment, medium and product for a cloud mobile phone application program.
According to an aspect of the present disclosure, a method for testing a cloud mobile phone application is provided, including:
acquiring a page screenshot of an application program to be tested, which is sent by a cloud mobile phone;
determining the position information of the to-be-detected control in the cloud mobile phone according to the icon information of the to-be-detected control in the predetermined to-be-detected application program and the page screenshot;
and sending the test operation instruction carrying the position information to be tested to the cloud mobile phone, so that the cloud mobile phone tests the control to be tested at the position of the position information to be tested according to the test operation instruction.
According to another aspect of the present disclosure, there is provided a testing apparatus for a cloud mobile phone application, including:
the application page acquisition module is used for acquiring a page screenshot of the application program to be detected, which is sent by the cloud mobile phone;
the control position determining module is used for determining the position information of the to-be-detected control in the cloud mobile phone according to the icon information of the to-be-detected control in the to-be-detected application program and the page screenshot;
and the control test operation module is used for sending a test operation instruction carrying the position information to be tested to the cloud mobile phone so that the cloud mobile phone can test the control to be tested at the position of the position information to be tested according to the test operation instruction.
According to another aspect of the present disclosure, there is provided an electronic device including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform a method of testing a cloud phone application according to any embodiment of the disclosure.
According to another aspect of the present disclosure, there is provided a non-transitory computer readable storage medium storing computer instructions for causing a computer to execute a method of testing a cloud phone application according to any one of the embodiments of the present disclosure.
According to another aspect of the present disclosure, there is provided a computer program product comprising a computer program which, when executed by a processor, implements a method of testing a cloud handset application according to any one of the embodiments of the present disclosure.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present disclosure, nor do they limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description.
Drawings
The drawings are included to provide a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
fig. 1 is a schematic diagram of a testing method of a cloud phone application according to an embodiment of the present disclosure;
fig. 2 is a schematic diagram of another method of testing a cloud phone application according to an embodiment of the present disclosure;
fig. 3 is a schematic diagram of a further method for testing a cloud phone application according to an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of a testing apparatus for a cloud mobile phone application according to an embodiment of the present disclosure;
fig. 5 is a block diagram of an electronic device for implementing a testing method of a cloud mobile phone application according to an embodiment of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, in which various details of the embodiments of the disclosure are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Fig. 1 is a schematic diagram of a testing method for a cloud mobile phone application according to an embodiment of the present disclosure, where the embodiment is applicable to a case where the testing method for an application in a cloud mobile phone is optimized, the method may be executed by a testing apparatus for a cloud mobile phone application, and the apparatus may be implemented in a software and/or hardware manner and integrated in an electronic device; the electronic device involved in this embodiment may be a device with communication and computing capabilities such as a peer server. Specifically, referring to fig. 1, the method specifically includes the following steps:
s110, acquiring a page screenshot of the application program to be tested, which is sent by the cloud mobile phone.
The page screenshot refers to a test page screenshot containing a control to be tested in the application program to be tested, for example, the page screenshot is a home page screenshot displayed after the application program to be tested is started, the screenshot includes at least one control element to be tested, for example, a button control, a single-choice or multi-choice control or an input box control, and the functions of the control elements are tested to ensure the functions of the application program to be tested.
In a specific example, remote connection between a cloud mobile phone and a local test terminal is established, the cloud mobile phone provides network access service for the local test terminal, and the local test terminal utilizes a command provided by an android system character interface based on remote interactive operation to realize functions of installation, starting, closing, screenshot and the like of an application program to be tested on the cloud mobile phone.
After the local test terminal remotely installs the application program to be tested on the cloud mobile phone and starts the application program to be tested, the cloud mobile phone captures the page of the started application program to be tested through a remote capture command to obtain a page capture, and the page capture is sent to the local test terminal through a network, so that the local test terminal can obtain the page capture of the application program to be tested sent by the cloud mobile phone.
And S120, determining the position information of the to-be-detected control in the cloud mobile phone according to the predetermined icon information and the predetermined page screenshot of the to-be-detected control in the to-be-detected application program.
The information of the control icon to be tested in the application program to be tested is determined in advance according to the specific function of the application program to be tested, illustratively, the control icon in the page after the application program to be tested is started is stored in advance in a screenshot mode, and the control icon file is named by using the control function, for example, the file corresponding to the icon file of the login button control is: and the png names the control icon file through the control function, so that the control icon file is convenient for a developer to check and manage on one hand, and the related test operation is convenient to determine according to the name on the other hand. The number of the control icon information to be tested is at least one.
In a specific example, if the application program to be tested is normally displayed after being started, the icon of the control to be tested is inevitably included in the screenshot of the page of the application program to be tested, so that the screenshot of the page is located and searched according to the icon information of the control to be tested, and the search result is determined. And if the icon information of the control to be tested cannot be found in the screenshot of the page, the display abnormality of the application program to be tested is represented, and a test report is generated according to the result. And if the icon information of the control to be tested exists in the page screenshot, determining the position information of the control to be tested in the cloud mobile phone according to the positioning result. The position information to be detected represents the coordinate information of the control to be detected in the cloud mobile phone.
Illustratively, after receiving a page screenshot of an application program to be tested, a local testing terminal identifies a candidate control icon and corresponding candidate position information in the page screenshot by using a pre-trained image identification model, matches the candidate control icon with the information of the control icon to be tested, which is pre-stored locally, determines a target icon from the candidate icon, and determines that the corresponding target position information is the information of the position to be tested of the control to be tested. The position information to be detected can be the center coordinate of the control to be detected.
S130, sending the test operation instruction carrying the position information to be tested to the cloud mobile phone, so that the cloud mobile phone tests the control to be tested at the position of the position information to be tested according to the test operation instruction.
The test operation instruction is sent to the cloud mobile phone by the local test terminal to indicate the cloud mobile phone to test the control to be tested. The test operation instruction is determined according to the actual function of the control to be tested, for example, when the control to be tested is a button control, the test operation instruction is click operation; and when the control to be tested is the input box control, the test operation instruction is input operation.
And sending the test operation instruction carrying the position information to be tested to the cloud mobile phone, so that the cloud mobile phone determines the position information for performing click operation or input operation, and the accuracy of a test operation object is ensured.
In a specific example, the local test terminal generates a test operation instruction including information of a position to be tested as an operation object, and sends the test operation instruction to the cloud mobile phone, and the cloud mobile phone performs a click operation or an input operation on the position to be tested according to the instruction after receiving the test operation instruction.
When the traditional testing tool is used for testing the cloud mobile phone, page information provided by the cloud mobile phone is control character information, actual position information of each control cannot be fed back, the cloud mobile phone cannot provide an operation mode for remotely operating the cloud mobile phone, so that the testing tool cannot determine the actual position of a test object, the position information of the test object needs to be determined manually, and then the testing is performed according to the position information, and the automation degree is low.
According to the scheme of the embodiment, network access service is provided through the cloud mobile phone, the page screenshot is fed back to the local test terminal, the local test terminal automatically determines the actual position information of the to-be-tested control according to the page screenshot, a test operation instruction is generated according to the actual position information, and the test operation instruction is sent to the cloud mobile phone, so that the cloud mobile phone can automatically test the to-be-tested control corresponding to the actual position information according to the test operation instruction. The problem that the cloud mobile phone cannot be automatically tested by using a traditional testing tool is solved, the automatic testing of the application program in the cloud mobile phone is realized, and the testing efficiency of the application program of the cloud mobile phone is improved.
Fig. 2 is a schematic diagram of another testing method for a cloud mobile phone application according to an embodiment of the present disclosure, where this embodiment is a further refinement of the above technical solution, and the technical solution in this embodiment may be combined with various alternatives in one or more of the above embodiments. As shown in fig. 2, the testing method of the cloud mobile phone application program includes the following steps:
s210, acquiring a page screenshot of the application program to be tested, which is sent by the cloud mobile phone.
S220, determining the relative position information of the to-be-detected control in the page screenshot according to the image matching result of the to-be-detected control icon information in the page screenshot.
When the position information of the control to be detected in the cloud mobile phone is determined, the relative position information of the control to be detected in the page screenshot, namely the relative position of the icon to be detected in the page screenshot is determined at first. And when the relative position of the icon to be detected in the page screenshot is determined, a method for matching the icon of the control icon to be detected with the page screenshot is adopted.
In a specific example, the icon information of the control to be tested is subjected to image matching in the page screenshot, the position information of the center coordinate of the position where the image matching is successful in the page screenshot is determined, and the position information of the center coordinate is used as the relative position information of the control to be tested in the page screenshot.
And S230, determining the position information of the control to be tested in the cloud mobile phone according to the relative position information.
The relative position information only reflects the position of the icon of the control to be detected in the screenshot of the page, and does not represent the real position information of the control to be detected in the cloud mobile phone. Therefore, the relative position information needs to be converted into the real position information of the control to be detected in the cloud mobile phone. Specifically, the resolution of the screenshot of the page is determined, and the relative position information is converted according to the resolution to obtain the real position information to be measured.
The relative position information of the to-be-detected control in the page screenshot is determined according to the image matching result, the to-be-detected position information of the to-be-detected control in the cloud mobile phone is determined according to the relative position information, the real position of the to-be-detected control in the cloud mobile phone is determined, the testing accuracy of the to-be-detected control related to the real position is improved, and meanwhile the position determining efficiency is improved by determining through image matching.
In another optional implementation manner of this embodiment, before S220, the method further includes:
converting the screenshot of the page into a preset resolution; the preset resolution is determined according to the resolution of the icon information of the control to be tested;
correspondingly, determining the position information to be detected of the control to be detected in the cloud mobile phone according to the relative position information, and the method comprises the following steps:
and converting the relative position information into the position information of the control to be detected in the cloud mobile phone based on the preset resolution.
In order to ensure the accuracy of image matching, the real size matching between the predetermined control icon to be detected and the corresponding icon to be detected in the page screenshot needs to be ensured, and the control icon information loss caused by the undersize or oversize of the control icon to be detected, the mismatching or the unsuccessful matching are avoided.
In a specific example, the preset resolution of the page screenshot is determined according to the predetermined resolution of the icon information of the control to be detected and the relative size ratio of the control icon to the page screenshot, so that when subsequent images are matched, the icon information of the control to be detected is consistent with the real size of the control to be detected in the page screenshot, and the matching accuracy and the matching success rate are improved.
After the page screenshot is converted into the preset resolution, the relative position information of the control to be detected successfully matched in the page screenshot is converted into the position information of the control to be detected in the cloud mobile phone according to the preset resolution.
S240, sending the test operation instruction carrying the position information to be tested to the cloud mobile phone, so that the cloud mobile phone tests the control to be tested at the position of the position information to be tested according to the test operation instruction.
In another optional implementation manner of this embodiment, before sending the test operation instruction carrying the to-be-tested location information to the cloud mobile phone, the method further includes:
determining a test case associated with a control to be tested;
and determining a test operation instruction of the control to be tested according to the test steps in the test case.
The test case is used for describing a test task of the control to be tested by the pointer, and embodies a test scheme, a method, a technology and a strategy. The contents of the test object, the test environment, the input data, the test steps, the expected results, the test scripts and the like are included, and finally, a document is formed.
Because the types of the to-be-tested controls are different, the functions of the to-be-tested controls are different, and therefore the corresponding test operations are different. Therefore, the incidence relation between different to-be-tested controls and the test cases is pre-established, the test cases associated with the to-be-tested controls comprise specific test schemes determined according to the functions of the to-be-tested controls, and the test cases comprise at least one test step.
In a specific example, after the control to be tested is determined, a test case which is in a pre-established association relation with the control to be tested is determined according to the control to be tested, and after the position information to be tested of the control to be tested is determined, a test operation instruction of the control to be tested is determined according to the position information to be tested and the test steps in the test case. Illustratively, a login test case associated with a login button control is determined, the test step in the test case is to click the center coordinate of the control to be tested, the determined position information to be tested is used as the center coordinate of the control to be tested, and a test operation instruction for clicking the position information to be tested is generated according to the test step. Similarly, the number of the test steps can be at least two, the test operation instructions are sequentially determined according to the sequence of the test steps and are sent to the cloud mobile phone according to the test sequence, so that the cloud mobile phone performs test operation according to the test operation instructions according to the test sequence.
Optionally, the last testing step in the test case associated with the control to be tested is to perform page switching, determine the next control to be tested, and automatically perform the automated testing of the next control to be tested.
The associated test case is determined according to the to-be-tested control, so that the accuracy of determining the test operation instruction of the to-be-tested control is ensured, automatic switching during testing of different to-be-tested controls can be realized, the requirement of manually determining corresponding test operation instructions for different to-be-tested controls is avoided, and the overall efficiency of testing the application program is improved.
In another optional implementation manner of this embodiment, after sending the test operation instruction carrying the to-be-tested location information to the cloud mobile phone, the method further includes:
receiving a test operation result sent by the cloud mobile phone;
and determining whether the test operation passes according to the comparison result of the predetermined test expected result and the test operation result, and generating a test report.
The test operation result refers to a page screenshot after the cloud mobile phone operates according to the test operation instruction, and the page screenshot includes characters, pictures, popup contents and the like after the test operation. The expected test result is a result expected to be set after the control to be tested is subjected to test operation, the expected test result can be stored in a test case, each test step of the test case is associated with one expected test result, namely each test operation instruction is associated with the expected test result.
In a specific example, after the cloud mobile phone operates according to a test operation instruction, the generated test result page screenshot is sent to a local test terminal as a test operation result, the local test terminal compares a corresponding expected test result stored locally with the actual test result page screenshot, if the comparison is consistent, the test operation is determined to be passed, otherwise, the test operation is not passed, and the test operation result and the test operation pass result are used as test data to generate a test report. When the result is compared, the characters appearing on the page are obtained by carrying out operations such as image sharpening, image binarization and the like on the screenshot of the test result page, so that the characters in the page are compared.
Illustratively, each test operation instruction comprises a screenshot instruction, that is, after the local test terminal controls the cloud mobile phone to operate according to the test operation instruction, the cloud mobile phone is controlled to screenshot to obtain a test operation result corresponding to the test operation instruction.
By comparing the test operation results, the integrity of the whole process of the application program test operation is ensured, the efficiency of the application program test is improved, and the need of manually checking the test results is avoided.
According to the scheme of the embodiment, the relative position information of the to-be-tested control in the page screenshot is determined through image matching, the to-be-tested position information of the to-be-tested control in the cloud mobile phone is determined according to the relative position information, the real position of the to-be-tested control in the cloud mobile phone is determined, the testing accuracy of the to-be-tested control related to the real position is improved, meanwhile, the position determining efficiency is improved through image matching, and the overall efficiency of automatic testing of the application program is improved.
Fig. 3 is a schematic diagram of another testing method for a cloud mobile phone application according to an embodiment of the present disclosure, where this embodiment is a further refinement of the above technical solution, and the technical solution in this embodiment may be combined with various alternatives in one or more of the above embodiments. As shown in fig. 3, the testing method of the cloud mobile phone application program includes the following steps:
the method comprises the steps of storing icons of a to-be-tested control to be tested in an application program to be tested in advance in a screenshot mode, and naming icon files by using control functions.
The method comprises the steps of establishing remote interaction between a local test terminal and a cloud mobile phone, enabling the local test terminal to remotely operate and utilize a command provided by an android system character interface to achieve installation and starting of an application program to be tested, and after the application program to be tested is started, performing remote screenshot through the remote interaction to obtain a screenshot of a page to be tested of the application program, wherein the screenshot of the page to be tested comprises a control icon to be tested.
After the page screenshot to be detected obtained by remote screenshot is converted into the preset resolution, the relative position coordinates of the icon of the control to be detected in the page screenshot to be detected are determined through image matching, and the real coordinate position of the control to be detected in the cloud mobile phone is obtained by converting the relative position coordinates according to the preset resolution. And if the control icon to be tested is determined not to be in the screenshot of the page to be tested through image matching, directly generating a test result for storage, and generating a test report.
After the real coordinate position of the control icon to be tested is obtained, a test case associated with the control to be tested is determined, a test step of operating the real coordinate position is generated according to the test case, so that the cloud mobile phone operates the control to be tested at the coordinate position according to the test step, and meanwhile, a test result after the cloud mobile phone is operated is obtained. For example, the test operations such as clicking the central coordinates of the controls such as buttons, single-selection controls and multi-selection controls and inputting the input box are completed through the set test case steps, the page results appearing on the cloud mobile phone after the operation are obtained, the page results are compared with the expected set test results, and the test report is generated according to the comparison results and is stored and displayed.
And simultaneously, after the current control to be tested is tested according to the set test case steps, switching the page to determine the next control to be tested, and simultaneously, carrying out test operation according to the test case associated with the next control to be tested until all the controls to be tested in the page to be tested of the application program to be tested are tested, thereby realizing the fully-automatic test of the application program.
Fig. 4 is a schematic structural diagram of a testing apparatus for a cloud mobile phone application according to an embodiment of the present disclosure, where the apparatus may perform a testing method for a cloud mobile phone application related to any embodiment of the present disclosure; referring to fig. 4, the testing apparatus 400 for a cloud phone application includes: an application page acquisition module 410, a control position determination module 420, and a control test operation module 430.
The application page acquisition module 410 is used for acquiring a page screenshot of the application program to be detected, which is sent by the cloud mobile phone;
the control position determining module 420 is configured to determine, according to predetermined icon information of a control to be detected in the application to be detected and the page screenshot, position information of the control to be detected in the cloud mobile phone;
the control testing operation module 430 is configured to send a testing operation instruction carrying the position information to be tested to the cloud mobile phone, so that the cloud mobile phone tests the control to be tested at the position of the position information to be tested according to the testing operation instruction.
According to the scheme of the embodiment, network access service is provided through the cloud mobile phone, the page screenshot is fed back to the local test terminal, the local test terminal automatically determines the actual position information of the to-be-tested control according to the page screenshot, a test operation instruction is generated according to the actual position information, and the test operation instruction is sent to the cloud mobile phone, so that the cloud mobile phone can automatically test the to-be-tested control corresponding to the actual position information according to the test operation instruction. The problem that the cloud mobile phone cannot be automatically tested by using a traditional testing tool is solved, the automatic testing of the application program in the cloud mobile phone is realized, and the testing efficiency of the application program of the cloud mobile phone is improved.
In an optional implementation manner of this embodiment, the control position determining module includes:
the control icon matching unit is used for determining the relative position information of the control to be detected in the page screenshot according to the image matching result of the control icon information to be detected in the page screenshot;
and the control position determining unit is used for determining the position information to be detected of the control to be detected in the cloud mobile phone according to the relative position information.
In an optional implementation manner of this embodiment, the apparatus further includes a page size conversion module, configured to, before determining, according to an image matching result of the icon information of the control to be tested in the page screenshot, the relative position information of the control to be tested in the page screenshot,
converting the screenshot of the page into a preset resolution; the preset resolution is determined according to the resolution of the icon information of the control to be tested;
correspondingly, the control position determining unit is specifically configured to:
and converting the relative position information into the position information to be detected of the control to be detected in the cloud mobile phone based on the preset resolution.
In an optional implementation manner of this embodiment, the apparatus further includes a test operation instruction determining module, configured to, before sending the test operation instruction carrying the information of the location to be tested to the cloud mobile phone,
determining a test case associated with the control to be tested;
and determining the test operation instruction of the control to be tested according to the test steps in the test case.
In an optional implementation manner of this embodiment, the apparatus further includes a test result comparison module, configured to, after sending the test operation instruction carrying the information of the position to be tested to the cloud mobile phone,
receiving a test operation result sent by the cloud mobile phone;
and determining whether the test operation passes according to the comparison result of the predetermined test expected result and the test operation result, and generating a test report.
The testing device for the cloud mobile phone application program can execute the testing method for the cloud mobile phone application program provided by any embodiment of the disclosure, and has the corresponding functional modules and beneficial effects of the execution method. For technical details that are not described in detail in this embodiment, reference may be made to a method for testing a cloud mobile phone application provided in any embodiment of the present disclosure.
In the technical scheme of the disclosure, the collection, storage, use, processing, transmission, provision, disclosure and other processing of the personal information of the related user are all in accordance with the regulations of related laws and regulations and do not violate the good customs of the public order.
The present disclosure also provides an electronic device, a readable storage medium, and a computer program product according to embodiments of the present disclosure.
FIG. 5 illustrates a schematic block diagram of an example electronic device 500 that can be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 5, the apparatus 500 comprises a computing unit 501 which may perform various appropriate actions and processes in accordance with a computer program stored in a Read Only Memory (ROM)502 or a computer program loaded from a storage unit 508 into a Random Access Memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the device 500 can also be stored. The calculation unit 501, the ROM 502, and the RAM 503 are connected to each other by a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
A number of components in the device 500 are connected to the I/O interface 505, including: an input unit 506 such as a keyboard, a mouse, or the like; an output unit 507 such as various types of displays, speakers, and the like; a storage unit 508, such as a magnetic disk, optical disk, or the like; and a communication unit 509 such as a network card, modem, wireless communication transceiver, etc. The communication unit 509 allows the device 500 to exchange information/data with other devices through a computer network such as the internet and/or various telecommunication networks.
The computing unit 501 may be a variety of general-purpose and/or special-purpose processing components having processing and computing capabilities. Some examples of the computing unit 501 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various dedicated Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, and so forth. The computing unit 501 executes the respective methods and processes described above, such as the test method of the cloud handset application. For example, in some embodiments, the testing method of the cloud cell phone application may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as storage unit 508. In some embodiments, part or all of the computer program may be loaded and/or installed onto the device 500 via the ROM 502 and/or the communication unit 509. When the computer program is loaded into RAM 503 and executed by computing unit 501, one or more steps of the method for testing a cloud handset application described above may be performed. Alternatively, in other embodiments, the computing unit 501 may be configured to perform testing of the method cloud handset application by any other suitable means (e.g., by way of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the program codes, when executed by the processor or controller, cause the functions/operations specified in the flowchart and/or block diagram to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, 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), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), Wide Area Networks (WANs), blockchain networks, and the internet.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server may be a cloud server, a server of a distributed system, or a server with a combined blockchain.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present disclosure may be executed in parallel, sequentially, or in different orders, as long as the desired results of the technical solutions disclosed in the present disclosure can be achieved, and the present disclosure is not limited herein.
The above detailed description should not be construed as limiting the scope of the disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present disclosure should be included in the scope of protection of the present disclosure.

Claims (13)

1. A testing method of a cloud mobile phone application program comprises the following steps:
acquiring a page screenshot of an application program to be tested, which is sent by a cloud mobile phone;
determining the position information of the to-be-detected control in the cloud mobile phone according to the icon information of the to-be-detected control in the predetermined to-be-detected application program and the page screenshot;
and sending the test operation instruction carrying the position information to be tested to the cloud mobile phone, so that the cloud mobile phone tests the control to be tested at the position of the position information to be tested according to the test operation instruction.
2. The method of claim 1, wherein determining the position information of the to-be-tested control in the cloud mobile phone according to the predetermined icon information of the to-be-tested control in the to-be-tested application and the page screenshot comprises:
determining the relative position information of the control to be detected in the page screenshot according to the image matching result of the icon information of the control to be detected in the page screenshot;
and determining the position information of the control to be tested in the cloud mobile phone according to the relative position information.
3. The method of claim 2, wherein before determining the relative position information of the control to be tested in the page screenshot according to the image matching result of the icon information of the control to be tested in the page screenshot, the method further comprises:
converting the screenshot of the page into a preset resolution; the preset resolution is determined according to the resolution of the icon information of the control to be tested;
correspondingly, determining the position information to be detected of the control to be detected in the cloud mobile phone according to the relative position information, including:
and converting the relative position information into the position information to be detected of the control to be detected in the cloud mobile phone based on the preset resolution.
4. The method according to claim 1, wherein before sending the test operation instruction carrying the information of the position to be tested to the cloud mobile phone, the method further comprises:
determining a test case associated with the control to be tested;
and determining the test operation instruction of the control to be tested according to the test steps in the test case.
5. The method according to claim 1, wherein after sending the test operation instruction carrying the information of the position to be tested to the cloud mobile phone, the method further comprises:
receiving a test operation result sent by the cloud mobile phone;
and determining whether the test operation passes according to the comparison result of the predetermined test expected result and the test operation result, and generating a test report.
6. A testing device for cloud mobile phone application programs comprises:
the application page acquisition module is used for acquiring a page screenshot of the application program to be detected, which is sent by the cloud mobile phone;
the control position determining module is used for determining the position information of the to-be-detected control in the cloud mobile phone according to the icon information of the to-be-detected control in the to-be-detected application program and the page screenshot;
and the control test operation module is used for sending a test operation instruction carrying the position information to be tested to the cloud mobile phone so that the cloud mobile phone can test the control to be tested at the position of the position information to be tested according to the test operation instruction.
7. The apparatus of claim 6, wherein the control position determination module comprises:
the control icon matching unit is used for determining the relative position information of the control to be detected in the page screenshot according to the image matching result of the control icon information to be detected in the page screenshot;
and the control position determining unit is used for determining the position information to be detected of the control to be detected in the cloud mobile phone according to the relative position information.
8. The device of claim 7, further comprising a page size conversion module for determining the relative position information of the control to be tested in the page screenshot according to the image matching result of the icon information of the control to be tested in the page screenshot,
converting the screenshot of the page into a preset resolution; the preset resolution is determined according to the resolution of the icon information of the control to be tested;
correspondingly, the control position determining unit is specifically configured to:
and converting the relative position information into the position information to be detected of the control to be detected in the cloud mobile phone based on the preset resolution.
9. The device of claim 6, further comprising a test operation instruction determination module for determining whether the test operation instruction carrying the position information to be tested is sent to the cloud mobile phone,
determining a test case associated with the control to be tested;
and determining the test operation instruction of the control to be tested according to the test steps in the test case.
10. The device of claim 6, further comprising a test result comparison module, configured to, after sending the test operation instruction carrying the information of the location to be tested to the cloud phone,
receiving a test operation result sent by the cloud mobile phone;
and determining whether the test operation passes according to the comparison result of the predetermined test expected result and the test operation result, and generating a test report.
11. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-5.
12. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any one of claims 1-5.
13. A computer program product comprising computer programs/instructions, characterized in that the computer programs/instructions, when executed by a processor, implement the steps of the method according to any of claims 1-5.
CN202111012328.1A 2021-08-31 2021-08-31 Method, device, equipment, medium and product for testing cloud mobile phone application program Pending CN113821433A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111012328.1A CN113821433A (en) 2021-08-31 2021-08-31 Method, device, equipment, medium and product for testing cloud mobile phone application program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111012328.1A CN113821433A (en) 2021-08-31 2021-08-31 Method, device, equipment, medium and product for testing cloud mobile phone application program

Publications (1)

Publication Number Publication Date
CN113821433A true CN113821433A (en) 2021-12-21

Family

ID=78913865

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111012328.1A Pending CN113821433A (en) 2021-08-31 2021-08-31 Method, device, equipment, medium and product for testing cloud mobile phone application program

Country Status (1)

Country Link
CN (1) CN113821433A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114501303A (en) * 2021-12-27 2022-05-13 天翼云科技有限公司 Method and device for determining positioning data and electronic equipment
CN114579028A (en) * 2022-03-03 2022-06-03 北京字节跳动网络技术有限公司 Interface screenshot method and device, computer equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105117337A (en) * 2015-08-26 2015-12-02 小米科技有限责任公司 Application debugging method, client and debugging platform
CN105988688A (en) * 2016-01-22 2016-10-05 腾讯科技(深圳)有限公司 Screen capture method and apparatus
US9652364B1 (en) * 2015-03-12 2017-05-16 Amazon Technologies, Inc. Cloud service for mobile testing and debugging
CN111857457A (en) * 2020-06-22 2020-10-30 北京百度网讯科技有限公司 Cloud mobile phone control method and device, electronic equipment and readable storage medium
CN112383661A (en) * 2020-11-20 2021-02-19 北京达佳互联信息技术有限公司 Mobile terminal automation test method and device, electronic equipment and storage medium
CN112835667A (en) * 2021-02-04 2021-05-25 深圳市广和通无线股份有限公司 Interface element positioning method, equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9652364B1 (en) * 2015-03-12 2017-05-16 Amazon Technologies, Inc. Cloud service for mobile testing and debugging
CN105117337A (en) * 2015-08-26 2015-12-02 小米科技有限责任公司 Application debugging method, client and debugging platform
CN105988688A (en) * 2016-01-22 2016-10-05 腾讯科技(深圳)有限公司 Screen capture method and apparatus
CN111857457A (en) * 2020-06-22 2020-10-30 北京百度网讯科技有限公司 Cloud mobile phone control method and device, electronic equipment and readable storage medium
CN112383661A (en) * 2020-11-20 2021-02-19 北京达佳互联信息技术有限公司 Mobile terminal automation test method and device, electronic equipment and storage medium
CN112835667A (en) * 2021-02-04 2021-05-25 深圳市广和通无线股份有限公司 Interface element positioning method, equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114501303A (en) * 2021-12-27 2022-05-13 天翼云科技有限公司 Method and device for determining positioning data and electronic equipment
CN114579028A (en) * 2022-03-03 2022-06-03 北京字节跳动网络技术有限公司 Interface screenshot method and device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
CN113821433A (en) Method, device, equipment, medium and product for testing cloud mobile phone application program
CN107807841B (en) Server simulation method, device, equipment and readable storage medium
CN113360144B (en) Auxiliary processing method, device, storage medium and program product for software development
CN114880422B (en) Interest point information processing method based on robot process automation and related device
CN110609786A (en) Software testing method and device, computer equipment and storage medium
US11954013B2 (en) Method of testing applet performance, electronic device, and computer-readable medium
CN110716859A (en) Method for automatically pushing test cases for modified codes and related device
CN116248526A (en) Method and device for deploying container platform and electronic equipment
CN114237182B (en) Robot scheduling method and system
CN111782445B (en) Configuration method and device of equipment debugging environment
CN114741294A (en) Page debugging method, device, equipment and storage medium
CN114091909A (en) Collaborative development method, system, device and electronic equipment
CN114116688A (en) Data processing and data quality inspection method, device and readable storage medium
CN110968519A (en) Game testing method, device, server and storage medium
CN113836291B (en) Data processing method, device, equipment and storage medium
CN113722231B (en) User operation simulation method and device, electronic equipment and storage medium
CN117098106B (en) Bluetooth testing method and device, electronic equipment and storage medium
CN117951024A (en) APP compatibility test method, device, equipment and medium
CN109656961B (en) Method and device for searching homonymous tasks based on data analysis, medium and electronic equipment
CN114238149A (en) Batch testing method of accounting system, electronic device and storage medium
CN116400669A (en) Automatic test method, device, test equipment and medium for security level instrument control system
CN117520195A (en) Method, apparatus, device, storage medium and program product for testing interface
CN116991737A (en) Software testing method, system, electronic equipment and storage medium
CN115407926A (en) System installation method, device and storage medium
CN115543712A (en) Automatic detection method and device for equipment configuration information, electronic equipment and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination