CN112948267A - Webpage testing method, webpage testing system, storage medium and electronic equipment - Google Patents

Webpage testing method, webpage testing system, storage medium and electronic equipment Download PDF

Info

Publication number
CN112948267A
CN112948267A CN202110351625.2A CN202110351625A CN112948267A CN 112948267 A CN112948267 A CN 112948267A CN 202110351625 A CN202110351625 A CN 202110351625A CN 112948267 A CN112948267 A CN 112948267A
Authority
CN
China
Prior art keywords
webpage
screenshot
initial
updated
web page
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110351625.2A
Other languages
Chinese (zh)
Inventor
李丹丹
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Fangjianghu Technology Co Ltd
Original Assignee
Beijing Fangjianghu 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 Fangjianghu Technology Co Ltd filed Critical Beijing Fangjianghu Technology Co Ltd
Priority to CN202110351625.2A priority Critical patent/CN112948267A/en
Publication of CN112948267A publication Critical patent/CN112948267A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention relates to the technical field of software testing, and discloses a webpage testing method and a webpage testing system. The webpage testing method comprises the following steps: receiving an address of an update webpage, wherein the update webpage is formed by developing an initial webpage; opening the updated webpage under the preset configuration through a headless browser according to the address of the updated webpage; screenshot is conducted on a target area of the updated webpage to obtain a target screenshot; respectively identifying a target screenshot and an initial screenshot to determine the similarity between the target screenshot and the initial screenshot, wherein the initial screenshot is the screenshot of the target area of the initial webpage when the initial webpage is opened under the preset configuration; and determining that the updated webpage passes the test under the condition that the similarity is greater than a similarity threshold value. The invention can automatically test the updated webpage based on the headless browser, and can greatly reduce the workload of testing personnel, thereby effectively improving the testing efficiency on the basis of ensuring the online stability of a webpage system.

Description

