CN110765015B - Method for testing tested application and electronic equipment - Google Patents

Method for testing tested application and electronic equipment Download PDF

Info

Publication number
CN110765015B
CN110765015B CN201911017290.XA CN201911017290A CN110765015B CN 110765015 B CN110765015 B CN 110765015B CN 201911017290 A CN201911017290 A CN 201911017290A CN 110765015 B CN110765015 B CN 110765015B
Authority
CN
China
Prior art keywords
control
application interface
tested
tested application
test
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911017290.XA
Other languages
Chinese (zh)
Other versions
CN110765015A (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, which are used for solving the problem that a target object is inaccurately determined in an automatic test. The scheme comprises the following steps: determining a tested piece identifier corresponding to the test content of the tested application according to the test application, wherein the tested piece identifier comprises identification characters; identifying characters in the tested application interface; when the characters in the tested application interface comprise the identification characters, selecting the area where the identification characters are in the tested application interface 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. Even if the version of the tested software is updated to change the control information of the software, the visible characters 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 maintenance cost, improves script maintainability and improves automation value.

Description

Method for testing tested application and electronic equipment
Technical Field
The present invention relates to the field of automated testing, and in particular, to a method and an electronic device for testing an application under test.
Background
In the field of automatic testing, an automatic 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 higher. For target objects without control information, positioning according to XPath (XML Path Language) or position is usually needed during testing. When the tested software version is updated, the control information of the tested software often changes. Because the updated control information is different from the control information in the original test script, if the original test script is adopted to test the updated software, the problem of inaccurate determination of the target object 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 method.
Disclosure of Invention
The embodiment of the application aims to provide a method and electronic equipment for testing an application to be tested, which are used for solving the problem that the determination of a target object in automatic testing is inaccurate.
In a first aspect, a method for testing an application under test is provided, including:
determining a tested piece identifier corresponding to test content of the tested application according to the test application, wherein the tested piece identifier comprises identification characters;
identifying characters in the tested application interface;
when the characters in the tested application interface comprise the identification characters, selecting the area where the identification characters are located in the tested application interface 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, there is provided an electronic device comprising:
the identification determining module is used for determining a measured and controlled piece identification corresponding to the test content of the measured and controlled application according to the test application, wherein the measured and controlled piece identification comprises identification characters;
the identification module is used for identifying characters in the tested application interface;
the area determining module is used for selecting an area where the identification text is located in the tested application interface as a target area when the text in the tested application interface comprises the identification text;
and the execution module is used for executing the operation corresponding to the test content on the first control positioned in the target area in the tested application interface.
In a third aspect, there is provided an electronic device comprising a processor, a memory and a computer program stored on the memory and executable on the processor, the computer program implementing the steps of the method as in the first aspect when executed by the processor.
In a fourth aspect, there is provided a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the method as in the first aspect.
In the embodiment of the application, firstly, a tested part identifier corresponding to test content of a tested application is determined according to the test application to obtain an identification character, then characters in an application interface are identified, if the characters in the application interface include the identification character, the area where the identification character is located in the application interface is determined to be a target area, then an object located in the target area in the application interface is determined to be a first control, and finally an 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 text, and positioning accuracy is improved. 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 through the scheme provided by the application, and the problem that the target object is inaccurate to be determined through the control information in the prior art is avoided. 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 do not constitute a limitation on the invention. In the drawings:
FIG. 1a is a flow chart of a method for testing an application under test according to one embodiment of the present disclosure;
FIG. 1b is a diagram of an application interface under test for one embodiment of the present solution;
FIG. 2 is a second flow chart of a method for testing an application under test according to an embodiment of the present invention;
FIG. 3 is a third flow chart of a method for testing an application under test according to an embodiment of the present invention;
FIG. 4 is a fourth flow chart of a method of testing an application under test according to one embodiment of the present disclosure;
FIG. 5 is a flow chart of a method for testing an application under test according to one embodiment of the present disclosure;
FIG. 6 is a flow chart of a method for testing an application under test according to one embodiment of the present disclosure;
FIG. 7 is a flow chart of a method for testing an application under test according to one embodiment of the present disclosure;
FIG. 8 is one of the schematic diagrams of a scenario in which one embodiment of the present application tests an application under test;
FIG. 9 is a second schematic view of a scenario in which one embodiment of the present application tests an application under test;
fig. 10 is a schematic structural view of an electronic device of the present application.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention. The reference numerals in the present application are only used to distinguish the steps in the scheme, and are not used to limit the execution sequence of the steps, and the specific execution sequence controls the description in the specification.
In the field of automatic testing, when the version of the tested software is updated to change the control information, the updated control information can be adapted by manually modifying the test script, so that the test script can determine a target object according to the control information, and further automatic testing can be executed. However, this method requires much labor, and the test script has poor maintainability, high maintenance cost, and low automation value.
The target object may be a control in the application under test, i.e. the target object is a target control performing the test operation. If the target control is not accurately determined during the test, then the operations performed during the test may act on the inactive area, thereby resulting in the test not achieving the desired effect. It follows that accurate localization of the target object is necessary.
For 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 tested piece identifier corresponding to test content of the tested application according to the test application, wherein the tested piece identifier comprises identification characters;
s12: identifying characters in the tested application interface;
s13: when the characters in the tested application interface comprise the identification characters, selecting the area where the identification characters are located in the tested application interface 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 mobile phone software (App) to be tested, and the test content may be the content executed by the test script on the App, for example, the test content may be a click operation performed somewhere in the App interface, or a sliding operation, a dragging operation performed in the App interface, or the like. The measured control element identifier is related to the test content, and the measured control element identifier can comprise characteristics of the tested control element. In this embodiment, the measured element identifier includes an identifier word, where the identifier word may be a word, a phrase, or a number, a letter, a punctuation mark, or the like. Preferably, the identification text is the text displayed by the tested control on the tested application interface.
In an actual application scenario, the text in the tested application interface in step S12 may include plain text, or may include text in a picture. Fig. 1b shows a tested application interface, wherein the linear dotted line shows the plain text characters P in the tested application interface, and the plain text characters are usually in a text format, so that the extraction difficulty is low. The dot-dash line in the figure shows the picture character Q in the tested application interface, and the characters in the picture often have the problems of inclination, fusion with background color and the like, so that the extraction difficulty is high. For the characters in the pictures, the characters in the application interface to be tested can be identified and extracted through a character recognition technology, for example, the characters in the application interface can be identified and extracted through an optical character recognition (Optical Character Recognition, OCR) technology. Specifically, the image of the tested application interface can be binarized, then optimized such as inclination correction and denoising are performed, then character cutting and recognition are performed, finally layout recovery is performed on the recognized characters, and in addition, correction and other optimized processes can be performed, so that characters in the image are obtained. The scheme provided by the application interface identification method and the application interface identification device can identify characters with different fonts, different sizes and different colors in the tested application interface.
Then, in step S13, the text extracted in step S12 may be screened to determine whether the detected application interface includes the identification text. When the characters in the tested application interface comprise the identification characters, selecting the area where the identification characters are located 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, or the like. The area of the target area may be related to the identification text, for example, if the identification text in the tested application interface is smaller, the area of the target area is smaller, and if the identification text in the tested application interface is larger, the area of the target area is larger. In addition, the area of the target area may be larger than the area of the area where the identification text is located, that is, the target area is an area larger than the area where the identification text is located.
In step S14, the tested application interface often includes a plurality of controls capable of executing operations, and the plurality of controls may be located in different areas in the tested application interface. The control located in the target area is used as a 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 mimic an operation that a user may perform, e.g., a click, a long press, etc., where the click may be a single click, a double click, a tap, etc.
In the embodiment of the application, firstly, a tested part identifier corresponding to test content of a tested application is determined according to the test application to obtain an identification character, then characters in an application interface are identified, if the characters in the application interface include the identification character, the area where the identification character is located in the application interface is determined to be a target area, then an object located in the target area in the application interface is determined to be a first control, and finally an 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 text, and positioning accuracy is improved. 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 through the scheme provided by the application, and the problem that the target object is inaccurate to be determined through the control information in the prior art is avoided. 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 in the foregoing embodiment, preferably, the measured device identifier further includes an identifier picture, as shown in fig. 2, and before step S14, the method further includes the following steps:
s15: when the picture in the tested application interface comprises the identification picture, selecting the area where the identification picture is located in the tested application interface as a target area.
The identification picture in this embodiment may be an application icon, for example, an icon that may include multiple apps on a desktop of a mobile phone, and a user may open the corresponding apps by clicking the icon. In this embodiment, assuming that the test content is to open a preset App, the identification picture may be an icon of the preset App. When the picture in the tested application interface comprises the icon of the preset App, selecting the area where the icon of the preset App is located in the interface as a target area. In this embodiment, the area of the target area may be larger than the area of the area where the identification picture is located, that is, the target area may be a larger area than the identification picture.
According to the test content, the operation to be executed when the preset App is opened can be a clicking operation, and then the actual operation possibly executed by a user can be simulated in the process of executing the operation, and any point in the icon of the preset App is clicked, so that the test of the tested application is realized.
In the embodiment of the application, firstly, a measured and controlled piece identifier corresponding to test content of a tested application is determined according to the test application to obtain an identifier picture, if the identifier picture is included in a tested application interface, the area where the identifier picture is located in the tested application interface is determined to be a target area, then an object located in the target area in the tested application interface is determined to be a first control, and finally, an 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 positioning accuracy is improved. Even if the version of the software to be tested is updated to change the control information of the software, the icon visible on the interface is not changed, so that the target object can be accurately determined through the scheme provided by the application, and the problem that the target object is inaccurate to be determined through the control information in the prior art is avoided. 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 identifier of the measured and controlled device can simultaneously comprise the identifier text and the identifier picture, and when the text in the measured and controlled application interface comprises the identifier text and the identifier picture in the measured and controlled application interface, the area where the identifier text and the identifier picture in the measured and controlled application interface are located can be determined as the target area. The shape of the target area may be predefined, for example, the target area is rectangular, and when the tested application interface includes both the identification text and the identification picture, the target area may be a minimum rectangle including the area where the identification text is located and the area where the identification picture is located. The target region may be an irregular polygon, and may be a continuous region or a plurality of scattered regions. When the target area is a plurality of scattered areas, the shape and size of each area may be the same or different.
Based on the solution provided in the foregoing embodiment, as shown in fig. 3, before 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 a first control positioned in the target area in the tested application interface.
The first operation instruction may be an instruction imitating an actual operation of the user, for example, the first operation instruction may be an instruction imitating an operation of clicking, long pressing, sliding, dragging, or the like performed by the user. Specifically, a first operation instruction to be executed may be determined according to the test content, and the first operation instruction may be a code, a script, or the like included in the test content.
In the 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 piece identification corresponding to the test content. Therefore, through the steps, the test of executing the first operation instruction on the first control can be realized. In addition, the tested control is not required to be positioned through the control information in the testing process, so that the problem that the positioning target object is inaccurate due to control information change caused by the reasons of upgrading the tested software and the like is avoided. In addition, the scheme reduces maintenance cost, improves script maintainability and improves automation value.
Based on the solution provided in the foregoing 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 the second control relative to the first control in the tested application interface;
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, where the second control position information may be preset by the tester. When the tested application interface changes, the second control position information can change along with the actual change of the tested application interface.
In step S18, a second control is determined in the tested application interface according to the first control and the second control position information. Specifically, an area where the first control is located in the tested application interface can be used as a reference, and the position of the second control is determined according to the relative position, relative to the first control, characterized by the position information of the second control, so that the second control at the position is determined.
According to the scheme provided by the application interface detection method, the second control can be determined in the detected application interface based on the determined first control and the determined second control position information. The method is beneficial to simplifying the process of determining the target object in the test 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 test steps are simplified, the test fluency is improved, and the calculated amount is reduced.
Based on the solution provided in the foregoing embodiment, preferably, as shown in fig. 5, the second control position information includes a target azimuth 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 positioned at a target position relative to the first control and is at the target distance from the first control in the tested application interface as the second control.
For example, the second control location 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 azimuth may be a preset azimuth of the direction set by the tester, for example, a line connecting the lower left corner and the upper right corner of the tested application interface is preset as a reference line, and the preset direction may be a direction from lower left to upper right along the reference line. For example, the second control location information includes "below," then the control located below the first control in the application interface under test may be determined to be the second control.
The target distance of the second control relative to the first control included in the second control position information can be in a numerical value form or a non-numerical value 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 through the target distance. Alternatively, the target distance may be in a non-numeric form, such as object 3.
In addition, the second control location information may also include a target type of the second control to more accurately locate the second control. For example, the second control position information includes a target azimuth of "down", a target distance of "second object", and a target type of "input box". The control corresponding to the second input box below the first control in the tested application interface can be determined to be the second control.
By the scheme provided by the application interface and the second control position determining method, the position of the second control can be determined based on the target azimuth and the target distance in the detected application interface and the second control position information, and accuracy of determining the second control is improved.
Based on the solution provided in the foregoing embodiment, 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 the plurality of operation points may be, for example, a sliding operation, a drag operation, or the like. Each operation point may correspond to one control, for example, the second operation instruction is a sliding operation, a start 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. Then, when the operation corresponding to the second operation instruction is executed on the first control and the second control, a 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 plurality of controls can be executed based on the test content, so that the plurality of controls are subjected to operation test, and the flexibility of the test is improved.
Based on the solution provided in the foregoing embodiment, preferably, the step S14 includes:
s143: and starting from the first control, after a preset time period, executing an operation corresponding to the test content on the first control positioned in the target area in the tested application interface.
The preset time length can be set by a tester according to actual demands, 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 an actual application scene, and the test effect is optimized. In addition, after the operation corresponding to the test content is performed on the first control, a delay time may be set, and after the delay time has elapsed, the subsequent test step may be performed. Because part of the operation can change the tested application interface and possibly needs some time to load pages, the scheme provided by the application can enable the test to be closer to an actual application scene, is favorable for accurately positioning a target object in the test process, and enables the operation corresponding to the test content to act on the target object.
Further, the interface for testing the tested application may be shown in fig. 8, where the dashed box shows the tested application interface a, and the tester may modify and debug the tested application according to the tested application interface. And if the identification words included in the measured and controlled piece identifications corresponding to the test content of the tested application are determined to comprise 'account actual controller' according to the test application, then the words in the tested application interface A shown by a dotted line box are identified. As can be seen from fig. 8, the tested application interface includes "account actual controller", and then the area where the identification text is located is taken as the target area, and the operation corresponding to the test content is executed for the first control located in the target area. For example, the operation corresponding to the test content may be a clicking operation, and in this embodiment, a control of the area where the "account actual control person" is located is clicked.
In addition to the touch operations of one click, double click, long press, etc., an input operation may be performed on the first control after the first control is determined. 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 can be to input preset content. In this embodiment, the operation corresponding to the test content may be the input of "15112665240". When the operation is executed, the first control can be selected first, and the operation of inputting the preset content is executed for the first control.
In addition, to improve the flexibility of the test, specific instructions, such as "click back", "click home", "click enter", may be included in the test content. When the key corresponding to the specific instruction is not included in the tested application interface, the instruction such as "return instruction", "HOME page (HOME) instruction", "enter instruction" may be directly executed.
In order to solve the problems existing in the prior art, the present application further provides an electronic device 100, including:
the identification determining module 101 determines a measured and controlled piece identification corresponding to the test content of the measured and controlled application according to the test application, wherein the measured and controlled piece identification comprises identification characters;
the identification module 102 is used for identifying characters in the tested application interface;
the area determining module 103 is used for selecting an area where the identification text is located in the tested application interface as a target area when the text in the tested application interface comprises the identification text;
and the execution module 104 executes the operation corresponding to the test content on the first control positioned in the target area in the tested application interface.
Based on the electronic device provided in the foregoing embodiment, the measured and controlled device identifier further includes an identifier picture, and the electronic device further includes:
and the picture identification module is used for selecting the area where the identification picture is located 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 acquires a first operation instruction corresponding to the test content;
wherein, the execution module is used for:
and executing the operation corresponding to the first operation instruction on a first control positioned 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 acquires second control position information in the test content, wherein the second control position information comprises the relative position of the second control relative to the first control in the tested application interface;
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 second control position information.
Based on the electronic device provided in the foregoing embodiment, the second control position information includes a target azimuth and a target distance of the second control relative to the first control;
the second control determining module is used for:
and determining a control which is positioned at a target position relative to the first control and is at the target distance from the first control in the tested application interface as the second control.
Based on the electronic device provided in the foregoing 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;
and executing the operation corresponding to the test content on the first control positioned in the target area in the tested application interface, wherein the operation comprises the following steps:
and the second acquisition module is used for executing 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 starting from the first control, after a preset time period, executing an operation corresponding to the test content on the first control positioned in the target area in the tested application interface.
According to the electronic equipment provided by the embodiment of the application, firstly, the identifier text is obtained by determining the identifier of the tested part corresponding to the test content of the tested application according to the test application, then the text in the tested application interface is identified, if the text in the tested application interface comprises the identifier text, the area where the identifier text is located in the tested application interface is determined to be a target area, then the object located in the target area in the tested application interface is determined to be 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 text, and positioning accuracy is improved. 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 through the scheme provided by the application, and the problem that the target object is inaccurate to be determined through the control information in the prior art is avoided. 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, the embodiment of the present application further provides an electronic device, including a processor, a memory, and a computer program stored in the memory and capable of running on the processor, where the computer program when executed by the processor implements each process of the above embodiment of the method for testing an application to be tested, and the process can achieve the same technical effect, so that repetition is avoided, and details are not repeated herein.
The embodiment of the present invention further provides a computer readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements each process of the above embodiment of the method for testing an application to be tested, and can achieve the same technical effects, so that repetition is avoided, and no further description is given here. Wherein the computer readable storage medium is selected from Read-Only Memory (ROM), random access Memory (Random Access Memory, RAM), magnetic disk or 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 one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the method according to the embodiments of the present invention.
The embodiments of the present invention have been described above with reference to the accompanying drawings, but the present invention is not limited to the above-described embodiments, which are merely illustrative and not restrictive, and many forms may be made by those having ordinary skill in the art without departing from the spirit of the present invention and the scope of the claims, which are to be protected by the present invention.

Claims (9)

1. A method of testing an application under test, comprising:
determining a tested piece identifier corresponding to test content of the tested application according to the test application, wherein the tested piece identifier comprises identification characters;
identifying characters in the tested application interface;
when the characters in the tested application interface comprise the identification characters, selecting the area where the identification characters are located in the tested application interface as a target area;
executing operation corresponding to the test content on a first control located in the target area in the tested application interface;
wherein before executing the operation corresponding to the test content on the first control located in the target area in the application interface under test, the method further includes:
acquiring second control position information in the test content, wherein the second control position information comprises the relative position of the second control relative to the first control in the tested application interface;
and determining the second control in the tested application interface according to the position information of the first control and the second control.
2. The method of claim 1, wherein the device under test identifier further comprises an identifier picture, the method further comprising, prior to performing an operation corresponding to the test content on a first control located in the target area in the application interface under test:
when the picture in the tested application interface comprises the identification picture, selecting the area where the identification picture is located in the tested application interface as a target area.
3. The method of claim 1 or 2, further comprising, prior to performing an operation corresponding to the test content on a first control located in the target area in the application under test interface:
acquiring a first operation instruction corresponding to the test content;
the executing the operation corresponding to the test content on the first control located in the target area in the tested application interface comprises the following steps:
and executing the operation corresponding to the first operation instruction on a first control positioned in the target area in the tested application interface.
4. The method of claim 1, 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 tested application interface according to the first control and the second control position information comprises:
and determining a control which is positioned at a target position relative to the first control and is at the target distance from the first control in the tested application interface as the second control.
5. The method of claim 1, 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;
and executing the operation corresponding to the test content on the first control positioned in the target area in the tested application interface, wherein the operation comprises the following steps:
and executing the operation corresponding to the second operation instruction on the first control and the second control.
6. The method of claim 1 or 2, wherein the performing an operation corresponding to the test content on a first control located in the target area in the application under test interface includes:
and starting from the first control, after a preset time period, executing an operation corresponding to the test content on the first control positioned in the target area in the tested application interface.
7. An electronic device, comprising:
the identification determining module is used for determining a measured and controlled piece identification corresponding to the test content of the measured and controlled application according to the test application, wherein the measured and controlled piece identification comprises identification characters;
the identification module is used for identifying characters in the tested application interface;
the area determining module is used for selecting an area where the identification text is located in the tested application interface as a target area when the text in the tested application interface comprises the identification text;
the execution module is used for executing the operation corresponding to the test content on the first control positioned in the target area in the tested application interface;
the position information acquisition module acquires second control position information in the test content, wherein the second control position information comprises the relative position of the second control relative to the first control in the tested application interface;
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 second control position information.
8. An electronic device, comprising: memory, a processor and a computer program stored on the memory and executable on the processor, which when executed by the processor, performs the steps of the method according to any one of claims 1 to 6.
9. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, implements the steps of the method according to any one of claims 1 to 6.
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 CN110765015A (en) 2020-02-07
CN110765015B true 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)

