CN110765015A - Method for testing application to be tested and electronic equipment - Google Patents

Method for testing application to be tested and electronic equipment Download PDF

Info

Publication number
CN110765015A
CN110765015A CN201911017290.XA CN201911017290A CN110765015A CN 110765015 A CN110765015 A CN 110765015A CN 201911017290 A CN201911017290 A CN 201911017290A CN 110765015 A CN110765015 A CN 110765015A
Authority
CN
China
Prior art keywords
control
tested
application interface
application
identification
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201911017290.XA
Other languages
Chinese (zh)
Other versions
CN110765015B (en
Inventor
王晓磊
仇鑫
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Testin Information Technology Co Ltd
Original Assignee
Beijing Yunju Intelligent 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 Yunju Intelligent Technology Co Ltd filed Critical Beijing Yunju Intelligent Technology Co Ltd
Priority to CN201911017290.XA priority Critical patent/CN110765015B/en
Publication of CN110765015A publication Critical patent/CN110765015A/en
Application granted granted Critical
Publication of CN110765015B publication Critical patent/CN110765015B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • 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

Abstract

The scheme provides a method and electronic equipment for testing an application to be tested, and is used for solving the problem that the target object is determined inaccurately in an automatic test. This scheme includes: determining a measured part identifier corresponding to the test content of the tested application according to the test application, wherein the measured part identifier comprises an identifier character; identifying characters in the application interface to be tested; when the characters in the application interface to be tested comprise identification characters, selecting an area where the identification characters are located in the application interface to be tested as a target area; and executing operation corresponding to the test content on a first control located in the target area in the application interface to be tested. Even if the version of the software to be tested is updated to change the control information of the software, the characters visible on the interface are not changed, so that the target object can be accurately determined by the scheme provided by the application. In addition, the scheme reduces the maintenance cost, improves the script maintainability and improves the automation value.

Description

Method for testing application to be tested and electronic equipment
Technical Field
The invention relates to the field of automatic testing, in particular to a method for testing an application to be tested and electronic equipment.
Background
In the field of automated testing, an automated script for testing software at present usually locates a target object based on control information and position information, so that the dependency of script stability on the control information is relatively high. For a target object without control information, the target object is usually located according to an xpath (xml Path length) or a position during testing. When the version of the software to be tested is updated, the control information of the software to be tested is changed frequently. Because the updated control information is different from the control information in the original test script, if the original test script is used for testing the updated software, the problem that the target object is determined inaccurately often occurs.
How to improve the accuracy of determining a target object in an automatic test is a technical problem to be solved by the application.
Disclosure of Invention
An object of the embodiments of the present application is to provide a method and an electronic device for testing an application under test, so as to solve the problem that the determination of a target object in an automated test is inaccurate.
In a first aspect, a method for testing an application under test is provided, including:
determining a measured part identifier corresponding to the test content of the tested application according to the test application, wherein the measured part identifier comprises an identifier character;
identifying characters in the application interface to be tested;
when the characters in the application interface to be tested comprise the identification characters, selecting the area of the identification characters in the application interface to be tested as a target area;
and executing the operation corresponding to the test content on the first control positioned in the target area in the tested application interface.
In a second aspect, an electronic device is provided, comprising:
the identification determining module is used for determining the identification of the tested piece corresponding to the test content of the tested application according to the test application, wherein the identification of the tested piece comprises identification characters;
the identification module is used for identifying characters in the application interface to be tested;
the area determining module is used for selecting the area of the identification characters in the tested application interface as a target area when the characters in the tested application interface comprise the identification characters;
and the execution module executes the operation corresponding to the test content on the first control located in the target area in the tested application interface.
In a third aspect, an electronic device is provided, the electronic device comprising a processor, a memory and a computer program stored on the memory and executable on the processor, the computer program, when executed by the processor, implementing the steps of the method according to the first aspect.
In a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored, which computer program, when being executed by a processor, realizes the steps of the method according to the first aspect.
In the embodiment of the application, firstly, the identification of a tested piece corresponding to the test content of the tested application is determined according to the test application to obtain identification characters, then, the characters in the tested application interface are identified, if the characters in the tested application interface comprise the identification characters, the area where the identification characters are located in the tested application interface is determined as a target area, then, an object located in the target area in the tested application interface is determined as a first control, and finally, the operation corresponding to the test content is executed on the first control. By the method, the target object can be accurately positioned according to the identification characters, and the positioning accuracy is improved. Even if the version of the software to be tested is updated, the control information of the software is changed, and the characters visible on the interface are not changed, so that the target object can be accurately determined by the scheme provided by the application, and the problem that the target object is determined inaccurately by the control information in the prior art is solved. In addition, the scheme provided by the application is suitable for the tested software with different versions, so that the maintenance cost can be reduced, the script maintainability is improved, and the automation value is improved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the invention and not to limit the invention. In the drawings:
FIG. 1a is a schematic flow chart of a method for testing an application under test according to an embodiment of the present disclosure;
FIG. 1b is a schematic diagram of an embodiment of a tested application interface;
FIG. 2 is a second schematic flowchart of a method for testing an application under test according to an embodiment of the present disclosure;
FIG. 3 is a third schematic flowchart of a method for testing an application under test according to an embodiment of the present disclosure;
FIG. 4 is a fourth flowchart illustrating a method for testing an application under test according to an embodiment of the present disclosure;
FIG. 5 is a fifth flowchart illustrating a method for testing an application under test according to an embodiment of the present disclosure;
FIG. 6 is a sixth flowchart illustrating a method for testing an application under test according to an embodiment of the present disclosure;
FIG. 7 is a seventh schematic flowchart illustrating a method for testing an application under test according to an embodiment of the present disclosure;
FIG. 8 is one of the scenarios for testing an application under test according to an embodiment of the present application;
FIG. 9 is a second scenario illustrating the testing of an application under test according to an embodiment of the present application;
fig. 10 is a schematic structural diagram of an electronic device of the present application.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention. The reference numbers in the present application are only used for distinguishing the steps in the scheme and are not used for limiting the execution sequence of the steps, and the specific execution sequence is described in the specification.
In the field of automatic testing, when the version of the software to be tested is updated to change the control information, the updated control information can be adapted in a mode of manually modifying the test script, so that the test script can determine a target object according to the control information, and then automatic testing is executed. However, the method consumes more manpower, and has poor maintainability of the test script, high maintenance cost and low automation value.
The target object may be a control in the application under test, that is, the target object is a target control for performing a test operation. If the target control cannot be accurately determined during the test, the operation performed during the test may act on the invalid region, thereby causing the test to fail to achieve the desired effect. It follows that accurate positioning of the target object is essential.
To solve the problems in the prior art, the present application provides a method for testing an application under test, as shown in fig. 1a, including the following steps:
s11: determining a measured part identifier corresponding to the test content of the tested application according to the test application, wherein the measured part identifier comprises an identifier character;
s12: identifying characters in the application interface to be tested;
s13: when the characters in the application interface to be tested comprise the identification characters, selecting the area of the identification characters in the application interface to be tested as a target area;
s14: and executing the operation corresponding to the test content on the first control positioned in the target area in the tested application interface.
In the step S11, the test Application may be a test script, the Application to be tested may be a mobile phone software (App) that needs to be tested, and the test content may be content executed by the test script on the App, for example, the test content may be a click operation executed somewhere in an App interface, or an operation of sliding or dragging executed in the App interface. The measured control piece identification is related to the test content, and the measured control piece identification can comprise the characteristics of the tested control piece. In this embodiment, the measured component identifier includes an identifier word, which may be specifically a word, a phrase, a number, a letter, a punctuation mark, and the like. Preferably, the identification words are words displayed on the tested application interface by the tested control.
In an actual application scenario, the words in the application interface to be tested in step S12 may include plain text words, or words in a picture. Fig. 1b shows a tested application interface, wherein a dashed line in the figure shows plain text characters P in the tested application interface, and the plain text characters are usually in a text format and are difficult to extract. The dotted line in the figure shows the picture characters Q in the application interface to be tested, and the characters in the picture often have the problems of inclination, fusion with background hue and the like, and the extraction difficulty is high. For the characters in the picture, the detected application interface may be identified and extracted through a Character Recognition technology, for example, the characters in the application interface may be identified and extracted through an Optical Character Recognition (OCR) technology. Specifically, the image of the application interface to be detected may be binarized, then optimized processing such as tilt correction and denoising may be performed, then character cutting and recognition may be performed, and finally, layout recovery may be performed on the recognized character, and optimized processing such as proofreading may be performed, thereby obtaining characters in the image. The scheme provided by the application can identify characters with different fonts, different sizes and different colors in the tested application interface.
Subsequently, in step S13, the characters extracted in step S12 may be filtered to determine whether the tested application interface includes the identifier characters. And when the characters in the tested application interface comprise the identification characters, selecting the area of the identification characters in the tested application interface as a target area. The shape of the target area may be a preset shape, such as a rectangle, a circle, etc. The area of the target region may be related to the identification word, for example, if the identification word in the application interface to be tested is small, the area of the target region is small, and if the identification word in the application interface to be tested is large, the area of the target region is large. In addition, the area of the target area may be larger than the area of the area where the identification character is located, that is, the target area is a larger area than the area where the identification character is located.
In step S14, the application interface under test often includes a plurality of controls capable of executing operations, and the plurality of controls may be located in different areas of the application interface under test. According to the scheme, the control located in the target area is used as the first control, and the operation corresponding to the test content is executed on the determined first control. The operation performed on the first control may imitate an operation that a user may possibly perform, and the performed operation may be, for example, clicking, long pressing, and the like, wherein the clicking may be a single-clicking, double-clicking, tapping, and the like.
In the embodiment of the application, firstly, the identification of a tested piece corresponding to the test content of the tested application is determined according to the test application to obtain identification characters, then, the characters in the tested application interface are identified, if the characters in the tested application interface comprise the identification characters, the area where the identification characters are located in the tested application interface is determined as a target area, then, an object located in the target area in the tested application interface is determined as a first control, and finally, the operation corresponding to the test content is executed on the first control. By the method, the target object can be accurately positioned according to the identification characters, and the positioning accuracy is improved. Even if the version of the software to be tested is updated, the control information of the software is changed, and the characters visible on the interface are not changed, so that the target object can be accurately determined by the scheme provided by the application, and the problem that the target object is determined inaccurately by the control information in the prior art is solved. In addition, the scheme provided by the application is suitable for the tested software with different versions, so that the maintenance cost can be reduced, the script maintainability is improved, and the automation value is improved.
Based on the solution provided by the foregoing embodiment, preferably, the measured component identifier further includes an identifier picture, as shown in fig. 2, before the foregoing step S14, the method further includes the following steps:
s15: and when the picture in the tested application interface comprises the identification picture, selecting the area of the identification picture in the tested application interface as a target area.
The identification picture in this embodiment may be an application icon, for example, the desktop of the mobile phone may include icons of multiple apps, and a user may open a corresponding App by clicking the icon. In this embodiment, assuming that the test content is a preset App opened, the identification picture may be an icon of the preset App. And when the picture in the tested application interface comprises the icon of the preset App, selecting the area of the icon of the preset App in the interface as a target area. In this scheme, the area of the target region may be larger than the area of the region where the identification picture is located, that is, the target region may be a region larger than the identification picture.
According to the test content, the operation to be executed for opening the preset App can be a click operation, and in the process of executing the operation later, the actual operation which can be executed by a user can be simulated, and any point in the icon of the preset App is clicked, so that the test of the application to be tested is realized.
In the embodiment of the application, an identification picture is obtained by determining the identification of a tested piece corresponding to the test content of the tested application according to the test application, if the tested application interface comprises the identification picture, the area of the identification picture in the tested application interface is determined as a target area, then an object in the target area in the tested application interface is determined as a first control, and finally the operation corresponding to the test content is executed on the first control. By the method, the target object can be accurately positioned according to the identification picture, and the positioning accuracy is improved. Even if the version of the software to be tested is updated, so that the control information of the software is changed, the icon visible on the interface is not changed, so that the target object can be accurately determined by the scheme provided by the application, and the problem that the target object is determined inaccurately by the control information in the prior art is solved. In addition, the scheme provided by the application is suitable for the tested software with different versions, so that the maintenance cost can be reduced, the script maintainability is improved, and the automation value is improved.
Based on the scheme provided by the embodiment, the measured control part identifier can simultaneously comprise an identifier character and an identifier picture, and when the characters in the measured application interface comprise the identifier character and the measured application interface comprises the identifier picture, the area where the identifier character and the area where the identifier picture are located in the measured application interface can be determined as the target area. The shape of the target area may be predefined, for example, the target area is a rectangle, and when the application interface to be tested includes both the identification text and the identification picture, the target area may be a minimum rectangle including an area where the identification text is located and an area where the identification picture is located. The target region may be an irregular polygon, and the target region may be a continuous region or a plurality of dispersed regions. When the target region is a plurality of regions dispersed, the shape and size of each region may be the same or different.
Based on the solution provided by the foregoing embodiment, as shown in fig. 3, before the foregoing step S14, the method further includes:
s16: acquiring a first operation instruction corresponding to the test content;
wherein, the step S14 includes:
s141: and executing the operation corresponding to the first operation instruction on the first control located in the target area in the tested application interface.
The first operation instruction may be an instruction imitating an actual operation of a user, for example, the first operation instruction may be an instruction imitating the user performing an operation of clicking, long-pressing, sliding, dragging, and the like. Specifically, the first operation instruction to be executed may be determined according to the test content, and the first operation instruction may be code, script, and the like included in the test content.
In step S141, the control located in the target area in the application interface to be tested is determined as the first control, and the operation corresponding to the first operation instruction is executed on the first control. The first operation instruction is determined according to the test content, and the first control is determined according to the tested control identification corresponding to the test content. Therefore, the test of executing the first operation instruction on the first control can be realized through the steps. In addition, the tested control does not need to be positioned through control information in the testing process, so that the problem that the positioning target object is inaccurate due to the change of the control information caused by the upgrading of the tested software and the like is solved. In addition, the scheme reduces the maintenance cost, improves the script maintainability and improves the automation value.
Based on the solution provided by the above embodiment, preferably, as shown in fig. 4, before S14, the method further includes:
s17: acquiring second control position information in the test content, wherein the second control position information comprises the relative position of a second control in the tested application interface relative to the first control;
s18: and determining the second control in the tested application interface according to the position information of the first control and the second control.
In step S17, the second control position information may include a relative position of the second control with respect to the first control in the application interface under test, and the second control position information may be preset by the tester. When the application interface to be tested changes, the position information of the second control can change along with the actual change of the application interface to be tested.
In step S18, a second control is determined in the application interface under test according to the position information of the first control and the second control. Specifically, the area where the first control is located in the application interface to be tested can be used as a reference, the position of the second control is determined according to the relative position, relative to the first control, represented by the position information of the second control, and then the second control at the position is determined.
According to the scheme provided by the application, the second control can be determined in the tested application interface based on the determined position information of the first control and the second control. The method is beneficial to simplifying the flow of determining the target object in the testing process, and for two controls with definite relative positions in the tested application interface, the second control is determined based on the first control, so that the target object can be accurately determined, characters or pictures in the tested application interface do not need to be identified again, the testing steps are simplified, the testing fluency is improved, and the calculated amount is reduced.
Based on the solution provided by the foregoing embodiment, preferably, as shown in fig. 5, the second control position information includes a target position and a target distance of the second control relative to the first control;
wherein the step S18 includes:
s181: and determining a control which is in the target position relative to the first control and is away from the first control by the target distance in the application interface to be tested as the second control.
For example, the second control position information may include a target orientation of the second control relative to the first control that is an up, down, left, right, etc. orientation. The target direction may also be a direction preset by the tester, for example, a connection line between the lower left corner and the upper right corner of the application interface to be tested is preset as a reference line, and the preset direction may be a direction from the lower left corner to the upper right corner along the reference line. For example, if the second control position information includes "below", the control in the tested application interface that is located below the first control may be determined as the second control.
The position information of the second control comprises the target distance of the second control relative to the first control, which can be in a numerical form or a non-numerical form capable of expressing the distance between the first control and the second control. Specifically, the target distance in the form of a numerical value may be, for example, 2 cm, 20 pixels, or the like. Because the display screen of the electronic equipment with the fixed model is fixed, the size and the resolution of the application interface to be tested are not changed when the electronic equipment with the fixed model is tested, and the position of the second control in the application interface to be tested can be determined according to the target distance. Alternatively, the target distance may be in the form of a non-numeric value, such as the 3 rd object.
In addition, the second control position information may also include a target type of the second control to more accurately position the second control. For example, the second control position information includes that the target position is "down", the target distance is "second object", and the target type is "input box". The control corresponding to the second input box positioned below the first control in the application interface to be tested can be determined as the second control.
According to the scheme provided by the application, the position of the second control can be determined based on the target position and the target distance in the information of the application interface to be detected and the position of the second control, and the accuracy of determining the second control is improved.
Based on the solution provided by the above embodiment, preferably, as shown in fig. 6, the method further includes:
s19: acquiring a second operation instruction corresponding to the test content, wherein the second operation instruction comprises operation instructions executed on a plurality of controls;
wherein, the step S14 includes:
s142: and executing the operation corresponding to the second operation instruction on the first control and the second control.
The second operation instruction may be an instruction corresponding to an operation including a plurality of operation points, and the operation including a plurality of operation points may be, for example, a slide operation, a drag operation, or the like. Each operation point may correspond to a control, for example, the second operation instruction is a sliding operation, a starting point of the sliding operation is located in the first control, and an end point of the sliding operation is located in the second control. Subsequently, when the operation corresponding to the second operation instruction is executed on the first control and the second control, the sliding operation from the first control to the second control can be executed in the tested application interface.
According to the scheme provided by the application, the test operation related to the multiple controls can be executed based on the test content, so that the multiple controls are operated and tested, and the test flexibility is improved.
Based on the solutions provided in the foregoing embodiments, preferably, the step S14 includes:
s143: and after the first control is determined and a preset time length passes, executing operation corresponding to the test content on the first control located in the target area in the application interface to be tested.
The preset duration can be set by a tester according to actual requirements, and can also be obtained based on user big data statistics. The scheme can simulate the actual operation of a user, so that the test is closer to the actual application scene, and the test effect is optimized. In addition, after the operation corresponding to the test content is executed on the first control, a delay time can be set, and after the delay time, the subsequent test steps can be executed. Due to the fact that part of operations can change the application interface to be tested, page loading may need some time, and therefore testing can be closer to an actual application scene through the scheme provided by the application, accurate positioning of the target object in the testing process is facilitated, and operations corresponding to testing contents can act on the target object.
Further, an interface for testing the application under test may be as shown in fig. 8, where a dashed box in the figure shows an application under test interface a, and a tester may modify and debug the test application according to the application under test interface. Assuming that the identification words included in the measured control piece identification corresponding to the test content of the application to be tested comprise 'account actual controller' according to the test application, then the words in the application interface a to be tested, which is shown by a dotted line box, are identified. As can be seen from fig. 8, the application interface to be tested includes "an account actual controller", and then the area where the identification text is located is used as a target area, and the operation corresponding to the test content is executed on the first control located in the target area. For example, the operation corresponding to the test content may be a click operation, and in this scheme, a control of an area where the "account actual controller" is located is clicked.
Besides touch operations such as single click, double click, long press and the like, after the first control is determined, an input operation can be performed on the first control. As shown in fig. 9, the application interface B under test includes a plurality of controls that can input content. When the determined first control is a control capable of inputting content, the operation corresponding to the test content may be inputting preset content. In this embodiment, the operation corresponding to the test content may be input "15112665240". When the operation is executed, the first control may be selected first, and the operation of inputting the preset content may be executed on the first control.
In addition, in order to improve the test flexibility, specific instructions such as "click back key", "click home key", and "click enter key" may be included in the test content. When the key corresponding to the specific instruction is not included in the application interface to be tested, the instruction such as "return instruction", "HOME page (HOME) instruction", or "enter instruction" may also be directly executed.
In order to solve the problems in the prior art, the present application further provides an electronic device 100, including:
the identification determining module 101 is configured to determine, according to the test application, a measured object identification corresponding to the test content of the measured application, where the measured object identification includes an identification character;
the identification module 102 is used for identifying characters in the application interface to be tested;
the area determining module 103 is configured to select an area where the identification characters are located in the application interface to be tested as a target area when the characters in the application interface to be tested include the identification characters;
and the execution module 104 is configured to execute an operation corresponding to the test content on a first control located in the target area in the application interface to be tested.
Based on the electronic device that above-mentioned embodiment provided, measured control piece sign still includes the sign picture, electronic device still includes:
and the picture identification module is used for selecting the area of the identification picture in the tested application interface as a target area when the picture in the tested application interface comprises the identification picture.
The electronic device provided based on the above embodiment further includes:
the first acquisition module is used for acquiring a first operation instruction corresponding to the test content;
wherein the execution module is configured to:
and executing the operation corresponding to the first operation instruction on the first control located in the target area in the tested application interface.
The electronic device provided based on the above embodiment further includes:
the position information acquisition module is used for acquiring the position information of a second control in the test content, wherein the position information of the second control comprises the relative position of the second control in the tested application interface relative to the first control;
and the second control determining module is used for determining the second control in the tested application interface according to the first control and the position information of the second control.
Based on the electronic device provided by the above embodiment, the second control position information includes a target position and a target distance of the second control relative to the first control;
wherein the second control determination module is configured to:
and determining a control which is in the target position relative to the first control and is away from the first control by the target distance in the application interface to be tested as the second control.
Based on the electronic device provided by the above embodiment, the electronic device further includes:
acquiring a second operation instruction corresponding to the test content, wherein the second operation instruction comprises operation instructions executed on a plurality of controls;
executing an operation corresponding to the test content on a first control located in the target area in the application interface to be tested, wherein the operation comprises:
and the second acquisition module executes the operation corresponding to the second operation instruction on the first control and the second control.
Based on the electronic device provided in the foregoing embodiment, the execution module is configured to:
and after the first control is determined and a preset time length passes, executing operation corresponding to the test content on the first control located in the target area in the application interface to be tested.
According to the electronic equipment provided by the embodiment of the application, firstly, the identification of the tested part corresponding to the test content of the tested application is determined according to the test application to obtain the identification characters, then, the characters in the tested application interface are identified, if the characters in the tested application interface comprise the identification characters, the area where the identification characters are located in the tested application interface is determined as the target area, then, the object located in the target area in the tested application interface is determined as the first control, and finally, the operation corresponding to the test content is executed on the first control. By the method, the target object can be accurately positioned according to the identification characters, and the positioning accuracy is improved. Even if the version of the software to be tested is updated, the control information of the software is changed, and the characters visible on the interface are not changed, so that the target object can be accurately determined by the scheme provided by the application, and the problem that the target object is determined inaccurately by the control information in the prior art is solved. In addition, the scheme provided by the application is suitable for the tested software with different versions, so that the maintenance cost can be reduced, the script maintainability is improved, and the automation value is improved.
Preferably, an embodiment of the present invention further provides an electronic device, which includes a processor, a memory, and a computer program stored in the memory and capable of running on the processor, and when the computer program is executed by the processor, the method implements each process of the above method for testing an application under test, and can achieve the same technical effect, and details are not repeated here to avoid repetition.
The embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements each process of the above method for testing a tested application, and can achieve the same technical effect, and is not described herein again to avoid repetition. The computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (10)

1. A method of testing an application under test, comprising:
determining a measured part identifier corresponding to the test content of the tested application according to the test application, wherein the measured part identifier comprises an identifier character;
identifying characters in the application interface to be tested;
when the characters in the application interface to be tested comprise the identification characters, selecting the area of the identification characters in the application interface to be tested as a target area;
and executing the operation corresponding to the test content on the first control positioned in the target area in the tested application interface.
2. The method of claim 1, wherein the measured control identification further comprises an identification picture, and before performing an operation corresponding to the test content on a first control in the target area in the application interface under test, the method further comprises:
and when the picture in the tested application interface comprises the identification picture, selecting the area of the identification picture in the tested application interface as a target area.
3. The method of claim 1 or 2, prior to performing an operation corresponding to the test content on a first control in the application interface under test that is located in the target region, further comprising:
acquiring a first operation instruction corresponding to the test content;
executing an operation corresponding to the test content on a first control located in the target area in the application interface to be tested, wherein the operation comprises:
and executing the operation corresponding to the first operation instruction on the first control located in the target area in the tested application interface.
4. The method of claim 1 or 2, wherein prior to performing the operation corresponding to the test content on the first control in the target region in the application interface under test, the method further comprises:
acquiring second control position information in the test content, wherein the second control position information comprises the relative position of a second control in the tested application interface relative to the first control;
and determining the second control in the tested application interface according to the position information of the first control and the second control.
5. The method of claim 4, wherein the second control position information includes a target position and a target distance of the second control relative to the first control;
wherein the determining the second control in the application interface under test according to the position information of the first control and the second control comprises:
and determining a control which is in the target position relative to the first control and is away from the first control by the target distance in the application interface to be tested as the second control.
6. The method of claim 4, wherein the method further comprises:
acquiring a second operation instruction corresponding to the test content, wherein the second operation instruction comprises operation instructions executed on a plurality of controls;
executing an operation corresponding to the test content on a first control located in the target area in the application interface to be tested, wherein the operation comprises:
and executing the operation corresponding to the second operation instruction on the first control and the second control.
7. The method of claim 1 or 2, wherein the performing the operation corresponding to the test content on the first control in the target area in the application interface under test comprises:
and after the first control is determined and a preset time length passes, executing operation corresponding to the test content on the first control located in the target area in the application interface to be tested.
8. An electronic device, comprising:
the identification determining module is used for determining the identification of the tested piece corresponding to the test content of the tested application according to the test application, wherein the identification of the tested piece comprises identification characters;
the identification module is used for identifying characters in the application interface to be tested;
the area determining module is used for selecting the area of the identification characters in the tested application interface as a target area when the characters in the tested application interface comprise the identification characters;
and the execution module executes the operation corresponding to the test content on the first control located in the target area in the tested application interface.
9. An electronic device, comprising: memory, processor and computer program stored on the memory and executable on the processor, which computer program, when executed by the processor, carries out the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which computer program, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 7.
CN201911017290.XA 2019-10-24 2019-10-24 Method for testing tested application and electronic equipment Active CN110765015B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911017290.XA CN110765015B (en) 2019-10-24 2019-10-24 Method for testing tested application and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911017290.XA CN110765015B (en) 2019-10-24 2019-10-24 Method for testing tested application and electronic equipment

Publications (2)

Publication Number Publication Date
CN110765015A true CN110765015A (en) 2020-02-07
CN110765015B CN110765015B (en) 2023-06-16

Family

ID=69333588

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911017290.XA Active CN110765015B (en) 2019-10-24 2019-10-24 Method for testing tested application and electronic equipment

Country Status (1)

Country Link
CN (1) CN110765015B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111488499A (en) * 2020-03-06 2020-08-04 北京健康之家科技有限公司 Public opinion data processing method and device
CN112416775A (en) * 2020-11-24 2021-02-26 北京云聚智慧科技有限公司 Software automation testing method and device based on artificial intelligence and electronic equipment
CN112926420A (en) * 2021-02-09 2021-06-08 海信视像科技股份有限公司 Display device and menu character recognition method
CN112988586A (en) * 2021-03-25 2021-06-18 腾讯科技(深圳)有限公司 Control testing method and device, electronic equipment and storage medium
CN113535587A (en) * 2021-08-09 2021-10-22 联想(北京)有限公司 Target application detection method and device and computer equipment

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB0625578D0 (en) * 2006-12-21 2007-01-31 Ibm Method and system for graphical user interface testing
US20150378876A1 (en) * 2014-06-25 2015-12-31 Vmware, Inc. Visual graphical user interface verification
CN106021108A (en) * 2016-05-19 2016-10-12 努比亚技术有限公司 Application program testing device, mobile terminal and method
CN106776298A (en) * 2016-11-30 2017-05-31 中国直升机设计研究所 A kind of avionics system shows automatic software test method and system
CN108334445A (en) * 2017-12-29 2018-07-27 五八有限公司 Page elements localization method, positioning device, test equipment and storage medium
CN108664364A (en) * 2017-03-31 2018-10-16 腾讯科技(深圳)有限公司 A kind of terminal test method and device
CN109582579A (en) * 2018-11-30 2019-04-05 腾讯音乐娱乐科技(深圳)有限公司 Applied program testing method, device, electronic equipment and storage medium
CN109656827A (en) * 2018-12-17 2019-04-19 北京云测信息技术有限公司 A kind of control tree generation method and terminal device
CN109800153A (en) * 2018-12-14 2019-05-24 深圳壹账通智能科技有限公司 Mobile application test method and device, electronic equipment, storage medium
CN110008110A (en) * 2019-01-28 2019-07-12 阿里巴巴集团控股有限公司 The test method and device of user interface
WO2019141100A1 (en) * 2018-01-18 2019-07-25 腾讯科技(深圳)有限公司 Method and apparatus for displaying additional object, computer device, and storage medium

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB0625578D0 (en) * 2006-12-21 2007-01-31 Ibm Method and system for graphical user interface testing
US20150378876A1 (en) * 2014-06-25 2015-12-31 Vmware, Inc. Visual graphical user interface verification
CN106021108A (en) * 2016-05-19 2016-10-12 努比亚技术有限公司 Application program testing device, mobile terminal and method
CN106776298A (en) * 2016-11-30 2017-05-31 中国直升机设计研究所 A kind of avionics system shows automatic software test method and system
CN108664364A (en) * 2017-03-31 2018-10-16 腾讯科技(深圳)有限公司 A kind of terminal test method and device
CN108334445A (en) * 2017-12-29 2018-07-27 五八有限公司 Page elements localization method, positioning device, test equipment and storage medium
WO2019141100A1 (en) * 2018-01-18 2019-07-25 腾讯科技(深圳)有限公司 Method and apparatus for displaying additional object, computer device, and storage medium
CN109582579A (en) * 2018-11-30 2019-04-05 腾讯音乐娱乐科技(深圳)有限公司 Applied program testing method, device, electronic equipment and storage medium
CN109800153A (en) * 2018-12-14 2019-05-24 深圳壹账通智能科技有限公司 Mobile application test method and device, electronic equipment, storage medium
CN109656827A (en) * 2018-12-17 2019-04-19 北京云测信息技术有限公司 A kind of control tree generation method and terminal device
CN110008110A (en) * 2019-01-28 2019-07-12 阿里巴巴集团控股有限公司 The test method and device of user interface

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111488499A (en) * 2020-03-06 2020-08-04 北京健康之家科技有限公司 Public opinion data processing method and device
CN112416775A (en) * 2020-11-24 2021-02-26 北京云聚智慧科技有限公司 Software automation testing method and device based on artificial intelligence and electronic equipment
CN112416775B (en) * 2020-11-24 2024-03-26 北京云聚智慧科技有限公司 Software automatic test method and device based on artificial intelligence and electronic equipment
CN112926420A (en) * 2021-02-09 2021-06-08 海信视像科技股份有限公司 Display device and menu character recognition method
CN112926420B (en) * 2021-02-09 2022-11-08 海信视像科技股份有限公司 Display device and menu character recognition method
CN112988586A (en) * 2021-03-25 2021-06-18 腾讯科技(深圳)有限公司 Control testing method and device, electronic equipment and storage medium
CN112988586B (en) * 2021-03-25 2023-07-14 腾讯科技(深圳)有限公司 Control testing method and device, electronic equipment and storage medium
CN113535587A (en) * 2021-08-09 2021-10-22 联想(北京)有限公司 Target application detection method and device and computer equipment

Also Published As

Publication number Publication date
CN110765015B (en) 2023-06-16

Similar Documents

Publication Publication Date Title
CN110765015B (en) Method for testing tested application and electronic equipment
US8682083B2 (en) Method and system for webpage regression testing
US8918739B2 (en) Display-independent recognition of graphical user interface control
CN109901996B (en) Auxiliary test method and device, electronic equipment and readable storage medium
US20180039559A1 (en) Method and apparatus for creating reference images for an automated test of software with a graphical user interface
CN107832041B (en) Method, device and equipment for making thematic page and readable storage medium
US9195653B2 (en) Identification of in-context resources that are not fully localized
CN112749081B (en) User interface testing method and related device
CN111399831A (en) Page display method and device, storage medium and electronic device
CN110990010A (en) Software interface code generation method and device
CN112712121B (en) Image recognition model training method, device and storage medium
CN111966600B (en) Webpage testing method, webpage testing device, computer equipment and computer readable storage medium
CN112633341A (en) Interface testing method and device, computer equipment and storage medium
CN111949356A (en) Popup window processing method and device and electronic equipment
CN111782514A (en) Test data comparison method and device
JP2017111500A (en) Character recognizing apparatus, and program
CN111026644B (en) Operation result labeling method and device, storage medium and electronic equipment
CN112286785B (en) Abnormality detection method and device for user interface
CN110851349A (en) Page abnormal display detection method, terminal equipment and storage medium
CN113515280A (en) Page code generation method and device
CN112764849B (en) Desktop icon transformation method and system based on IOS system
CN110533746B (en) Method, device and equipment for generating response type hotspot view and storage medium
US20230343005A1 (en) Methods and Systems for Automated Structured Keyboard Layout Generation
CN114896148A (en) Terminal application automatic testing device, system, method, equipment and storage medium based on image recognition capability
CN116451710A (en) Method, apparatus and storage medium for detecting missing document translation

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20240412

Address after: 100016 building 4, Dongfang Science Park, 52 Jiuxianqiao Road, Chaoyang District, Beijing

Patentee after: BEIJING TESTIN INFORMATION TECHNOLOGY Co.,Ltd.

Country or region after: China

Address before: 102425 building 31, 69 Yanfu Road, Fangshan District, Beijing

Patentee before: Beijing Yunju Intelligent Technology Co.,Ltd.

Country or region before: China