Webpage testing method, webpage testing system, storage medium and electronic equipment
Technical Field
The invention relates to the technical field of software testing, in particular to a webpage testing method, a webpage testing system, a storage medium and electronic equipment.
Background
Currently, the functional test of the web page needs to be manually operated by a tester. The test method has limited coverage cases and often cannot cover all scenes. Compared with a test environment, after the webpage is online, the regression cases and data are possibly fewer, and testers cannot quickly regress all data and scenes. For example, an encyclopedia website, different templates, and different page types show inconsistency. If the web site is opened by a manual test and a regression test is performed, the workload of the tester is enormous.
Disclosure of Invention
The invention aims to provide a webpage testing method, a webpage testing system, a storage medium and electronic equipment, which can automatically test an updated webpage based on a headless browser and greatly reduce the workload of testers, thereby effectively improving the testing efficiency on the basis of ensuring the online stability of a webpage system.
In order to achieve the above object, a first aspect of the present invention provides a web page testing method, where the web page testing method includes: receiving an address of an update webpage, wherein the update webpage is formed by developing an initial webpage; opening the updated webpage under a preset configuration through a headless browser according to the address of the updated webpage; screenshot is carried out on the target area of the updated webpage to obtain a target screenshot; respectively identifying the target screenshot and an initial screenshot to determine the similarity between the target screenshot and the initial screenshot, wherein the initial screenshot is a screenshot of the target area of the initial webpage when the initial screenshot is opened under the preset configuration; and determining that the updated webpage passes the test under the condition that the similarity is greater than a similarity threshold value.
Preferably, the preset configuration includes a preset environment configuration and a preset page type configuration.
Preferably, the preset environment configuration includes any one of a test environment, a pre-launch environment, and an online environment.
Preferably, the preset configuration further comprises a preset functional configuration.
Preferably, the preset functional configuration comprises support for lazy loading and/or event simulation.
Preferably, the opening the updated webpage under a preset configuration through the headless browser includes: opening the updated webpage under the preset environment configuration and the preset page type configuration through the headless browser, and triggering the lazy loading and/or the event simulation action, and accordingly, screenshot of the target area of the updated webpage includes: and responding to the action of finishing the lazy loading and/or the event simulation triggered by the headless browser, and capturing the target area of the updated webpage after finishing the lazy loading and/or the event simulation.
Preferably, the headless browser is a Puppeteer headless browser.
Preferably, the identifying the target screenshot and the initial screenshot respectively comprises: and respectively identifying the target screenshot and the initial screenshot by an icon identification technology.
Preferably, the web page testing method further includes: and under the condition that the similarity is smaller than or equal to the similarity threshold, sending the address of the updated webpage and the target screenshot to a tester so as to manually troubleshoot the problems of the updated webpage.
Through the technical scheme, the updating webpage is creatively opened under the preset configuration through the headless browser; then, screenshot is carried out on the target area of the updated webpage to obtain a target screenshot; then identifying the target screenshot and the initial screenshot to determine the similarity between the target screenshot and the initial screenshot, wherein the initial screenshot is the screenshot of an initial webpage (namely the webpage before the updated webpage) in the same target area when the headless browser is opened under the same preset configuration; and if the determined similarity is larger than the similarity threshold, determining that the updated webpage passes the test. Therefore, the invention can automatically test the updated webpage based on the headless browser, and can greatly reduce the workload of testing personnel, thereby effectively improving the testing efficiency on the basis of ensuring the online stability of the webpage system.
A second aspect of the present invention provides a web page testing system, including: receiving means for receiving an address of an update web page, wherein the update web page is formed by development of an initial web page; the opening device is used for opening the updated webpage under the preset configuration through a headless browser according to the address of the updated webpage; the screenshot device is used for screenshot of the target area of the updated webpage to obtain a target screenshot; the identification device is used for respectively identifying the target screenshot and the initial screenshot so as to determine the similarity between the target screenshot and the initial screenshot, wherein the initial screenshot is the screenshot of the target area of the initial webpage when the initial webpage is opened under the preset configuration; and the determining device is used for determining that the updated webpage passes the test under the condition that the similarity is greater than the similarity threshold value.
Preferably, the preset configuration includes a preset environment configuration and a preset page type configuration.
Preferably, the preset environment configuration includes any one of a test environment, a pre-launch environment, and an online environment.
Preferably, the preset configuration further comprises a preset functional configuration.
Preferably, the preset functional configuration comprises support for lazy loading and/or event simulation.
Preferably, the opening device is configured to open the updated webpage in a preset configuration through a headless browser, and includes: opening the updated webpage under the preset environment configuration and the preset page type configuration through the headless browser, and triggering the lazy loading and/or the event simulation action, wherein correspondingly, the screenshot device is used for screenshot the target area of the updated webpage and comprises: and responding to the action of finishing the lazy loading and/or the event simulation triggered by the headless browser, and capturing the target area of the updated webpage after finishing the lazy loading and/or the event simulation.
Preferably, the headless browser is a Puppeteer headless browser.
Preferably, the identifying means is configured to identify the target screenshot and the initial screenshot respectively, and includes: and respectively identifying the target screenshot and the initial screenshot by an icon identification technology.
Preferably, the web page test system further comprises: and the sending device is used for sending the address of the updated webpage and the target screenshot to a tester under the condition that the similarity is smaller than or equal to the similarity threshold so as to manually troubleshoot the problems existing in the updated webpage.
For details and benefits of the web page testing system provided by the present invention, reference may be made to the above description of the web page testing method, which is not described herein again.
The third aspect of the present invention also provides a machine-readable storage medium having stored thereon instructions for causing a machine to execute the web page testing method.
The fourth aspect of the present invention also provides an electronic apparatus, including: a processor; a memory for storing the processor-executable instructions; the processor is used for reading the executable instruction from the memory and executing the instruction to realize the webpage testing method.
Additional features and advantages of the invention will be set forth in the detailed description which follows.
Drawings
The accompanying drawings, which are included to provide a further understanding of the embodiments 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 embodiments of the invention without limiting the embodiments of the invention. In the drawings:
FIG. 1 is a flowchart of a web page testing method according to an embodiment of the present invention;
FIG. 2 is a flowchart of a web page testing process provided by an embodiment of the invention; and
fig. 3 is a structural diagram of a web page test system according to an embodiment of the present invention.
Detailed Description
The following detailed description of embodiments of the invention refers to the accompanying drawings. It should be understood that the detailed description and specific examples, while indicating the present invention, are given by way of illustration and explanation only, not limitation.
Fig. 1 is a flowchart of a web page testing method according to an embodiment of the present invention. As shown in FIG. 1, the web page test method may include steps S101-S105.
Step S101, receiving the address of the updated webpage.
Wherein the update webpage is formed by development of an initial webpage.
Specifically, after the development of the initial web page is completed, the tester uploads the address (e.g., uniform resource locator, URL) of the updated web page to be tested. Accordingly, the web page test system receives the address (e.g., URL) of the updated web page uploaded by the tester.
And S102, opening the updated webpage under preset configuration through a headless browser according to the address of the updated webpage.
Wherein the headless browser may be a Puppeteer headless browser. From the use level, the Puppeteer headless browser runs a real browser, and is perfectly matched with the node. The headless browser is well suited for projects where the service layer employs node.
In an embodiment, the preset configuration may include a preset environment configuration and a preset page type configuration.
Wherein the preset environment configuration may include any one of a test environment, a pre-release environment, and an online environment. Specifically, the test of the updated webpage may be a test under a different environment, for example, a situation of the updated webpage under a test environment; the situation of the updated webpage in a pre-launch environment; or the update web page is in an online environment.
The page type may be HTML5 (hypertext markup language, HTML5 may be abbreviated as H5) web page or computer side (may be abbreviated as PC) web page, etc.
The preset configuration can be set according to the actual test requirements of the tester. Specifically, under the condition that the preset configuration is a test environment and an H5 webpage, the Puppeneer headless browser is set by adopting the preset configuration; and opening the update webpage under the preset configuration through a Puppeneer headless browser according to the uploaded URL of the update webpage.
In another embodiment, the preset configuration may further include a preset function configuration in addition to the preset environment configuration and the preset page type configuration.
Wherein the preset functional configuration may include support for lazy loading and/or event simulation.
In particular, events are often triggered by operations or by browser functions, events of elements can also be triggered by JavaScript (which may be abbreviated as JS). The event is triggered by the JS, also known as event simulation. For example, an event is created by JS that drags down the web page to the bottom by mouse.
Alternatively, lazy loading is also delayed loading. The concrete expression is as follows: when a webpage is accessed, the background picture path of an img element or other elements is replaced by a path occupying a bitmap, so that a request is only needed once, and only when the picture appears in a visual area of a browser, the true path of the picture is set, and the picture is displayed. For example, in the case of a page having many static resources (e.g., a shopping page), in order to save user traffic and improve page performance, the resource may be requested and loaded when the user browses the current resource.
For step S102, the opening the updated webpage under the preset configuration through the headless browser may include: and opening the updated webpage under the preset environment configuration and the preset page type configuration through the headless browser, and triggering the lazy loading and/or the event simulation action.
Under the conditions that the preset configuration is a test environment, an H5 webpage and lazy loading is supported, setting a Puppeneer headless browser by adopting the preset configuration; and opening the updated webpage under the test environment and the H5 webpage through a Puppeneer headless browser according to the uploaded URL of the updated webpage, and triggering the lazy loading action.
Under the conditions that the preset configuration is a test environment, an H5 webpage and supports event simulation (for example, an event that a mouse is used for pulling down a webpage to the bottommost end is simulated), setting a Puppeneer headless browser by adopting the preset configuration; and opening the updated webpage under the test environment and the H5 webpage through a Puppeneer headless browser according to the uploaded URL of the updated webpage, and triggering the action of event simulation.
Of course, the preset configuration may also be a test environment, an H5 web page, and supporting event simulation (e.g., simulating an event that pulls the web page down to the bottom by a mouse) and lazy loading.
And step S103, performing screenshot on the target area of the updated webpage to obtain a target screenshot.
The target area can be a whole webpage, an upper half webpage, a lower half webpage, a left half webpage, a right half webpage, and the like. The selection of the target area can be determined according to the test purpose of the tester, and can be set by the tester in advance. In one embodiment, the target area may be set in the preset configuration, as shown in FIG. 2.
Specifically, the target area may be screenshot by calling a screenshot function screenshot in a pupeteer headless browser.
For step S103, the screenshot of the target area of the update webpage may include: and responding to the action of finishing the lazy loading and/or the event simulation triggered by the headless browser, and capturing the target area of the updated webpage after the lazy loading and/or the event simulation is finished.
In an embodiment, under the condition that the preset configuration is a test environment, an H5 webpage and supports lazy loading, if the headless browser triggers and completes the action of lazy loading, screenshot is performed on a target area of the updated webpage (i.e., the updated webpage which is opened by using an H5 webpage and completes the lazy loading process) after the lazy loading is completed.
In another embodiment, in the case of the default configuration being a test environment, an H5 web page, and supporting event simulation (e.g., simulating an event that drags the web page down to the bottom by a mouse), if the headless browser triggers an action to complete the event simulation, a screenshot is taken of the target area of the updated web page that implements the completed event simulation (i.e., the updated web page that was opened using the H5 web page and completed the event simulation process in the test environment).
In yet another embodiment, with the preset configuration as a test environment, an H5 web page, and support lazy loading and event simulation (e.g., simulating an event that pulls down a web page to the bottom by a mouse), if the headless browser triggers an action to complete the lazy loading and event simulation, a screenshot is taken of a target area of the updated web page after the completion of the lazy loading and event simulation (i.e., the updated web page that was opened using the H5 web page and completed the lazy loading and event simulation process in the test environment).
And step S104, respectively identifying the target screenshot and the initial screenshot to determine the similarity between the target screenshot and the initial screenshot.
Wherein the initial screenshot is a screenshot of the target region of the initial webpage when opened under the preset configuration.
Before step S101, screenshot may be performed on a target area of an initial webpage (before updating) by using a process similar to that in steps S101 to S103 described above, so as to obtain the initial screenshot; the initial screenshot is then stored with a unique identification. The specific process is not described herein again (see the above description), and the updated web page may be adaptively replaced with the initial web page (the process executed for the initial web page is configured in the same preset configuration as the updated web page). And when the initial screenshot needs to be called, the initial screenshot can be called through the unique identifier.
For step S104, the separately identifying the target screenshot and the initial screenshot may include: the target screenshot and the initial screenshot are identified separately by an icon recognition technique, such as an open source computer vision library (OpenCV) icon recognition technique.
In particular, icons of the target screenshot and the initial screenshot at various positions can be identified through the OpenCV icon recognition technology, and the total similarity (i.e. the similarity between the target screenshot and the initial screenshot) about the icons at the various positions can be given.
Step S105, determining that the updated webpage passes the test under the condition that the similarity is greater than the similarity threshold value.
Wherein the similarity threshold value can be determined according to the development degree of the initial webpage. For example, when the development content is large, the similarity threshold is set to a small threshold according to the error acceptable for the test; and when the development content is small, the similarity threshold may be set to a large threshold.
Specifically, if the similarity between the target screenshot and the initial screenshot determined in step S104 is greater than the similarity threshold, the similarity between the target screenshot and the initial screenshot is considered to be large (that is, the updated webpage meets the development requirement), and it can be determined that the updated webpage passes the test requirement here.
The webpage testing method can also comprise the following steps: and under the condition that the similarity is less than or equal to the similarity threshold, the module corresponding to the target screenshot is an error rate high-risk module, and the address of the updated webpage and the target screenshot can be sent to a tester so as to manually troubleshoot the problems existing in the updated webpage.
Specifically, if the similarity is less than or equal to the similarity threshold, it indicates that the similarity between the target screenshot and the initial screenshot is small (i.e., the updated webpage does not meet the development requirement), and at this time, the address of the updated webpage and the target screenshot can be sent to the tester through a message mechanism, so that the tester can quickly troubleshoot the problem through a manual comparison (between the target screenshot and the initial screenshot). Therefore, only under the condition that the similarity between the target screenshot of the updated webpage and the initial screenshot of the initial webpage is small, the tester is required to participate in the test, so that the workload of the tester is greatly reduced, and the test quality and efficiency are improved.
Specifically, the test process of updating a web page shown in fig. 2 is explained and illustrated in detail.
As shown in FIG. 2, the test procedure for updating the web page may include steps S201-S208.
Step S201, uploading the address of the updated webpage.
Step S202, setting the test environment, the page type, the full screen capture and the function of supporting the simulation event of the headless browser.
And step S203, opening the updated webpage through the headless browser according to the address of the updated webpage.
That is, the update webpage is opened in the preset configuration through a headless browser.
And step S204, performing screenshot on the full screen of the updated webpage to obtain a target screenshot.
In step S205, the target screenshot and the initial screenshot are identified by an OpenCV icon identification technique to determine a similarity between the target screenshot and the initial screenshot.
The initial screenshot is a full-screen screenshot of an initial webpage opened under the same preset configuration through a headless browser.
Step S206, judging whether the similarity is greater than a similarity threshold, if so, executing step S207; otherwise, step S208 is performed.
Step S207, determining that the updated webpage passes the test.
And step S208, sending the address of the updated webpage and the target screenshot to a tester.
The tester can quickly troubleshoot the problem in a manual comparison mode (target screenshot and initial screenshot).
In summary, the invention creatively opens the updated web page under the preset configuration through the headless browser; then, screenshot is carried out on the target area of the updated webpage to obtain a target screenshot; then identifying the target screenshot and the initial screenshot to determine the similarity between the target screenshot and the initial screenshot, wherein the initial screenshot is the screenshot of an initial webpage (namely the webpage before the updated webpage) in the same target area when the headless browser is opened under the same preset configuration; and if the determined similarity is larger than the similarity threshold, determining that the updated webpage passes the test. Therefore, the invention can automatically test the updated webpage based on the headless browser, and can greatly reduce the workload of testers, thereby reducing the regression time of the testers on the basis of ensuring the online stability of a webpage system and further effectively improving the testing efficiency.
Fig. 3 is a structural diagram of a web page test system according to an embodiment of the present invention. As shown in fig. 3, the web page test system may include: receiving means 10 for receiving an address of an update web page, wherein the update web page is formed by development of an initial web page; an opening device 20, configured to open the updated web page through a headless browser under a preset configuration according to the address of the updated web page; a screenshot device 30, configured to capture a screenshot of the target area of the updated webpage to obtain a target screenshot; the recognition device 40 is configured to respectively recognize the target screenshot and an initial screenshot to determine a similarity between the target screenshot and the initial screenshot, where the initial screenshot is a screenshot of the target area of the initial webpage when the target area is opened under the preset configuration; and a determining device 50, configured to determine that the updated webpage passes the test if the similarity is greater than a similarity threshold.
Preferably, the preset configuration includes a preset environment configuration and a preset page type configuration.
Preferably, the preset environment configuration includes any one of a test environment, a pre-launch environment, and an online environment.
Preferably, the preset configuration further comprises a preset functional configuration.
Preferably, the preset functional configuration comprises support for lazy loading and/or event simulation.
Preferably, the opening device is configured to open the updated webpage in a preset configuration through a headless browser, and includes: opening the updated webpage under the preset environment configuration and the preset page type configuration through the headless browser, and triggering the lazy loading and/or the event simulation action, wherein correspondingly, the screenshot device is used for screenshot the target area of the updated webpage and comprises: and responding to the action of finishing the lazy loading and/or the event simulation triggered by the headless browser, and capturing the target area of the updated webpage after finishing the lazy loading and/or the event simulation.
Preferably, the headless browser is a Puppeteer headless browser.
Preferably, the identifying means is configured to identify the target screenshot and the initial screenshot respectively, and includes: and respectively identifying the target screenshot and the initial screenshot by an OpenCV icon identification technology.
Preferably, the web page test system further comprises: and the sending device is used for sending the address of the updated webpage and the target screenshot to a tester under the condition that the similarity is smaller than or equal to the similarity threshold so as to manually troubleshoot the problems existing in the updated webpage.
For details and benefits of the web page testing system provided by the present invention, reference may be made to the above description of the web page testing method, which is not described herein again.
An embodiment of the present invention further provides a machine-readable storage medium, on which instructions are stored, and the instructions are used for causing a machine to execute the web page testing method.
An embodiment of the present invention further provides an electronic device, including: a processor; a memory for storing the processor-executable instructions; the processor is used for reading the executable instruction from the memory and executing the instruction to realize the webpage testing method.
Although the embodiments of the present invention have been described in detail with reference to the accompanying drawings, the embodiments of the present invention are not limited to the details of the above embodiments, and various simple modifications can be made to the technical solutions of the embodiments of the present invention within the technical idea of the embodiments of the present invention, and the simple modifications all belong to the protection scope of the embodiments of the present invention.
It should be noted that the various features described in the above embodiments may be combined in any suitable manner without departing from the scope of the invention. In order to avoid unnecessary repetition, the embodiments of the present invention do not describe every possible combination.
Those skilled in the art will understand that all or part of the steps in the method according to the above embodiments may be implemented by a program, which is stored in a storage medium and includes several instructions to enable a single chip, a chip, or a processor (processor) to execute all or part of the steps in the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
In addition, any combination of various different implementation manners of the embodiments of the present invention is also possible, and the embodiments of the present invention should be considered as disclosed in the embodiments of the present invention as long as the combination does not depart from the spirit of the embodiments of the present invention.

