CN112559375A - Method for parallel automatic testing by using multiple different browsers - Google Patents
Method for parallel automatic testing by using multiple different browsers Download PDFInfo
- Publication number
- CN112559375A CN112559375A CN202011557693.6A CN202011557693A CN112559375A CN 112559375 A CN112559375 A CN 112559375A CN 202011557693 A CN202011557693 A CN 202011557693A CN 112559375 A CN112559375 A CN 112559375A
- Authority
- CN
- China
- Prior art keywords
- browsers
- browser
- focus
- testing
- pop
- 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 52
- 238000000034 method Methods 0.000 title claims abstract description 45
- 230000002159 abnormal effect Effects 0.000 claims description 24
- 238000012545 processing Methods 0.000 claims description 3
- 230000005856 abnormality Effects 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 238000010998 test method Methods 0.000 description 2
- VYZAMTAEIAYCRO-UHFFFAOYSA-N Chromium Chemical compound [Cr] VYZAMTAEIAYCRO-UHFFFAOYSA-N 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 238000012827 research and development Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3688—Test management for test execution, e.g. scheduling of test suites
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/958—Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Databases & Information Systems (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Data Mining & Analysis (AREA)
- Debugging And Monitoring (AREA)
Abstract
The invention discloses a method for parallel automatic testing by using a plurality of different browsers, and relates to the technical field of parallel automatic testing of browsers. The invention comprises the following steps: starting a program: opening a plurality of browsers and loading different websites; and (3) setting a plurality of browsers for testing: a plurality of browsers simultaneously carry out automatic test actions, clicking, inputting, selecting dates, selecting drop-down boxes and the like; the browser processes the phenomenon of taking focus: when the focus is seized by the browser in the concurrent scene of the browser, the new pop-up box is popped up, and the page element is clicked to enable the browser to be set at the top. By the method, focus robbing phenomenon generated when different browsers are automatically tested can be processed under the parallel condition, so that website testing can be rapidly performed, the testing speed of the website is further improved by performing automatic testing in a parallel mode, and the workload of testing personnel is reduced.
Description
Technical Field
The invention belongs to the technical field of parallel automatic testing of browsers, and particularly relates to a method for parallel automatic testing by using a plurality of different browsers.
Background
A web browser is an application that displays files on a web server or file system and allows a user to interact with the files. It is used to display text, images and other information within the world wide web or local area network, etc. These words or images can be hyperlinks to other web sites, and the user can browse various information quickly and easily. Most web pages are in HTML format, some web pages can be displayed correctly only by a specific browser, and with the high popularization of the mobile internet, the establishment and technical maturity of the standard of the Html5 specification, and the gradual development of the hardware performance of each terminal device and the kernel of the browser, the WebApp or the WeChat public number micro website and the micro service based on the Html5 become important components of the application of the mobile internet. Nowadays, the Html 5-based WebApp has the characteristics of easy development, fast iteration, easy propagation and the like, and has been widely applied to various fields such as mobile commerce, mobile office, news information, video games and the like. However, due to the existence of various personalized requirements of mobile phone terminals of mobile internet users, browsers for browsing and using WebApp, including application embedded browsers for wechat, microblog and the like, present diversity, and further cause a series of problems of UI and functional compatibility of different degrees due to different browser kernels. Android presents a more prominent compatibility problem due to the open-source ecology of Android, IOS research and development ecology and system are relatively closed, WebApp is basically based on a Safari browser and corresponding kernels, and the compatibility problem is presented less.
The patent with publication number CN106407119A applies for a browser compatibility test method based on automatic test, which belongs to the technical field of browser compatibility test methods, and the test process is divided into two stages, a Web function automatic test stage and a manual image viewing stage, wherein the Web function automatic test stage realizes screenshot and storage of the multiple browser running processes, the manual image viewing stage realizes automatic comparison and analysis of pictures, and the manual analysis is performed on the different pictures. The invention improves the efficiency and the accuracy of the compatibility test of the browser, and solves the problem that the manual factors in the test process and the test result are influenced by manually operating the browser and manually monitoring the test process. However, most of test software for parallel automated testing of a plurality of different browsers does not support automated testing of an IE browser, more support firefox and chrome browsers, and testing of the IE browser mostly depends on manual testing by testers, so that the test cost is high.
Disclosure of Invention
The invention aims to provide a method for parallel automatic testing by using a plurality of different browsers, which can process the focus robbing phenomenon generated during the automatic testing of the different browsers under the parallel condition so as to quickly test websites.
In order to achieve the purpose, the invention is realized by the following technical scheme:
a method for parallel automated testing using a plurality of different browsers, comprising the steps of:
starting a program: opening a plurality of browsers and loading different websites;
and (3) setting a plurality of browsers for testing: a plurality of browsers simultaneously carry out automatic test actions, clicking, inputting, selecting dates, selecting drop-down boxes and the like;
the browser processes the phenomenon of taking focus: when the focus is seized by the browser in a concurrent scene of the browser, popping up a new pop-up frame, and clicking a page element to enable the browser to be set at the top;
page elements are not found, or manual intervention: judging the abnormal times, if the abnormal times reach the upper limit, finishing the parallel abnormal task, outputting a result, if the abnormal times do not reach the upper limit, refreshing a page, and executing the flow from the beginning;
outputting a test result;
and finishing the operation.
Optionally, when a new pop-up box pops up, the following two situations exist, namely the pop-up box is a file storage prompt box, and the pop-up box is a webpage prompt.
Optionally, when the new pop frame belongs to the file saving prompt frame, the other browsers are locked to preempt the focus operation, the handle of the file saving pop frame is obtained, the file saving pop frame is saved through sendmessage or the window is processed in a virtual key mode, after the processing is finished, the other browsers are unlocked to preempt the focus operation, and the process is executed.
Optionally, when the new pop frame belongs to the content of the new web page, the other browsers are locked to preempt the focus operation, the window is switched to the new web page for operation, the pop frame is closed after the operation is finished, the other browsers are unlocked to preempt the focus operation, and the process is executed next.
Optionally, when a page element is clicked to enable the browser to be set to the top, the following two situations exist, other browsers need to input characters, and other browsers need to capture images.
Optionally, when other browsers need to input characters, the top-set preemptive focus action is locked first, so that the browsers finish inputting the characters, and after the characters are input, the focus-preemptive action is unlocked, so that the process is executed next.
Optionally, when other browsers need to capture the screen, the top capture and focus preemption action is locked first, the browser finishes capturing the screen, and finally the focus preemption action is unlocked, and the process is executed next.
Optionally, when the page is refreshed, and the refresh is abnormal and the refresh is not abnormal.
Optionally, when the refresh is abnormal, whether the browser is closed is judged, and when the browser is closed, the corresponding browser is directly opened, and the corresponding website is opened to continue the operation flow.
Optionally, when no exception occurs in the refresh, the browser process continues to operate.
The embodiment of the invention has the following beneficial effects:
according to the embodiment of the invention, the focus robbing phenomenon generated during the automatic testing of different browsers under the parallel condition can be processed by the method, so that the website testing can be rapidly carried out, the automatic testing is carried out in a parallel mode, the testing speed of the website is further improved, and the workload of testing personnel is reduced.
Of course, it is not necessary for any product in which the invention is practiced to achieve all of the above-described advantages at the same time.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this application, illustrate embodiments of the invention and, together with the description, serve to explain the invention and not to limit the invention. In the drawings:
fig. 1 is a service flow diagram according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the invention, its application, or uses.
To maintain the following description of the embodiments of the present invention clear and concise, a detailed description of known functions and known components of the invention have been omitted.
Referring to fig. 1, in the present embodiment, a method for parallel automated testing using a plurality of different browsers is provided, which includes the following steps:
starting a program: opening a plurality of browsers and loading different websites;
and (3) setting a plurality of browsers for testing: a plurality of browsers simultaneously carry out automatic test actions, clicking, inputting, selecting dates, selecting drop-down boxes and the like;
the browser processes the phenomenon of taking focus: when the focus is seized by the browser in a concurrent scene of the browser, popping up a new pop-up frame, and clicking a page element to enable the browser to be set at the top;
page elements are not found, or manual intervention: judging the abnormal times, if the abnormal times reach the upper limit, finishing the parallel abnormal task, outputting a result, if the abnormal times do not reach the upper limit, refreshing a page, and executing the flow from the beginning;
outputting a test result;
and finishing the operation.
The application of one aspect of the embodiment is as follows: when the browsers need to be tested in parallel, a plurality of browsers are opened, different websites are loaded, the browsers simultaneously carry out automatic testing actions, operations such as clicking, inputting, selecting dates and selecting drop-down frames are carried out, when the browsers have a focus robbing phenomenon under the concurrent scenes of the browsers, a new pop-up frame is popped up, a page element is clicked to enable the browsers to be set, the abnormal times are judged, if the abnormality reaches the upper limit, the parallel abnormal task is finished, the result is output, if the abnormality does not reach the upper limit, the page is refreshed, the flow is executed newly, the test result is output, and the operation is finished.
By the method, focus robbing phenomenon generated when different browsers are automatically tested under the parallel condition can be processed, so that website testing can be rapidly performed, the automatic testing is performed in a parallel mode, the testing speed of the website is further improved, and the workload of testing personnel is reduced.
The new pop-up frame of this embodiment is popped up in the following two cases, the pop-up frame is a file saving prompt frame, and the pop-up frame is a web page prompt.
When the new pop frame belongs to the file saving prompt frame, the other browsers are locked to preempt the focus operation, the handle of the file saving pop frame is obtained, the file saving pop frame is saved through sendmessage or the window is processed in a virtual key mode, the other browsers are unlocked to preempt the focus operation after the processing is finished, and the process is executed.
When the new pop frame belongs to the content of a new web page, the other browsers are locked to preempt the focus operation, the window is switched to the new web page for operation, the pop frame is closed after the operation is finished, the other browsers are unlocked to preempt the focus operation, and the process is executed next.
In this embodiment, when a page element is clicked to set a browser at the top, there are two situations that other browsers need to input text and other browsers need to capture a screenshot.
In this embodiment, when other browsers need to input characters, the top-set preemptive focus action is locked first, so that the browsers finish inputting the characters, and after the characters are input, the focus-preemptive action is unlocked, so that the process is executed next.
When other browsers of the embodiment need to capture the screen, the top capture preemptive focus action is firstly locked, the browser finishes capturing the screen, and finally the focus preemptive action is unlocked, and the process is executed next.
The page refresh of the present embodiment has the following two cases, i.e., the refresh is abnormal and the refresh is not abnormal.
When the refresh of the embodiment is abnormal, whether the browser is closed or not is judged, and when the browser is closed, the corresponding browser is directly opened, and the corresponding website is opened to continue the operation process.
When the refresh of the embodiment is not abnormal, the browser flow continues to operate.
The above embodiments may be combined with each other.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in sequences other than those illustrated or described herein.
In the description of the present invention, it is to be understood that the orientation or positional relationship indicated by the orientation words such as "front, rear, upper, lower, left, right", "lateral, vertical, horizontal" and "top, bottom", etc. are usually based on the orientation or positional relationship shown in the drawings, and are only for convenience of description and simplicity of description, and in the case of not making a reverse description, these orientation words do not indicate and imply that the device or element being referred to must have a specific orientation or be constructed and operated in a specific orientation, and therefore, should not be considered as limiting the scope of the present invention; the terms "inner and outer" refer to the inner and outer relative to the profile of the respective component itself.
Claims (10)
1. A method for parallel automated testing using a plurality of different browsers, comprising the steps of:
starting a program: opening a plurality of browsers and loading different websites;
and (3) setting a plurality of browsers for testing: a plurality of browsers simultaneously carry out automatic test actions, clicking, inputting, selecting dates, selecting drop-down boxes and the like;
the browser processes the phenomenon of taking focus: when the focus is seized by the browser in a concurrent scene of the browser, popping up a new pop-up frame, and clicking a page element to enable the browser to be set at the top;
page elements are not found, or manual intervention: judging the abnormal times, if the abnormal times reach the upper limit, finishing the parallel abnormal task, outputting a result, if the abnormal times do not reach the upper limit, refreshing a page, and executing the flow from the beginning;
outputting a test result;
and finishing the operation.
2. The method according to claim 1, wherein the following two cases are presented when the new pop box is popped up, the pop box is a file saving prompt box, and the pop box is a web page prompt.
3. The method for the parallel automated testing by using the multiple different browsers according to claim 2, wherein when a new pop frame belongs to the file saving prompt box, the other browsers are firstly locked to preempt the focus operation, the handle of the file saving pop frame is obtained, the file saving pop frame is stored through sendmessage or the window is processed in a virtual key mode, after the processing is finished, the other browsers are unlocked to preempt the focus operation, and the process is executed next.
4. The method as claimed in claim 2, wherein when a new pop-up box belongs to the content of a new web page, the method first locks other browsers to preempt the focus operation, switches the window to the new web page for operation, closes the pop-up box after the operation is completed, and unlocks other browsers to preempt the focus operation, so that the process is executed next.
5. The method of claim 1, wherein clicking on a page element to set its browser to the top has two conditions, other browsers need to input text, and other browsers need to capture a screenshot.
6. The method as claimed in claim 5, wherein when other browsers need to input text, the top preemptive focus action is locked to allow the browsers to input text, and when the text is input, the focus preemptive action is unlocked to allow the process to execute next.
7. The method as claimed in claim 5, wherein when the other browsers need to capture the screen, the top preemptive focus action is locked, the browser finishes capturing the screen, and finally the top preemptive focus action is unlocked, and the process is executed next.
8. The method of claim 1, wherein refreshing the page comprises two cases, refresh abnormal and refresh non-abnormal.
9. The method according to claim 8, wherein when the refresh is abnormal, determining whether the browser is closed, and when the browser is closed, directly opening the corresponding browser and opening the corresponding website to continue the operation process.
10. The method of claim 8, wherein the browser flow continues to operate when no exception occurs with the refresh.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011557693.6A CN112559375B (en) | 2020-12-23 | 2020-12-23 | Method for parallel automatic test by using multiple different browsers |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011557693.6A CN112559375B (en) | 2020-12-23 | 2020-12-23 | Method for parallel automatic test by using multiple different browsers |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112559375A true CN112559375A (en) | 2021-03-26 |
CN112559375B CN112559375B (en) | 2024-05-10 |
Family
ID=75034125
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011557693.6A Active CN112559375B (en) | 2020-12-23 | 2020-12-23 | Method for parallel automatic test by using multiple different browsers |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112559375B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113553525A (en) * | 2021-07-20 | 2021-10-26 | 上海众源网络有限公司 | Interface control request processing method and device |
Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103927253A (en) * | 2013-01-11 | 2014-07-16 | 阿里巴巴集团控股有限公司 | Multiple browser compatibility testing method and system |
CN104572473A (en) * | 2015-01-29 | 2015-04-29 | 无锡江南计算技术研究所 | Compatibility testing method of Web applications supporting multi-type and multi-version browsers |
CN106407119A (en) * | 2016-09-28 | 2017-02-15 | 浪潮软件集团有限公司 | Browser compatibility testing method based on automatic testing |
CN106897204A (en) * | 2015-12-17 | 2017-06-27 | 中国电信股份有限公司 | The automatic monitoring method and system of operation flow |
CN107885662A (en) * | 2017-11-09 | 2018-04-06 | 郑州云海信息技术有限公司 | A kind of method of testing based on more browser multi-version compatibility sex chromosome mosaicisms |
CN109656804A (en) * | 2018-09-27 | 2019-04-19 | 深圳壹账通智能科技有限公司 | Automated testing method, equipment, storage medium and device |
US20190294527A1 (en) * | 2018-03-23 | 2019-09-26 | Lendingclub Corporation | Unified ui/ux and api testing of web applications |
CN110297751A (en) * | 2018-03-22 | 2019-10-01 | 博彦科技(上海)有限公司 | Detection method, device, storage medium and the processor of page elements |
CN110955509A (en) * | 2019-12-11 | 2020-04-03 | 深圳迅策科技有限公司 | Finance concurrent transaction processing apparatus |
CN111695076A (en) * | 2020-06-15 | 2020-09-22 | 荆门汇易佳信息科技有限公司 | Cross-browser webpage compatibility standard construction method based on hypertext 5 |
-
2020
- 2020-12-23 CN CN202011557693.6A patent/CN112559375B/en active Active
Patent Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103927253A (en) * | 2013-01-11 | 2014-07-16 | 阿里巴巴集团控股有限公司 | Multiple browser compatibility testing method and system |
CN104572473A (en) * | 2015-01-29 | 2015-04-29 | 无锡江南计算技术研究所 | Compatibility testing method of Web applications supporting multi-type and multi-version browsers |
CN106897204A (en) * | 2015-12-17 | 2017-06-27 | 中国电信股份有限公司 | The automatic monitoring method and system of operation flow |
CN106407119A (en) * | 2016-09-28 | 2017-02-15 | 浪潮软件集团有限公司 | Browser compatibility testing method based on automatic testing |
CN107885662A (en) * | 2017-11-09 | 2018-04-06 | 郑州云海信息技术有限公司 | A kind of method of testing based on more browser multi-version compatibility sex chromosome mosaicisms |
CN110297751A (en) * | 2018-03-22 | 2019-10-01 | 博彦科技(上海)有限公司 | Detection method, device, storage medium and the processor of page elements |
US20190294527A1 (en) * | 2018-03-23 | 2019-09-26 | Lendingclub Corporation | Unified ui/ux and api testing of web applications |
CN109656804A (en) * | 2018-09-27 | 2019-04-19 | 深圳壹账通智能科技有限公司 | Automated testing method, equipment, storage medium and device |
CN110955509A (en) * | 2019-12-11 | 2020-04-03 | 深圳迅策科技有限公司 | Finance concurrent transaction processing apparatus |
CN111695076A (en) * | 2020-06-15 | 2020-09-22 | 荆门汇易佳信息科技有限公司 | Cross-browser webpage compatibility standard construction method based on hypertext 5 |
Non-Patent Citations (2)
Title |
---|
HIROSHI TANAKA: "X-BROT: Prototyping of Compatibility Testing Tool for Web Application Based on Document Analysis Technology", 《2019 INTERNATIONAL CONFERENCE ON DOCUMENT ANALYSIS AND RECOGNITION WORKSHOPS (ICDARW)》, 7 November 2019 (2019-11-07), pages 18 - 21 * |
秦丹: "基于变异的Web浏览器兼容性测试及效率研究", 《CNKI优秀硕士学位论文全文库 信息科技辑》, no. 04, 15 April 2018 (2018-04-15), pages 139 - 564 * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113553525A (en) * | 2021-07-20 | 2021-10-26 | 上海众源网络有限公司 | Interface control request processing method and device |
Also Published As
Publication number | Publication date |
---|---|
CN112559375B (en) | 2024-05-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CA3018196C (en) | Visual regresssion testing tool | |
US20190179880A1 (en) | Optimization for rendering web pages | |
WO2015039566A1 (en) | Method and system for facilitating automated web page testing | |
WO2013075612A1 (en) | Auto login method and device | |
CN109828906B (en) | UI (user interface) automatic testing method and device, electronic equipment and storage medium | |
CN104765746B (en) | Data processing method and device for mobile communication terminal browser | |
CN109428877B (en) | Method and device for accessing service system through user equipment | |
CN106649497B (en) | Webpage display method and device | |
CN112256363A (en) | Application page rendering method and device and electronic equipment | |
CN108062336B (en) | Media information processing method and device | |
CN113515453A (en) | Webpage testing system | |
CN102981902A (en) | Intelligent mobile terminal and screen protection method based on same | |
CN112559375A (en) | Method for parallel automatic testing by using multiple different browsers | |
US20190138711A1 (en) | System and method for webpages scripts validation | |
CN112148395A (en) | Page display method, device, equipment and storage medium | |
US20180336122A1 (en) | Generating application flow entities | |
CN110442499B (en) | Method and device for testing and improving page response performance and terminal equipment | |
CN104050165A (en) | Webpage initial focus selection method and device based on IPTV (interactive personal television) | |
CN111026648A (en) | Application program page testing method and device, electronic equipment and storage medium | |
CN105956173A (en) | Page content acquisition method and apparatus | |
CN110569198A (en) | Method and device for automatically testing service function | |
CN115145674A (en) | Page jump method, device, equipment and medium based on dynamic anchor point | |
CN114490320A (en) | Automatic testing method and device, electronic equipment and storage medium | |
US9972109B2 (en) | Implementing out of order access to reversal operations in images | |
CN105812948A (en) | Response control method and device for input event |
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 |