CN111752832A - Website testing method, device and medium - Google Patents
Website testing method, device and medium Download PDFInfo
- Publication number
- CN111752832A CN111752832A CN202010583411.3A CN202010583411A CN111752832A CN 111752832 A CN111752832 A CN 111752832A CN 202010583411 A CN202010583411 A CN 202010583411A CN 111752832 A CN111752832 A CN 111752832A
- Authority
- CN
- China
- Prior art keywords
- page
- sub
- level
- pages
- opened
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Prevention of errors by analysis, debugging or testing of software
- G06F11/3668—Testing of software
- G06F11/3672—Test management
- G06F11/3688—Test management for test execution, e.g. scheduling of test suites
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; 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/901—Indexing; Data structures therefor; Storage structures
- G06F16/9027—Trees
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; 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/955—Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
- G06F16/9558—Details of hyperlinks; Management of linked annotations
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; 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)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Software Systems (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The disclosure relates to a website testing method, device and medium. The method comprises the following steps: acquiring an address of a website to be tested, and opening a root page of the website to be tested based on the address; sequentially opening all level 1 sub-pages linked to the root page; and after an N-level sub-page is opened, sequentially opening N + 1-level sub-pages linked to the N-level sub-page, wherein N is a positive integer greater than or equal to 1. By adopting the method, the hands of testers are liberated, the labor is saved, and the testing efficiency is greatly improved.
Description
Technical Field
The present disclosure relates to the field of computer software technologies, and in particular, to a method, an apparatus, and a medium for testing a website.
Background
Before a website is manufactured by a website developer and put into formal use, a website test is required. In the prior website test, all website links are manually opened by a tester to perform the test. Such testing is time consuming and labor intensive and may be missed, thus presenting a web site automation test. However, the existing automatic testing of the website adopts a single-page opening mode, only solves the problem of no manpower occupation, and still cannot solve the problem of time consumption.
Disclosure of Invention
To overcome the problems in the related art, the present disclosure provides a website testing method, apparatus, and medium.
According to a first aspect of the embodiments of the present disclosure, there is provided a website testing method, the method including:
acquiring an address of a website to be tested, and opening a root page of the website to be tested based on the address;
sequentially opening all level 1 sub-pages linked to the root page;
and after an N-level sub-page is opened, sequentially opening N + 1-level sub-pages linked to the N-level sub-page, wherein N is a positive integer greater than or equal to 1.
Wherein the method further comprises:
when an N-level sub-page is opened, an opened mark is set for the opened N-level sub-page.
Wherein, open in proper order the N +1 level sub page that N level sub page links to, include:
and when the N + 1-level sub-pages linked to the N-level sub-pages are sequentially opened, skipping the opening of the N + 1-level sub-pages provided with the opened marks.
Wherein the method further comprises:
and after determining that the N +1 level sub-pages linked to the N level sub-pages are all opened, closing the N level sub-pages.
Wherein, the sequentially opening each level 1 sub-page linked to the root page comprises:
acquiring links to all level 1 sub-pages on the root page based on a document object model;
the links to the level 1 sub-pages are opened in turn.
Wherein, the sequentially opening each level 1 sub-page linked to the root page further comprises:
and sequentially opening all the level-1 sub-pages linked to the root page based on a random sequence or a set sequence.
Wherein, the sequentially opening the N +1 level sub-pages linked to the N level sub-pages comprises:
and sequentially opening the N +1 level sub-pages linked to the N level sub-pages based on a random sequence or a set sequence.
According to a second aspect of the embodiments of the present disclosure, there is provided a website testing apparatus, the apparatus including:
the acquisition module is arranged for acquiring the address of the website to be tested;
a page open module configured to:
opening the website root page to be tested based on the address,
sequentially opening each level 1 sub-page linked to the root page,
and after an N-level sub-page is opened, sequentially opening N + 1-level sub-pages linked to the N-level sub-page, wherein N is a positive integer greater than or equal to 1.
Wherein the apparatus further comprises:
the flag setting module is set to set an opened flag for an opened N-level sub-page when the N-level sub-page is opened.
Wherein the page open module is further configured to:
and when the N + 1-level sub-pages linked to the N-level sub-pages are sequentially opened, skipping the opening of the N + 1-level sub-pages provided with the opened marks.
Wherein the apparatus further comprises:
and the page closing module is set to close the N-level sub-page after determining that the N + 1-level sub-page linked to the N-level sub-page is opened.
Wherein the page open module is further configured to:
acquiring links to all level 1 sub-pages on the root page based on a document object model;
the links to the level 1 sub-pages are opened in turn.
Wherein the page open module is further configured to:
and sequentially opening all the level-1 sub-pages linked to the root page based on a random sequence or a set sequence.
Wherein the page open module is further configured to:
and sequentially opening the N +1 level sub-pages linked to the N level sub-pages based on a random sequence or a set sequence.
According to a third aspect of the embodiments of the present disclosure, there is provided a website testing apparatus, including:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to implement the following steps when executing the executable instructions:
acquiring an address of a website to be tested, and opening a root page of the website to be tested based on the address;
sequentially opening all level 1 sub-pages linked to the root page;
and after an N-level sub-page is opened, sequentially opening N + 1-level sub-pages linked to the N-level sub-page, wherein N is a positive integer greater than or equal to 1. .
According to a fourth aspect of embodiments of the present disclosure, there is provided a non-transitory computer-readable storage medium having instructions thereon which, when executed by a processor of an apparatus, enable the apparatus to perform a website testing method, the method comprising:
acquiring an address of a website to be tested, and opening a root page of the website to be tested based on the address;
sequentially opening all level 1 sub-pages linked to the root page;
and after an N-level sub-page is opened, sequentially opening N + 1-level sub-pages linked to the N-level sub-page, wherein N is a positive integer greater than or equal to 1.
By adopting the method disclosed by the invention, firstly, the root page of the website to be tested is opened based on the address of the website to be tested, and then, all the level-1 sub-pages linked to the root page are opened in sequence. After a level 1 sub-page is opened, starting to open a level 2 sub-page below the level 1 sub-page; after a 2-level sub-page is opened, starting to open a 3-level sub-page below the 2-level sub-page; and so on. The opening of the N +1 level sub-page under each N level sub-page is independently performed, and only the N level sub-page is opened, that is, the opening of the N +1 level sub-page under the N level sub-page is started. The method for opening the N + 1-level sub-pages under the N-level sub-pages in parallel according to the tree structure is adopted, so that the opening efficiency of the pages can be greatly improved. By adopting the method, the hands of testers are liberated, the labor is saved, and the testing efficiency is greatly improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
FIG. 1 is a flow chart illustrating a website testing method according to an exemplary embodiment.
FIG. 2 is a flow chart illustrating a website testing method according to an example embodiment.
FIG. 3 is a block diagram illustrating a website testing device, according to an example embodiment.
FIG. 4 is a block diagram illustrating an apparatus in accordance with an example embodiment.
FIG. 5 is a block diagram illustrating an apparatus in accordance with an example embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the invention, as detailed in the appended claims.
The existing automatic testing of the network station adopts a single-page opening mode, so that the testing speed is limited, and the efficiency is low.
The disclosure provides a website testing method, which comprises the steps of firstly opening a root page of a website to be tested based on an address of the website to be tested, and then sequentially opening all level 1 sub-pages linked to the root page. After a level 1 sub-page is opened, starting to open a level 2 sub-page below the level 1 sub-page; after a 2-level sub-page is opened, starting to open a 3-level sub-page below the 2-level sub-page; and so on. The opening of the N +1 level sub-page under each N level sub-page is independently performed, and only the N level sub-page is opened, that is, the opening of the N +1 level sub-page under the N level sub-page is started. The method for opening the N + 1-level sub-pages under the N-level sub-pages in parallel according to the tree structure is adopted, so that the opening efficiency of the pages can be greatly improved. By adopting the method, the hands of testers are liberated, the labor is saved, and the testing efficiency is greatly improved.
FIG. 1 is a flow chart illustrating a website testing method according to an exemplary embodiment, as shown in FIG. 1, the method comprising the steps of:
and 103, after an N-level sub-page is opened, sequentially opening N + 1-level sub-pages linked to the N-level sub-page, wherein N is a positive integer greater than or equal to 1.
When testing the website, the click point in the website (including the root page and each level of sub-pages) needs to be clicked, and the root page and each level of sub-pages of the website are opened to test the functionality, the security and the like of the website.
The method is realized based on a tree structure formed by a root page and all levels of sub-pages of a website. The sub-page to which the root page is directly linked is a level 1 sub-page, the sub-page to which the level 1 sub-page is directly linked is a level 2 sub-page, and the sub-page to which the level 2 sub-page is directly linked is a level 3 sub-page … …. There may be one or more level 1 subpages, as may be one or more level 2 subpages.
In step 101, an address of a website to be tested is obtained, and the address is connected through a browser to open a root page of the website to be tested.
In step 102, there may be one or more click points on the root page, i.e., links to one or more level 1 sub-pages. When only one click point exists on the root page, clicking the click point and opening the level 1 sub-page linked to by the click point. And when a plurality of click points exist on the root page, clicking the click points in sequence, namely opening the level 1 sub-pages linked by the click points in sequence.
In step 103, the step is described by taking N ═ 1 as an example, and each level 1 sub page may have one or more click points, that is, links to one or more level 2 sub pages. Each level 1 sub-page performs the opening of its lower level 2 sub-page simultaneously.
For example, there are 4 level 1 sub-pages under the root page of the website to be tested: page a, page b, page c, page d. There are 3 level 2 sub-pages below level 1 sub-page a: page a1, page a2, page a 3; there are 3 level 2 sub-pages below level 1 sub-page b: page b1, page b2, page b 3; there are 3 level 2 sub-pages below level 1 sub-page c: page c1, page c2, page c 3; there are 3 level 2 sub-pages below level 1 sub-page d: page d1, page d2, page d 3. After the root page is opened, page a, page b, page c and page d are opened in sequence. Immediately after page a is opened, the opening of its lower level 2 sub-pages a1, a2, a3 is performed; immediately after page b is opened, the opening of its lower level 2 sub-pages b1, b2, b3 is performed; immediately after page c is opened, the opening of its lower level 2 sub-pages c1, c2, c3 is performed; immediately after page d is opened, the opening of its lower level 2 sub-pages d1, d2, d3 is performed.
Thus, each level 1 sub-page a, b, c, d independently performs the opening of its lower level 2 sub-page. For example, the opening of the level 2 sub-pages a1, a2, a3 under the level 1 sub-page a may or may not be the same as the opening of the level 2 sub-pages b1, b2, b3 under the level 1 sub-page b. As soon as the level 1 sub-page is opened, the opening of its lower level 2 sub-page is performed.
The above is explained by taking the opening of the level 1 sub-page and the level 2 sub-page as an example, and the opening process of the following level sub-pages can be analogized, so that the details are not repeated here.
The method for opening the N + 1-level sub-pages under the N-level sub-pages in parallel according to the tree structure is adopted, so that the opening efficiency of the pages can be greatly improved.
In an alternative embodiment, the method further comprises:
when an N-level sub-page is opened, an opened mark is set for the opened N-level sub-page.
In a web site, it is often the case that multiple different pages may be linked to the same page. Therefore, when opening a level N +1 sub-page below a level N sub-page, it is possible that a level N +1 sub-page has already been opened. Thus, when opening the N +1 level sub-page under the N level sub-page, the N +1 level sub-page that has already been opened does not need to be opened.
Therefore, the opened flag is set for the N-level sub-page that has been opened, so that whether the sub-page needs to be opened can be determined based on whether the sub-page is set with the opened flag. The setting of the turned-on flag here can be carried out in a manner known to the person skilled in the art.
In an optional embodiment, sequentially opening the N +1 level sub-pages linked to the N level sub-pages includes:
and when the N + 1-level sub-pages linked to the N-level sub-pages are sequentially opened, skipping the opening of the N + 1-level sub-pages provided with the opened marks.
Based on the above description, when the N + 1-level sub-pages linked to the N-level sub-pages are sequentially opened, if an N + 1-level sub-page is provided with an opened flag, the opening of the sub-page may be skipped. And when the N +1 level sub page provided with the opened mark has no other N +1 level sub page to be opened at the same level, the N +1 level sub page belonging to the same father page is opened.
By adopting the method, the same page can be prevented from being repeatedly opened, and the testing efficiency of the website is improved.
In an alternative embodiment, the method further comprises:
and after determining that the N +1 level sub-pages linked to the N level sub-pages are all opened, closing the N level sub-pages.
For example, there are 3 level 2 sub-pages below level 1 sub-page a: page a1, page a2, page a3, when all 3 level 2 subpages a1, a2, a3 are opened, the level 1 subpage a is closed. This can avoid the processing speed of the test being affected by too many pages being opened at the same time.
In an optional embodiment, the sequentially opening each level 1 sub-page linked to the root page includes:
acquiring links to all level 1 sub-pages on the root page based on a document object model;
the links to the level 1 sub-pages are opened in turn.
A click point on the root page, i.e., a link to each level 1 sub-page, is obtained based on a Document Object Model (DOM), and each level 1 sub-page is opened through the link.
In an optional embodiment, the sequentially opening each level-1 sub-page linked to the root page further includes:
and sequentially opening all the level-1 sub-pages linked to the root page based on a random sequence or a set sequence.
When opening the level 1 sub-pages, the click points may be clicked in a set order (for example, in the order from top to bottom and from left to right on the root page), or may be clicked randomly.
In an optional embodiment, the sequentially opening the N +1 level sub-pages linked to the N level sub-pages includes:
and sequentially opening the N +1 level sub-pages linked to the N level sub-pages based on a random sequence or a set sequence.
When the N + 1-level sub-pages are opened, the click points may be clicked in a set order (for example, in the order from top to bottom and from left to right on the root page), or may be clicked randomly.
Specific embodiments according to the present disclosure are described below in conjunction with specific application scenarios. In this embodiment, there are 3 level 1 sub-pages under the root page of the website to be tested: page a, page b, page c. There are 3 level 2 sub-pages below level 1 sub-page a: page a1, page a2, page a 3; there are 3 level 2 sub-pages below level 1 sub-page b: page b1, page b2 (same page as a 2), page b 3; there are 3 level 2 sub-pages below level 1 sub-page c: page c1, page c2, page c 3.
Referring to fig. 2, the method of this embodiment includes the steps of:
And step 204, closing the root page after the pages a, b and c are opened.
In step 205, immediately after page a is opened, the opening of its lower level 2 sub-pages a1, a2, a3 is performed.
And step 206, immediately opening the sub-pages b1, b2 and b3 at the lower level 2 after the page b is opened, wherein the page b1 skips the page b2 after being opened and opens the page b3 because the b2 is provided with an opened mark.
Immediately after page c is opened, the opening of its lower level 2 sub-pages c1, c2, c3 is performed, step 207.
And step 208, after each level 2 sub-page is opened, setting an opened mark for the level 2 sub-page.
It should be noted that the above steps may be executed simultaneously, and are not necessarily executed according to the above writing order. For example, steps 205, 206, 207 may or may not be performed simultaneously, and whether to perform opening of a sub page of its next stage is determined based on whether the sub page is already opened, not on the set order. And the opened flag can be set after the sub-page is opened.
The present disclosure also provides a website testing apparatus, as shown in fig. 3, the apparatus includes:
an obtaining module 301 configured to obtain an address of a website to be tested;
a page open module 302 configured to:
opening the website root page to be tested based on the address,
sequentially opening each level 1 sub-page linked to the root page,
and after an N-level sub-page is opened, sequentially opening N + 1-level sub-pages linked to the N-level sub-page, wherein N is a positive integer greater than or equal to 1.
In an alternative embodiment, the apparatus further comprises:
the flag setting module is set to set an opened flag for an opened N-level sub-page when the N-level sub-page is opened.
In an alternative embodiment, the page open module 302 is further configured to:
and when the N + 1-level sub-pages linked to the N-level sub-pages are sequentially opened, skipping the opening of the N + 1-level sub-pages provided with the opened marks.
In an alternative embodiment, the apparatus further comprises:
and the page closing module is set to close the N-level sub-page after determining that the N + 1-level sub-page linked to the N-level sub-page is opened.
In an alternative embodiment, the page open module 302 is further configured to:
acquiring links to all level 1 sub-pages on the root page based on a document object model;
the links to the level 1 sub-pages are opened in turn.
In an alternative embodiment, the page open module 302 is further configured to:
and sequentially opening all the level-1 sub-pages linked to the root page based on a random sequence or a set sequence.
In an alternative embodiment, the page open module 302 is further configured to:
and sequentially opening the N +1 level sub-pages linked to the N level sub-pages based on a random sequence or a set sequence.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
By adopting the method disclosed by the invention, firstly, the root page of the website to be tested is opened based on the address of the website to be tested, and then, all the level-1 sub-pages linked to the root page are opened in sequence. After a level 1 sub-page is opened, starting to open a level 2 sub-page below the level 1 sub-page; after a 2-level sub-page is opened, starting to open a 3-level sub-page below the 2-level sub-page; and so on. The opening of the N +1 level sub-page under each N level sub-page is independently performed, and only the N level sub-page is opened, that is, the opening of the N +1 level sub-page under the N level sub-page is started. The method for opening the N + 1-level sub-pages under the N-level sub-pages in parallel according to the tree structure is adopted, so that the opening efficiency of the pages can be greatly improved. By adopting the method, the hands of testers are liberated, the labor is saved, and the testing efficiency is greatly improved.
FIG. 4 is a block diagram illustrating a website testing apparatus 400 according to an example embodiment.
Referring to fig. 4, the apparatus 400 may include one or more of the following components: a processing component 402, a memory 404, a power component 406, a multimedia component 408, an audio component 410, an interface for input/output (I/O) 412, a sensor component 414, and a communication component 416.
The processing component 402 generally controls overall operation of the apparatus 400, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 402 may include one or more processors 420 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 402 can include one or more modules that facilitate interaction between the processing component 402 and other components. For example, the processing component 402 can include a multimedia module to facilitate interaction between the multimedia component 408 and the processing component 402.
The memory 404 is configured to store various types of data to support operations at the device 400. Examples of such data include instructions for any application or method operating on the device 400, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 404 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
The multimedia component 408 includes a screen that provides an output interface between the device 400 and the user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 408 includes a front facing camera and/or a rear facing camera. The front-facing camera and/or the rear-facing camera may receive external multimedia data when the device 400 is in an operational mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 410 is configured to output and/or input audio signals. For example, audio component 410 includes a Microphone (MIC) configured to receive external audio signals when apparatus 400 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 404 or transmitted via the communication component 416. In some embodiments, audio component 410 also includes a speaker for outputting audio signals.
The I/O interface 412 provides an interface between the processing component 402 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor component 414 includes one or more sensors for providing various aspects of status assessment for the apparatus 400. For example, the sensor component 414 can detect the open/closed state of the device 400, the relative positioning of components, such as a display and keypad of the apparatus 400, the sensor component 414 can also detect a change in the position of the apparatus 400 or a component of the apparatus 400, the presence or absence of user contact with the apparatus 400, orientation or acceleration/deceleration of the apparatus 400, and a change in the temperature of the apparatus 400. The sensor assembly 414 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 414 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 414 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 416 is configured to facilitate wired or wireless communication between the apparatus 400 and other devices. The apparatus 400 may access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 416 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 416 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the apparatus 400 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer-readable storage medium comprising instructions, such as the memory 404 comprising instructions, executable by the processor 420 of the apparatus 400 to perform the above-described method is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
A non-transitory computer readable storage medium having instructions therein which, when executed by a processor of a mobile terminal, enable the mobile terminal to perform a website testing method, the method comprising: acquiring an address of a website to be tested, and opening a root page of the website to be tested based on the address; sequentially opening all level 1 sub-pages linked to the root page; and after an N-level sub-page is opened, sequentially opening N + 1-level sub-pages linked to the N-level sub-page, wherein N is a positive integer greater than or equal to 1.
Fig. 5 is a block diagram illustrating a website testing apparatus 500 according to an example embodiment. For example, the apparatus 500 may be provided as a server. Referring to fig. 5, the apparatus 500 includes a processing component 522 that further includes one or more processors and memory resources, represented by memory 532, for storing instructions, such as applications, that are executable by the processing component 522. The application programs stored in memory 532 may include one or more modules that each correspond to a set of instructions. Further, the processing component 522 is configured to execute instructions to perform the above-described method: acquiring an address of a website to be tested, and opening a root page of the website to be tested based on the address; sequentially opening all level 1 sub-pages linked to the root page; and after an N-level sub-page is opened, sequentially opening N + 1-level sub-pages linked to the N-level sub-page, wherein N is a positive integer greater than or equal to 1.
The apparatus 500 may also include a power component 526 configured to perform power management of the apparatus 500, a wired or wireless network interface 550 configured to connect the apparatus 500 to a network, and an input/output (I/O) interface 558. The apparatus 500 may operate based on an operating system stored in the memory 532, such as Windows Server, Mac OSXTM, UnixTM, LinuxTM, FreeBSDTM, or the like.
Other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.
It will be understood that the invention is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the invention is limited only by the appended claims.
Claims (16)
1. A method for testing a website, the method comprising:
acquiring an address of a website to be tested, and opening a root page of the website to be tested based on the address;
sequentially opening all level 1 sub-pages linked to the root page;
and after an N-level sub-page is opened, sequentially opening N + 1-level sub-pages linked to the N-level sub-page, wherein N is a positive integer greater than or equal to 1.
2. The method of claim 1, wherein the method further comprises:
when an N-level sub-page is opened, an opened mark is set for the opened N-level sub-page.
3. The method of claim 2, wherein sequentially opening the N +1 level sub-pages to which the N level sub-pages are linked comprises:
and when the N + 1-level sub-pages linked to the N-level sub-pages are sequentially opened, skipping the opening of the N + 1-level sub-pages provided with the opened marks.
4. The method of claim 1, wherein the method further comprises:
and after determining that the N +1 level sub-pages linked to the N level sub-pages are all opened, closing the N level sub-pages.
5. The method of claim 1, wherein the sequentially opening the level 1 sub-pages to which the root page is linked comprises:
acquiring links to all level 1 sub-pages on the root page based on a document object model;
the links to the level 1 sub-pages are opened in turn.
6. The method of claim 1, wherein the sequentially opening the level 1 sub-pages to which the root page is linked further comprises:
and sequentially opening all the level-1 sub-pages linked to the root page based on a random sequence or a set sequence.
7. The method of claim 1, wherein said sequentially opening the N +1 level sub-pages to which the N level sub-pages are linked comprises:
and sequentially opening the N +1 level sub-pages linked to the N level sub-pages based on a random sequence or a set sequence.
8. A website testing apparatus, the apparatus comprising:
the acquisition module is arranged for acquiring the address of the website to be tested;
a page open module configured to:
opening the website root page to be tested based on the address,
sequentially opening each level 1 sub-page linked to the root page,
and after an N-level sub-page is opened, sequentially opening N + 1-level sub-pages linked to the N-level sub-page, wherein N is a positive integer greater than or equal to 1.
9. The apparatus of claim 8, wherein the apparatus further comprises:
the flag setting module is set to set an opened flag for an opened N-level sub-page when the N-level sub-page is opened.
10. The apparatus of claim 9, wherein the page open module is further configured to:
and when the N + 1-level sub-pages linked to the N-level sub-pages are sequentially opened, skipping the opening of the N + 1-level sub-pages provided with the opened marks.
11. The apparatus of claim 8, wherein the apparatus further comprises:
and the page closing module is set to close the N-level sub-page after determining that the N + 1-level sub-page linked to the N-level sub-page is opened.
12. The apparatus of claim 8, wherein the page open module is further configured to:
acquiring links to all level 1 sub-pages on the root page based on a document object model;
the links to the level 1 sub-pages are opened in turn.
13. The method of claim 8, wherein the page open module is further configured to:
and sequentially opening all the level-1 sub-pages linked to the root page based on a random sequence or a set sequence.
14. The method of claim 8, wherein the page open module is further configured to:
and sequentially opening the N +1 level sub-pages linked to the N level sub-pages based on a random sequence or a set sequence.
15. A website testing device, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to implement the following steps when executing the executable instructions:
acquiring an address of a website to be tested, and opening a root page of the website to be tested based on the address;
sequentially opening all level 1 sub-pages linked to the root page;
and after an N-level sub-page is opened, sequentially opening N + 1-level sub-pages linked to the N-level sub-page, wherein N is a positive integer greater than or equal to 1.
16. A non-transitory computer readable storage medium in which instructions, when executed by a processor of a device, enable the device to perform a website testing method, the method comprising:
acquiring an address of a website to be tested, and opening a root page of the website to be tested based on the address;
sequentially opening all level 1 sub-pages linked to the root page;
and after an N-level sub-page is opened, sequentially opening N + 1-level sub-pages linked to the N-level sub-page, wherein N is a positive integer greater than or equal to 1.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010583411.3A CN111752832A (en) | 2020-06-23 | 2020-06-23 | Website testing method, device and medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010583411.3A CN111752832A (en) | 2020-06-23 | 2020-06-23 | Website testing method, device and medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111752832A true CN111752832A (en) | 2020-10-09 |
Family
ID=72676944
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010583411.3A Pending CN111752832A (en) | 2020-06-23 | 2020-06-23 | Website testing method, device and medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111752832A (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20130205397A1 (en) * | 2012-02-07 | 2013-08-08 | Microsoft Corporation | Adaptive fuzzing system for web services |
US20140157112A1 (en) * | 2000-10-31 | 2014-06-05 | Software Research Inc. | Method and System for Testing Websites |
CN109508282A (en) * | 2018-09-25 | 2019-03-22 | 平安科技(深圳)有限公司 | Bury the setting method and device, computer storage medium, electronic equipment of point identification |
-
2020
- 2020-06-23 CN CN202010583411.3A patent/CN111752832A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20140157112A1 (en) * | 2000-10-31 | 2014-06-05 | Software Research Inc. | Method and System for Testing Websites |
US20130205397A1 (en) * | 2012-02-07 | 2013-08-08 | Microsoft Corporation | Adaptive fuzzing system for web services |
CN109508282A (en) * | 2018-09-25 | 2019-03-22 | 平安科技(深圳)有限公司 | Bury the setting method and device, computer storage medium, electronic equipment of point identification |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112241361B (en) | Test case generation method and device, problem scenario automatic reproduction method and device | |
CN109359056B (en) | Application program testing method and device | |
CN104834559B (en) | Notification message display method and device | |
CN104462296B (en) | File management method and device and terminal | |
CN110502444B (en) | Testing method and testing device for image processing algorithm | |
CN111371837B (en) | Function presenting method, function presenting device, and storage medium | |
CN111209195B (en) | Method and device for generating test case | |
CN112445832B (en) | Data anomaly detection method and device, electronic equipment and storage medium | |
CN106547547B (en) | data acquisition method and device | |
CN110990801A (en) | Information verification method and device, electronic device and storage medium | |
CN110704030A (en) | Interface configuration information generation method and device, electronic equipment and storage medium | |
CN105094904A (en) | Application program installation method and device | |
CN108270661B (en) | Information reply method, device and equipment | |
CN112559309B (en) | Page performance acquisition algorithm adjusting method and device | |
CN110286817A (en) | Handle the method and device of message | |
CN112685269A (en) | Data acquisition method and device, electronic equipment and storage medium | |
CN111611470B (en) | Data processing method and device and electronic equipment | |
KR101744696B1 (en) | Method, device, program and recording medium for filtering information | |
CN105468606B (en) | Webpage saving method and device | |
CN111752832A (en) | Website testing method, device and medium | |
CN112383661B (en) | Mobile terminal automatic test method and device, electronic equipment and storage medium | |
CN111401048B (en) | Intention identification method and device | |
CN104038607A (en) | Telephone calling method and device | |
US20170187847A1 (en) | Method and apparatus for setting waiting time duration | |
CN107016081A (en) | page loading method and device |
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 |