Claims (10)

1. A webpage testing method is characterized by comprising the following steps:
receiving an address of an update webpage, wherein the update webpage is formed by developing an initial webpage;
opening the updated webpage under a preset configuration through a headless browser according to the address of the updated webpage;
screenshot is carried out on the target area of the updated webpage to obtain a target screenshot;
respectively identifying the target screenshot and an initial screenshot to determine the similarity between the target screenshot and the initial screenshot, wherein the initial screenshot is a screenshot of the target area of the initial webpage when the initial screenshot is opened under the preset configuration; and
and determining that the updated webpage passes the test under the condition that the similarity is greater than a similarity threshold value.
2. The method for testing web pages according to claim 1, wherein the preset configuration comprises a preset environment configuration and a preset page type configuration.
3. The web page testing method according to claim 2, wherein the preset configuration further comprises a preset functional configuration, wherein the preset functional configuration comprises support of lazy loading and/or event simulation.
4. The method for testing web pages according to claim 3, wherein the opening the updated web page in a preset configuration through a headless browser comprises:
opening the updated webpage under the preset environment configuration and the preset page type configuration through the headless browser, and triggering the lazy loading and/or the event simulation action,
correspondingly, the screenshot of the target area of the update webpage comprises: and responding to the action of finishing the lazy loading and/or the event simulation triggered by the headless browser, and capturing the target area of the updated webpage after finishing the lazy loading and/or the event simulation.
5. The web page testing method according to claim 1, wherein the headless browser is a Puppeteer headless browser.
6. The web page testing method of claim 1, wherein the separately identifying the target screenshot and the initial screenshot comprises:
and respectively identifying the target screenshot and the initial screenshot by an icon identification technology.
7. The web page test method according to claim 1, further comprising:
and under the condition that the similarity is smaller than or equal to the similarity threshold, sending the address of the updated webpage and the target screenshot to a tester so as to manually troubleshoot the problems of the updated webpage.
8. A web page test system, the web page test system comprising:
receiving means for receiving an address of an update web page, wherein the update web page is formed by development of an initial web page;
the opening device is used for opening the updated webpage under the preset configuration through a headless browser according to the address of the updated webpage;
the screenshot device is used for screenshot of the target area of the updated webpage to obtain a target screenshot;
the identification device is used for respectively identifying the target screenshot and the initial screenshot so as to determine the similarity between the target screenshot and the initial screenshot, wherein the initial screenshot is the screenshot of the target area of the initial webpage when the initial webpage is opened under the preset configuration; and
and the determining device is used for determining that the updated webpage passes the test under the condition that the similarity is greater than a similarity threshold value.
9. A machine-readable storage medium having stored thereon instructions for causing a machine to perform the web page testing method of any of claims 1-7.
10. An electronic device, characterized in that the electronic device comprises:
a processor;
a memory for storing the processor-executable instructions;
the processor is used for reading the executable instructions from the memory and executing the instructions to realize the webpage testing method of any one of the claims 1-7.
CN202110351625.2A 2021-03-31 2021-03-31 Webpage testing method, webpage testing system, storage medium and electronic equipment Pending CN112948267A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110351625.2A CN112948267A (en) 2021-03-31 2021-03-31 Webpage testing method, webpage testing system, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110351625.2A CN112948267A (en) 2021-03-31 2021-03-31 Webpage testing method, webpage testing system, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN112948267A true CN112948267A (en) 2021-06-11