Families Citing this family (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
CN112416775B (en) * 2020-11-24 2024-03-26 北京云聚智慧科技有限公司 Software automatic test method and device based on artificial intelligence and electronic equipment
CN112926420B (en) * 2021-02-09 2022-11-08 海信视像科技股份有限公司 Display device and menu character recognition method
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

Citations (2)

* 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
WO2019141100A1 (en) * 2018-01-18 2019-07-25 腾讯科技(深圳)有限公司 Method and apparatus for displaying additional object, computer device, and storage medium

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9846634B2 (en) * 2014-06-25 2017-12-19 Vmware, Inc. Visual graphical user interface verification
CN106021108B (en) * 2016-05-19 2018-11-20 努比亚技术有限公司 application 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
CN108664364B (en) * 2017-03-31 2023-05-09 腾讯科技(深圳)有限公司 Terminal testing method and device
CN108334445A (en) * 2017-12-29 2018-07-27 五八有限公司 Page elements localization method, positioning device, test equipment and storage medium
CN109582579B (en) * 2018-11-30 2022-04-15 腾讯音乐娱乐科技(深圳)有限公司 Application program testing method and device, electronic equipment and storage medium
CN109800153A (en) * 2018-12-14 2019-05-24 深圳壹账通智能科技有限公司 Mobile application test method and device, electronic equipment, storage medium
CN109656827B (en) * 2018-12-17 2021-10-19 北京云测信息技术有限公司 Control tree generation method and terminal equipment
CN110008110B (en) * 2019-01-28 2022-07-22 创新先进技术有限公司 User interface testing method and device

Patent Citations (2)

* 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
WO2019141100A1 (en) * 2018-01-18 2019-07-25 腾讯科技(深圳)有限公司 Method and apparatus for displaying additional object, computer device, and storage medium

Also Published As

Publication number Publication date
CN110765015A (en) 2020-02-07

Similar Documents

Publication Publication Date Title
CN110765015B (en) Method for testing tested application and electronic equipment
US9846634B2 (en) Visual graphical user interface verification
CN109871326B (en) Script recording method and device
US8682083B2 (en) Method and system for webpage regression testing
CN108959068B (en) Software interface testing method, device and storage medium
CN109901996B (en) Auxiliary test method and device, electronic equipment and readable storage medium
US11194596B2 (en) Simulating human interface interaction resilient to user interface changes
CN112749081B (en) User interface testing method and related device
CN108153915B (en) Internet-based educational information rapid acquisition method
US10248392B2 (en) Replicating a web technology
CN110990010A (en) Software interface code generation method and device
CN106959919B (en) Software testing method and device based on testing path diagram
CN115982005A (en) Automatic testing method and device based on artificial intelligence
CN113608805B (en) Mask prediction method, image processing method, display method and device
CN111966600B (en) Webpage testing method, webpage testing device, computer equipment and computer readable storage medium
CN112988568A (en) Game testing method and device and electronic equipment
CN112633341A (en) Interface testing method and device, computer equipment and storage medium
CN112506778A (en) WEB user interface automatic test method, device, equipment and storage medium
CN105930845B (en) The teaching method and its device of component information
JP2017111500A (en) Character recognizing apparatus, and program
CN115860827A (en) Mobile terminal advertisement testing method and system
CN115048302A (en) Front-end compatibility testing method and device, storage medium and electronic equipment
CN111460767B (en) HMI flow chart generation method and device
CN113886906A (en) CAD drawing loading method, font file replacing method, device and storage medium
CN114116440A (en) Page display result testing method and device, storage medium and equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
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