CN105743736A - Automated testing method and system - Google Patents
Automated testing method and system Download PDFInfo
- Publication number
- CN105743736A CN105743736A CN201610056854.0A CN201610056854A CN105743736A CN 105743736 A CN105743736 A CN 105743736A CN 201610056854 A CN201610056854 A CN 201610056854A CN 105743736 A CN105743736 A CN 105743736A
- Authority
- CN
- China
- Prior art keywords
- control
- identification
- tested
- searching
- controls
- 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
Links
- 238000012360 testing method Methods 0.000 title claims abstract description 112
- 238000004422 calculation algorithm Methods 0.000 claims description 11
- 230000004044 response Effects 0.000 claims description 6
- 238000000034 method Methods 0.000 abstract description 25
- 230000008569 process Effects 0.000 abstract description 8
- BUGBHKTXTAQXES-UHFFFAOYSA-N Selenium Chemical compound [Se] BUGBHKTXTAQXES-UHFFFAOYSA-N 0.000 description 12
- 229910052711 selenium Inorganic materials 0.000 description 12
- 239000011669 selenium Substances 0.000 description 12
- 230000006870 function Effects 0.000 description 5
- 238000013515 script Methods 0.000 description 5
- 230000008901 benefit Effects 0.000 description 4
- 210000000481 breast Anatomy 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 238000002360 preparation method Methods 0.000 description 2
- 230000003252 repetitive effect Effects 0.000 description 2
- VYZAMTAEIAYCRO-UHFFFAOYSA-N Chromium Chemical compound [Cr] VYZAMTAEIAYCRO-UHFFFAOYSA-N 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 238000007796 conventional method Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000001914 filtration Methods 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 210000005075 mammary gland Anatomy 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000004806 packaging method and process Methods 0.000 description 1
- 238000012805 post-processing Methods 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
- 238000012795 verification Methods 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/08—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
- H04L43/0805—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
- H04L43/0817—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking functioning
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/50—Testing arrangements
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/34—Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Environmental & Geological Engineering (AREA)
- Debugging And Monitoring (AREA)
Abstract
The invention provides an automated testing method and system. The method comprises the following steps: finding a plurality of controls to be tested of a test object by using control IDs, performing first identification on the controls to be tested which cannot be positioned normally with the control IDs, and finding the controls to be tested which cannot be positioned with the control IDs based on the first identification; performing second identification on the controls to be tested which still cannot be positioned normally after the first identification, and finding the controls to be tested which still cannot be positioned normally after the first identification based on the second identification; and finally, performing automated testing on the test object based on found controls to be tested. The controls to be tested are identified gradually in order that each control to be tested has a unique identifier, so that the problems that the control IDs of the controls do not exist in a page, the control IDs are all the same or the controls cannot be found since the page is too complicated are solved; a process of finding a target control is simplified; and the control finding efficiency is increased.
Description
Technical Field
The invention relates to the technical field of internet testing, in particular to an automatic testing method and system.
Background
In the field of automated testing, there are generally two methods for developing traditional automated test scripts for automated testing. The first method is to generate a test script by manually running a test once and recording the operation performed by using the recording function of an automatic test tool. The script generated by the technology has low playback success rate and difficult later maintenance. The second method is to compile a test framework to provide an interface for calling basic operation required by testing, and a tester manually compiles an automatic test script for calling the interface according to the operation requirements of cases.
In the automatic test, the control is usually positioned by the ID of the control, and the test is performed after the positioning is completed. However, in the actual operation process, the problem of control ID duplication or no control ID often occurs, and for the case where the control cannot be located, the second method, i.e., the method of requiring development of code writing or adding a control ID, is generally adopted, but a large amount of time is consumed based on the method. Moreover, when the above problems occur in the case of a web page with a very complex page, the difficulty of positioning the control of the web page is further increased.
Therefore, providing an automated testing method to efficiently search for a control of a page is an urgent problem to be solved by those skilled in the art.
Disclosure of Invention
The invention aims to provide an automatic testing method and system to solve the problem that the conventional automatic testing cannot efficiently search a control of a page.
In order to solve the above technical problem, the present invention provides an automatic testing method, which includes:
starting a test object;
searching a plurality of to-be-tested controls contained in the test object by using the control IDs;
carrying out first identification on a to-be-tested control which cannot be normally positioned by using a control ID, and searching the to-be-tested control which cannot be normally positioned by using the control ID based on the first identification;
performing second identification on a to-be-tested control which cannot be normally positioned after the first identification is performed, and searching the to-be-tested control which cannot be normally positioned after the first identification is performed based on the second identification, wherein the to-be-tested control which cannot be normally positioned is the to-be-tested control without a unique identification, and identification principles of the first identification and the second identification are different;
and automatically testing the test object based on the searched to-be-tested control.
Optionally, the automated testing method further includes: and searching the to-be-tested control which cannot be positioned normally after the second identification by using the Sikuli based on image comparison.
Optionally, in the automatic testing method, JQuery is used to perform a first identification on a to-be-tested control that cannot be normally located by using a control ID, where an identification principle of the first identification is to identify according to an attribute of the to-be-tested control.
Optionally, in the automated testing method, the attributes of the control to be tested are:
a combination of both the type of control and the control ID; or,
a combination of both control name and control ID.
Optionally, in the automated testing method, a JQueryEasyUI is used to perform a second identification on a to-be-tested control that cannot be normally positioned after the first identification is performed, where the identification principle of the second identification is to add a new attribute to the to-be-tested control.
Optionally, in the automated testing method, the searching for the to-be-tested control that cannot be normally positioned after the second identification is performed by using the Sikuli in an image contrast-based manner includes:
and comparing the pre-stored screenshots with the display images of the different types of controls one by one, and searching the to-be-tested controls according to the preset algorithms corresponding to the different types of controls.
Optionally, in the automated testing method, the predetermined algorithm is related to the type of the control:
if the type of the control is an event response type, positioning the control by using a central point of a display image during searching;
and if the type of the control is an input type, positioning the control according to the central point of the display image during searching and a preset offset.
The invention also provides an automatic test system, which comprises:
the first searching control module is used for searching a plurality of to-be-tested controls contained in the test object by using the control IDs;
the second searching control module is used for carrying out first identification on the to-be-tested control which cannot be normally positioned by using the control ID and searching the to-be-tested control which cannot be normally positioned by using the control ID based on the first identification;
the third finding control module is used for carrying out second identification on the to-be-tested control which cannot be normally positioned after the first identification is carried out, and finding the to-be-tested control which cannot be normally positioned after the first identification is carried out on the basis of the second identification, wherein the to-be-tested control which cannot be normally positioned is the to-be-tested control without a unique identification, and the identification principles of the first identification and the second identification are different;
and the testing module is used for automatically testing the testing object based on the searched to-be-tested control.
Optionally, the automated testing system further includes:
and the fourth control searching module is used for searching the to-be-tested control which cannot be normally positioned after the second identification by using a Sikuli mode based on image comparison when the to-be-tested control which cannot be normally positioned after the second identification is carried out.
Optionally, in the automatic testing system, JQuery is used to perform a first identification on a to-be-tested control that cannot be normally located by using a control ID, where an identification principle of the first identification is to identify according to an attribute of the to-be-tested control.
Optionally, in the automatic test system, the attributes of the control are:
a combination of both the type of control and the control ID; or,
a combination of both control name and control ID.
Optionally, in the automatic testing system, a JQueryEasyUI is used to perform a second identification on the to-be-tested control that cannot be normally positioned after the first identification is performed, where the identification principle of the second identification is to add a new attribute to the to-be-tested control.
Optionally, in the automatic test system, the fourth search control module includes:
and the comparison module is used for comparing the prestored screenshots with the display images of the different types of controls one by one and searching the to-be-tested controls according to the preset algorithms corresponding to the different types of controls.
Optionally, in the automated testing system, the predetermined algorithm is related to the type of the control:
if the type of the control is an event response type, positioning the control by using a central point of a display image during searching;
and if the type of the control is an input type, positioning the control according to the central point of the display image during searching and a preset offset.
In the automatic testing method and the system provided by the invention, a plurality of to-be-tested controls of a testing object are searched by using a control ID, a first identification is carried out on the to-be-tested controls which cannot be normally positioned by using the control ID, and the to-be-tested controls which cannot be normally positioned by using the control ID are searched based on the first identification; and carrying out second identification on the to-be-tested control which cannot be normally positioned after the first identification is carried out, searching the to-be-tested control which cannot be normally positioned after the first identification is carried out based on the second identification, and finally carrying out automatic test on the test object based on the searched to-be-tested control. The controls to be tested are successively identified so that each control to be tested has a unique identification, the problem that the controls in the page have no control IDs, the control IDs are all the same or the controls cannot be searched due to the excessively complex page is solved, the process of searching the target controls is simplified, and the efficiency of searching the controls is improved.
Drawings
FIG. 1 is a flow chart of an automated testing method in one embodiment of the invention;
FIG. 2 is a block diagram of an automated test system according to another embodiment of the invention.
In FIG. 2, a first seek control module-10; a second find control module-11; a third searching control module-12; a fourth find control module-13; test module-14.
Detailed Description
The automated testing method and system of the present invention will be described in detail with reference to the accompanying drawings and specific embodiments. Advantages and features of the present invention will become apparent from the following description and from the claims. It is to be noted that the drawings are in a very simplified form and are not to precise scale, which is merely for the purpose of facilitating and distinctly claiming the embodiments of the present invention.
For better understanding of the technical aspects of the present invention, the technical terms are herein read in detail.
Selenium is a tool for Web application testing. The Selenium test runs directly in the browser, just as a real user is operating. The supported browsers include IEs (7, 8, 9), Mozilla Firefox, Mozilla suite, and the like. The main functions of this tool include: testing compatibility with browsers-testing applications see if they can work well on different browsers and operating systems. Testing system function-creating regression testing verification software function and user requirements. And test scripts of different languages such as Net, Java, Perl and the like are supported to be automatically recorded and automatically generated. Selenium is a acceptance test tool written specifically for Web applications by ThilightWorks.
JQuery is another excellent Javascript library following prototype. It is a lightweight js library that is CSS3 compatible, and also various browsers (IE6.0+, FF1.5+, safari2.0+, opera9.0+), jquery2.0 and subsequent versions will no longer support IE6/7/8 browsers. jQuery enables users to more conveniently handle HTML (an application under standard universal markup language), events, achieve animation effects, and conveniently provide AJAX interactions for websites. The jQuery has the great advantage that the document description is complete, the application is detailed, and a plurality of mature plug-ins can be selected. The jQuery can enable the html page of the user to keep the code and the html content separated, namely, a stack of js is not required to be inserted into the html to call the command, and only the ID needs to be defined.
JQueryEasyUI is a group of JQuery-based UI plug-in aggregates, and the JQueryEasyUI aims to help web developers to easily create UI interfaces with rich functions and attractive appearance. The developer does not need to write complex Javascript and deeply understand the cs styles, and only a few simple html tags need to be understood by the developer.
Sikuli is a novel graphic scripting language Sikuli, and a computer user only needs to have the most basic programming skills (for example, a print 'helloworld' can be written), does not need to write a line of codes, and can automatically complete most programming tasks by using screenshot elements of a graphic user interface in a screenshot mode.
Example one
FIG. 1 is a flow chart of an automated testing method. As shown in fig. 1, the automated testing method comprises the following specific steps:
s1: starting a test program package; the test program package is a code which is self-developed according to the test requirement and can drive the test object to automatically run, and the adoption of the test program package for testing is common knowledge of the technical personnel in the field, and is not described herein again.
S2: loading configuration data; the configuration data includes the operating system object library, browser program, link character of database and some options that the test object must configure.
S3: starting a test object; the test subject is typically a software system, such as breast post-processing software or a remote diagnostic system.
S4: searching a plurality of to-be-tested controls contained in the test object by using the control IDs;
wherein, the adopted tool is Selenium, and the principle that the control ID is searched for is as follows: the automatic test is realized by calling the response event of the control by searching the unique attribute of the control, and under the conventional method, the control is mostly positioned according to the ID and the level XPath of the control. However, in the actual development process, codes written by many programmers are not standard, many standard attributes are lacked, and many control attributes are found to be repetitive, for example, many control IDs and names are repetitive, which makes it difficult to locate a page element by the Selenium native method, and for this problem, the present application introduces a new method to assist in locating a page element, specifically refer to the contents of step S5 and step S6.
S5: and carrying out first identification on the to-be-tested control which cannot be normally positioned by using the control ID, and searching the to-be-tested control which cannot be normally positioned by using the control ID based on the first identification.
S6: and carrying out second identification on the to-be-tested control which cannot be normally positioned after the first identification is carried out, and searching the to-be-tested control which cannot be normally positioned after the first identification is carried out based on the second identification, wherein the to-be-tested control which cannot be normally positioned is the to-be-tested control without a unique identification, and identification principles of the first identification and the second identification are different.
S7: and automatically testing the test object based on the searched to-be-tested control.
Preferably, after the step S6 is executed, if the to-be-tested control that cannot be normally located after the second identification is performed, the method further includes a step of searching for the to-be-tested control that cannot be normally located after the second identification is performed by using Sikuli based on an image comparison.
The following describes step S5 in detail by taking the test object as a breast workstation product as an example. In the UI of the foreground, the recording status of the patient information is nested inside a table pattern, and the nesting logic of the table is as follows: chrome overall interface → Frame → list → datagrid → row → field → img → title, the nesting is more, the efficiency of searching for the control to be tested by using the method of Selenium native is lower, and the situation that the ID of the control cannot be normally positioned by using the Selenium often occurs.
At this time, JQuery can be used for searching a to-be-tested control which cannot be normally positioned by the Selenium based on the control ID. The specific process is to utilize a Selenium to search and test a test program package of the to-be-tested control through JQuery package to further process the to-be-tested control which cannot be normally positioned by the Selenium. The processing process includes the steps of carrying out first identification on the to-be-tested controls which cannot be normally positioned by the Selenium, wherein the identification principle of the first identification is preferably to carry out identification according to the attributes of the to-be-tested controls, namely when the to-be-tested controls which cannot be normally positioned by the Selenium (without unique identification) have unique identifications, the to-be-tested controls are enabled to have the unique identifications in a first identification mode, and searching is facilitated. Wherein, the attribute of the control to be tested can be: a combination of both the type of control and the control ID; or a combination of both the control name and the control ID.
The advantages of using JQuery to find the control to be tested are as follows:
1) directly acquiring or operating HTML elements by executing js;
2) when a plurality of iframes exist, when the Webdriver instance positioning control method needs to switch the iframes back and forth, JQuery is used for conveniently and simply searching the control;
3) the HTML element group can be operated;
4) when the code of the front-end page is not standard, a plurality of methods for acquiring the elements (through tag names, IDs, class names, designated hierarchical relations, attribute values of the elements, filters and the like) are convenient and flexible;
implementation example:
use case ID
455194
Title
SSIT _ patient check _ check list _ display list _ recording status icon
Procedure for the preparation of the
0, precondition: a recorded patient A and an unrecorded patient B exist in the system;
1, a diagnostician logs in a post-processing workstation of a mammary gland image and enters a patient examination interface;
2, checking the recording state columns of the patient A and the patient B in the examination list;
and 3, clicking the column head of the 'recording state' for filtering.
Description of the invention
Verifying recording status corresponds to checking derived CD/DVD recording function
Since the JQuery is used to perform the first identification on the to-be-tested control which cannot be normally positioned by using the control ID in S5, the principle of performing the first identification is the attribute of the control, and there is a case where the attributes of a plurality of to-be-tested controls are the same after the first identification, therefore, when the to-be-tested control is positioned among the plurality of to-be-tested controls with the same attribute of the control, the to-be-tested control which cannot be normally positioned still exists. For the problem, in this embodiment, in step S6, a second identifier is performed on the to-be-tested control that cannot be normally located after the first identifier is performed, so as to further identify multiple to-be-tested controls with the same attribute, where the identification principle of the second identifier is to add a new attribute to the to-be-tested control, and the new attribute may be to add a prefix or a suffix on the basis of the name of the control.
The advantages of using JQueryEasyUI to find the widget to be tested are as follows:
1) when the control is generated by using JQueryEasyUI, the control can be combined with a JQueryEasyUI packaging method to execute the related command operation control;
2) JQueryEasyUI is based on JQuery, so that the grammar of the JQuery can be conveniently used, complex codes are not needed, and a front-end control can be conveniently and quickly operated;
3) and HTML5 is supported, and the code is simple and powerful.
Implementation example:
publicstaticeasyUIInterfaceeui=neweasyUIInterface();
/*
example ID
456790
Title
SSIT _ configuration center _ film printer configuration _ new AE _ invalid input
Procedure for the preparation of the
0, precondition: a user enters a configuration center;
1, clicking the configuration of a film printer;
clicking for newly adding, keeping one or two of AETitle, IP address and port number as null, and clicking for testing;
3: the IP address column enters unreasonable IP addresses (any numeric value or string outside the range of 0.0.0.0 to 255.255.255.255);
4 port number enters unreasonable values (any number or string outside the range of 0-65535), such as-12 or 65577;
inputting effective AETitle and port number, invalid IP address (if IP does not exist or IP which does not correspond to AETitle), and clicking for testing;
inputting effective AETitle, IP address, invalid port number (such as port number 21 conflicting with the system), and clicking for testing;
description of the invention
Verification of connection test communication failure on the premise of inputting erroneous AE information
For the control to be tested which cannot be normally positioned after the two schemes of the step S5 and the step S6 are utilized, a method of searching for the control to be tested by adopting a package screenshot is further adopted in the step S7. The searching for the to-be-tested control which cannot be normally positioned after the second identification is carried out by utilizing the Sikuli based on image comparison comprises the following steps: and comparing the pre-stored screenshots with the display images of the different types of controls one by one, and searching the to-be-tested controls according to the preset algorithms corresponding to the different types of controls. Wherein the predetermined algorithm is related to the type of control: if the type of the control is an event response type, positioning the control by using a central point of a display image during searching; and if the type of the control is an input type, positioning the control according to the central point of the display image during searching and a preset offset.
Implementation example:
example two
FIG. 2 is a block diagram of an automated test system according to the present invention. As shown in fig. 2, the automated test system includes: a first search control module 10, a second search control module 11, a third search control module 12, a fourth search control module 13 and a test module 14; the first finding control module 10 is configured to find a plurality of controls to be tested included in the test object by using a control ID; the second finding control module 11 is configured to perform a first identification on a to-be-tested control that cannot be normally located by using a control ID, and find the to-be-tested control that cannot be normally located by using the control ID based on the first identification; the third finding control module 12 is configured to perform a second identification on a to-be-tested control that cannot be normally positioned after the first identification is performed, and find the to-be-tested control that cannot be normally positioned after the first identification is performed based on the second identification, where the to-be-tested control that cannot be normally positioned is a to-be-tested control that does not have a unique identification, and identification principles of the first identification and the second identification are different; the fourth searching control module 13 is configured to search, when a to-be-tested control which cannot be normally positioned after the second identification is performed, for the to-be-tested control which cannot be normally positioned after the second identification is performed by using a Sikuli based on image contrast; the testing module 14 is configured to perform an automated test on the test object based on the found control to be tested.
Further, the fourth search control module 13 includes: a comparison module; the comparison module is used for comparing the prestored screenshots with the display images of the controls of different types one by one and searching the control to be tested according to the preset algorithm corresponding to the controls of different types.
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
In summary, in the automated testing method and system provided by the present invention, a plurality of to-be-tested controls of a test object are first searched by using a control ID, a first identifier is performed on the to-be-tested control that cannot be normally positioned by using the control ID, and the to-be-tested control that cannot be normally positioned by using the control ID is searched based on the first identifier; and carrying out second identification on the to-be-tested control which cannot be normally positioned after the first identification is carried out, searching the to-be-tested control which cannot be normally positioned after the first identification is carried out based on the second identification, and finally carrying out automatic test on the test object based on the searched to-be-tested control. The controls to be tested are successively identified so that each control to be tested has a unique identification, the problem that the controls in the page have no control IDs, the control IDs are all the same or the controls cannot be searched due to the excessively complex page is solved, the process of searching the target controls is simplified, and the efficiency of searching the controls is improved.
The above description is only for the purpose of describing the preferred embodiments of the present invention, and is not intended to limit the scope of the present invention, and any variations and modifications made by those skilled in the art based on the above disclosure are within the scope of the appended claims.
Claims (14)
1. An automated testing method, comprising:
starting a test object;
searching a plurality of to-be-tested controls contained in the test object by using the control IDs;
carrying out first identification on a to-be-tested control which cannot be normally positioned by using a control ID, and searching the to-be-tested control which cannot be normally positioned by using the control ID based on the first identification;
performing second identification on a to-be-tested control which cannot be normally positioned after the first identification is performed, and searching the to-be-tested control which cannot be normally positioned after the first identification is performed based on the second identification, wherein the to-be-tested control which cannot be normally positioned is the to-be-tested control without a unique identification, and identification principles of the first identification and the second identification are different;
and automatically testing the test object based on the searched to-be-tested control.
2. The automated testing method of claim 1, further comprising: and searching the to-be-tested control which cannot be positioned normally after the second identification by using the Sikuli based on image comparison.
3. The automated testing method of claim 1, wherein JQuery is used to perform a first identification on a to-be-tested control that cannot be normally located by using a control ID, and the identification principle of the first identification is to perform identification according to the attribute of the to-be-tested control.
4. The automated testing method of claim 3, wherein the attributes of the control under test are:
a combination of both the type of control and the control ID; or,
a combination of both control name and control ID.
5. The automated testing method of claim 1, wherein JQueryEasyUI is used to perform a second identification on the to-be-tested control that cannot be normally positioned after the first identification, and the identification principle of the second identification is to add a new attribute to the to-be-tested control.
6. The automated testing method of claim 2, wherein the finding of the to-be-tested control that cannot be normally positioned after the second identification by the Sikuli based on image contrast comprises:
and comparing the pre-stored screenshots with the display images of the different types of controls one by one, and searching the to-be-tested controls according to the preset algorithms corresponding to the different types of controls.
7. The automated testing method of claim 6, wherein the predetermined algorithm is related to a type of control:
if the type of the control is an event response type, positioning the control by using a central point of a display image during searching;
and if the type of the control is an input type, positioning the control according to the central point of the display image during searching and a preset offset.
8. An automated test system, comprising:
the first searching control module is used for searching a plurality of to-be-tested controls contained in the test object by using the control IDs;
the second searching control module is used for carrying out first identification on the to-be-tested control which cannot be normally positioned by using the control ID and searching the to-be-tested control which cannot be normally positioned by using the control ID based on the first identification;
the third finding control module is used for carrying out second identification on the to-be-tested control which cannot be normally positioned after the first identification is carried out, and finding the to-be-tested control which cannot be normally positioned after the first identification is carried out on the basis of the second identification, wherein the to-be-tested control which cannot be normally positioned is the to-be-tested control without a unique identification, and the identification principles of the first identification and the second identification are different;
and the testing module is used for automatically testing the testing object based on the searched to-be-tested control.
9. The automated test system of claim 8, further comprising:
and the fourth control searching module is used for searching the to-be-tested control which cannot be normally positioned after the second identification by using a Sikuli mode based on image comparison when the to-be-tested control which cannot be normally positioned after the second identification is carried out.
10. The automated testing system of claim 8, wherein JQuery is used to perform a first identification on a to-be-tested control that cannot be normally located by using a control ID, and the identification rule of the first identification is to perform identification according to the attribute of the to-be-tested control.
11. The automated test system of claim 10, wherein the properties of the control are:
a combination of both the type of control and the control ID; or,
a combination of both control name and control ID.
12. The automated testing system of claim 8, wherein JQueryEasyUI is used to perform a second identification on the to-be-tested control that cannot be normally located after the first identification, and the identification principle of the second identification is to add a new attribute to the to-be-tested control.
13. The automated test system of claim 8, wherein the fourth seek control module comprises:
and the comparison module is used for comparing the prestored screenshots with the display images of the different types of controls one by one and searching the to-be-tested controls according to the preset algorithms corresponding to the different types of controls.
14. The automated test system of claim 13, wherein the predetermined algorithm is related to a type of control:
if the type of the control is an event response type, positioning the control by using a central point of a display image during searching;
and if the type of the control is an input type, positioning the control according to the central point of the display image during searching and a preset offset.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610056854.0A CN105743736B (en) | 2016-01-27 | 2016-01-27 | Automated testing method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610056854.0A CN105743736B (en) | 2016-01-27 | 2016-01-27 | Automated testing method and system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105743736A true CN105743736A (en) | 2016-07-06 |
CN105743736B CN105743736B (en) | 2019-01-04 |
Family
ID=56247776
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610056854.0A Active CN105743736B (en) | 2016-01-27 | 2016-01-27 | Automated testing method and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105743736B (en) |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106844214A (en) * | 2017-01-23 | 2017-06-13 | 北京思特奇信息技术股份有限公司 | A kind of automatic method and device that sectional drawing is carried out to page rendering |
CN108664383A (en) * | 2017-03-28 | 2018-10-16 | 上海合福信息科技有限公司 | A kind of components testing method and Software Automatic Testing Method |
WO2018188380A1 (en) * | 2017-04-11 | 2018-10-18 | 武汉斗鱼网络科技有限公司 | Method and device for adding control identification |
CN110704327A (en) * | 2019-10-11 | 2020-01-17 | 江苏赛诺格兰医疗科技有限公司 | Auxiliary method for PET-CT system control software automatic test |
CN112162735A (en) * | 2020-10-28 | 2021-01-01 | 北京三快在线科技有限公司 | Control identification generation method and device, computer equipment and storage medium |
CN112328488A (en) * | 2020-11-09 | 2021-02-05 | 深圳证券通信有限公司 | Control object identification method for UI (user interface) automatic test |
CN113448832A (en) * | 2020-06-18 | 2021-09-28 | 北京新氧科技有限公司 | Control exposure detection method and application program operation monitoring system |
CN113642642A (en) * | 2021-08-13 | 2021-11-12 | 上海哔哩哔哩科技有限公司 | Control identification method and device |
CN113849415A (en) * | 2021-10-18 | 2021-12-28 | 东软集团股份有限公司 | Control test method, device, storage medium and electronic equipment |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102541728A (en) * | 2010-12-14 | 2012-07-04 | 北京新媒传信科技有限公司 | Method for expanding identifiable control of automatic test tool |
CN103019925A (en) * | 2011-09-26 | 2013-04-03 | 阿里巴巴集团控股有限公司 | Selector acquisition method and device |
CN103164300A (en) * | 2011-12-13 | 2013-06-19 | 腾讯科技(深圳)有限公司 | Mobile terminal touch screen automatic testing method and device |
CN103309797A (en) * | 2012-03-09 | 2013-09-18 | 阿里巴巴集团控股有限公司 | Automatic testing method and device of user interface |
US8924934B2 (en) * | 2011-02-04 | 2014-12-30 | Oracle International Corporation | Automated test tool interface |
CN104424087A (en) * | 2013-08-21 | 2015-03-18 | 阿里巴巴集团控股有限公司 | Web page element positioning method, apparatus and system |
CN105224462A (en) * | 2015-10-27 | 2016-01-06 | 小米科技有限责任公司 | The recognition methods of control element and device |
-
2016
- 2016-01-27 CN CN201610056854.0A patent/CN105743736B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102541728A (en) * | 2010-12-14 | 2012-07-04 | 北京新媒传信科技有限公司 | Method for expanding identifiable control of automatic test tool |
US8924934B2 (en) * | 2011-02-04 | 2014-12-30 | Oracle International Corporation | Automated test tool interface |
CN103019925A (en) * | 2011-09-26 | 2013-04-03 | 阿里巴巴集团控股有限公司 | Selector acquisition method and device |
CN103164300A (en) * | 2011-12-13 | 2013-06-19 | 腾讯科技(深圳)有限公司 | Mobile terminal touch screen automatic testing method and device |
CN103309797A (en) * | 2012-03-09 | 2013-09-18 | 阿里巴巴集团控股有限公司 | Automatic testing method and device of user interface |
CN104424087A (en) * | 2013-08-21 | 2015-03-18 | 阿里巴巴集团控股有限公司 | Web page element positioning method, apparatus and system |
CN105224462A (en) * | 2015-10-27 | 2016-01-06 | 小米科技有限责任公司 | The recognition methods of control element and device |
Cited By (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106844214A (en) * | 2017-01-23 | 2017-06-13 | 北京思特奇信息技术股份有限公司 | A kind of automatic method and device that sectional drawing is carried out to page rendering |
CN108664383A (en) * | 2017-03-28 | 2018-10-16 | 上海合福信息科技有限公司 | A kind of components testing method and Software Automatic Testing Method |
CN108664383B (en) * | 2017-03-28 | 2021-10-15 | 上海合福信息科技有限公司 | Control testing method and software automatic testing method |
WO2018188380A1 (en) * | 2017-04-11 | 2018-10-18 | 武汉斗鱼网络科技有限公司 | Method and device for adding control identification |
CN110704327A (en) * | 2019-10-11 | 2020-01-17 | 江苏赛诺格兰医疗科技有限公司 | Auxiliary method for PET-CT system control software automatic test |
CN113448832A (en) * | 2020-06-18 | 2021-09-28 | 北京新氧科技有限公司 | Control exposure detection method and application program operation monitoring system |
CN113448832B (en) * | 2020-06-18 | 2024-03-12 | 北京新氧科技有限公司 | Control exposure detection method and application program operation monitoring system |
CN112162735A (en) * | 2020-10-28 | 2021-01-01 | 北京三快在线科技有限公司 | Control identification generation method and device, computer equipment and storage medium |
CN112328488A (en) * | 2020-11-09 | 2021-02-05 | 深圳证券通信有限公司 | Control object identification method for UI (user interface) automatic test |
CN113642642A (en) * | 2021-08-13 | 2021-11-12 | 上海哔哩哔哩科技有限公司 | Control identification method and device |
CN113642642B (en) * | 2021-08-13 | 2024-04-30 | 上海哔哩哔哩科技有限公司 | Control identification method and device |
CN113849415A (en) * | 2021-10-18 | 2021-12-28 | 东软集团股份有限公司 | Control test method, device, storage medium and electronic equipment |
Also Published As
Publication number | Publication date |
---|---|
CN105743736B (en) | 2019-01-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105743736B (en) | Automated testing method and system | |
US8392886B2 (en) | System, program product, and methods to enable visual recording and editing of test automation scenarios for web application | |
Leotta et al. | Pesto: Automated migration of DOM‐based Web tests towards the visual approach | |
US8365147B2 (en) | Test script transformation architecture | |
US8151276B2 (en) | Test script transformation analyzer with change guide engine | |
US8856743B2 (en) | System, method, and computer readable medium for universal software testing | |
US8434062B2 (en) | Enhancing source code debugging and readability using visual symbols | |
Burns | Selenium 2 testing tools beginner's guide | |
WO2017141893A1 (en) | Software analysis apparatus and software analysis method | |
EP2105837B1 (en) | Test script transformation analyzer with change guide engine | |
CN111427760B (en) | Page test method, device, equipment and storage medium | |
Gundecha | Selenium Testing Tools Cookbook | |
Chezelles et al. | The browsergym ecosystem for web agent research | |
Gundecha et al. | Learn Selenium: build data-driven test frameworks for mobile and web applications with Selenium Web Driver 3 | |
Duldulao | ASP. NET Core and Vue. js: Build real-world, scalable, full-stack applications using Vue. js 3, TypeScript,. NET 5, and Azure | |
Sterca et al. | Primary building blocks for web automation | |
Bragagnolo et al. | Challenges for layout validation: Lessons learned | |
Amuthan | Spring MVC Beginner’s guide | |
Vilhunen | User interface test automation for an Android application | |
JP2022118286A (en) | DETECTION DEVICE, TEST SYSTEM, DETECTION METHOD, AND PROGRAM | |
Pulido | Applying behavior driven development practices and tools to low-code technology | |
Vesikkala | Visual regression testing for web applications | |
Ștefan et al. | Towards Automated Web Functional Testing Using Predefined Templates | |
CN114816425B (en) | Method and system for converting an automation language program into a LUA language program | |
Alfaro et al. | Detecting CI/CD workflow errors through visual inspection of logs |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CP02 | Change in the address of a patent holder |
Address after: 430206 No. 99, gaokeyuan Road, Wuhan, Hubei Patentee after: WUHAN UNITED IMAGING HEALTHCARE Co.,Ltd. Address before: Floor b1-7, No.818, Gaoxin Avenue, Donghu New Technology Development Zone, Wuhan, Hubei 430206 Patentee before: WUHAN UNITED IMAGING HEALTHCARE Co.,Ltd. |
|
CP02 | Change in the address of a patent holder |