Family

ID=76231779

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110351625.2A Pending CN112948267A (en) 2021-03-31 2021-03-31 Webpage testing method, webpage testing system, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN112948267A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113590564A (en) * 2021-07-29 2021-11-02 挂号网(杭州)科技有限公司 Data storage method and device, electronic equipment and storage medium
CN114153729A (en) * 2021-11-30 2022-03-08 北京达佳互联信息技术有限公司 Webpage testing method and device, electronic equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103729285A (en) * 2012-10-11 2014-04-16 腾讯科技(深圳)有限公司 Method, device and system for testing web page
CN109885446A (en) * 2018-12-25 2019-06-14 北京互金新融科技有限公司 Determine that Website page shows the method and device of state
CN110134602A (en) * 2019-05-14 2019-08-16 极智(上海)企业管理咨询有限公司 Webpage Automation regression testing method, system, medium and electronic equipment
CN110955589A (en) * 2018-09-27 2020-04-03 北京京东尚科信息技术有限公司 Method, system, device and medium for testing headless mode based on browser
CN111814086A (en) * 2020-07-13 2020-10-23 杭州数澜科技有限公司 Method and system for screenshot of webpage

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103729285A (en) * 2012-10-11 2014-04-16 腾讯科技(深圳)有限公司 Method, device and system for testing web page
CN110955589A (en) * 2018-09-27 2020-04-03 北京京东尚科信息技术有限公司 Method, system, device and medium for testing headless mode based on browser
CN109885446A (en) * 2018-12-25 2019-06-14 北京互金新融科技有限公司 Determine that Website page shows the method and device of state
CN110134602A (en) * 2019-05-14 2019-08-16 极智(上海)企业管理咨询有限公司 Webpage Automation regression testing method, system, medium and electronic equipment
CN111814086A (en) * 2020-07-13 2020-10-23 杭州数澜科技有限公司 Method and system for screenshot of webpage

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
沈顺天 编著: "《Web自动化测试与Selenium 3.0从入门到实践》", 30 November 2020, 机械工业出版社, pages: 291 - 295 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113590564A (en) * 2021-07-29 2021-11-02 挂号网(杭州)科技有限公司 Data storage method and device, electronic equipment and storage medium
CN113590564B (en) * 2021-07-29 2024-03-01 挂号网(杭州)科技有限公司 Data storage method, device, electronic equipment and storage medium
CN114153729A (en) * 2021-11-30 2022-03-08 北京达佳互联信息技术有限公司 Webpage testing method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN111061526B (en) Automatic test method, device, computer equipment and storage medium
EP3557423B1 (en) System and method for testing electronic visual user interface outputs
US9405660B2 (en) Intermediary for testing content and applications
US10248542B2 (en) Screenshot validation testing
CN107025174B (en) Method, device and readable storage medium for user interface anomaly test of equipment
US8682964B1 (en) Progressively loading network content
CN112948267A (en) Webpage testing method, webpage testing system, storage medium and electronic equipment
CN107276842B (en) Interface test method and device and electronic equipment
CN113515453B (en) Webpage testing system
RU2611961C2 (en) Method and system of regression testing of web page functionality, machine-readable data storage media
CN111737614A (en) Page display method and device, electronic equipment and storage medium
CN111414309B (en) Automatic test method of application program, computer equipment and storage medium
CN112650689A (en) Test method, test device, electronic equipment and storage medium
CN115514677B (en) Method and system for server dial testing
CN113590564B (en) Data storage method, device, electronic equipment and storage medium
CN112130908A (en) Method and device for setting user guide
CN114490320A (en) Automatic testing method and device, electronic equipment and storage medium
CN111399836B (en) Method and device for modifying page attribute
CN111190574B (en) Method, device, equipment and storage medium for selecting options of multi-stage linkage assembly
CN113656739A (en) Website data storage method and device
CN109324822B (en) PWA (public warning assistant) item detection method, computer-readable storage medium and terminal device
CN112214703A (en) Webpage loading method and device, computer readable storage medium and computer equipment
CN111143186A (en) Method and apparatus for application program interface API testing
CN111859385B (en) Application program testing method, system and device
WO2024062798A1 (en) System, method, and program for testing website

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