Eureka AIR delivers breakthrough ideas for toughest innovation challenges, trusted by R&D personnel around the world.

Browser-based headless mode test method, system and device and medium

A headless mode, browser technology, applied in the field of testing, can solve problems such as low efficiency of automated test execution, and achieve the effect of improving test efficiency, reducing rendering time, and improving response time

Pending Publication Date: 2020-04-03
BEIJING JINGDONG SHANGKE INFORMATION TECH CO LTD +1
View PDF0 Cites 7 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0006] The technical problem to be solved by the present invention is to provide a test method, system, device and medium based on a browser-based headless mode in order to overcome the defect of low automated test execution efficiency in the prior art

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Browser-based headless mode test method, system and device and medium
  • Browser-based headless mode test method, system and device and medium
  • Browser-based headless mode test method, system and device and medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0042] The present embodiment provides a kind of automated testing method based on the headless mode of browser, and the software environment of this method is:

[0043] Operating system: Windows (an operating system), Linux (an operating system), and MacOS (an operating system) are all available. Considering that most of the existing cloud hosting services use the Linux operating system, what is used in this embodiment is Linux operating system. The browser is the latest Google Chrome browser. NodeJS development environment based on NodeJS (a programming language runtime environment) + Puppeteer.

[0044] The environment preparation work is used to start the browser, execute the operation of the browser on the displayed page, complete the acquisition of page information, and also be used to output key point information. The test scripts are written in Javascript (a programming language) and use the latest ECMAScript6 standard. All test scripts need to be imported into the P...

Embodiment 2

[0060] This embodiment provides a browser-based automated testing method for headless mode. Compared with Embodiment 1, the test case includes an interface display function test case, a data robustness test case and a page performance test. Example.

[0061] The interface display function test case includes verifying whether the display elements in the display page are displayed, where the display elements include controls.

[0062] The general business process is: open a display page -> wait for the page to be displayed -> click a link -> wait for the page to be refreshed -> verify whether a control is displayed.

[0063] This can be achieved with the following configuration

[0064]

[0065] Data robustness test cases include intercepting and modifying page interaction data to verify that the page is displayed as preset.

[0066] Data robustness testing usually uses page mock testing, which is generally used to tamper with requests or return data, and to verify whether ...

Embodiment 3

[0089] The present embodiment provides a kind of automated testing system based on the headless mode of browser, and the software environment of this system is:

[0090] Operating system: Windows (an operating system), Linux (an operating system), and MacOS (an operating system) are all available. Considering that most of the existing cloud hosting services use the Linux operating system, what is used in this embodiment is Linux operating system. The browser is the latest Google Chrome browser. NodeJS development environment based on NodeJS (a programming language runtime environment) + Puppeteer.

[0091] The environment preparation work is used to start the browser, execute the operation of the browser on the displayed page, complete the acquisition of page information, and also be used to output key point information. The test scripts are written in Javascript (a programming language) and use the latest ECMAScript6 standard. All test scripts need to be imported into the P...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a browser-based headless mode testing method, system and device and a medium. The testing method comprises: calling a starting interface of the headless browser is called to start the headless browser; calling a client configuration interface, and configuring parameters of the configuration interface according to the client type; setting test parameters according to a preset test case; and calling a page test interface, the page test interface being used for opening a preset page of the headless browser according to the parameters of the configuration interface, and performing a corresponding test on the preset page according to the test parameters. According to the browser, the display page is started and operated in the headless operation mode, the rendering timeof the display page is shortened, the response time of the whole display page is shorted by 100% or above compared with the response time of a display page of a conventional automatic test, and the test efficiency of the display page test is greatly improved.

Description

technical field [0001] The invention relates to the testing field, in particular to a browser-based headless mode testing method, system, equipment and media. Background technique [0002] Existing mainstream web (global wide area network) automated testing technologies mainly include user interface (UI) automated testing, data robustness testing and performance testing. [0003] Existing user interface automation tests usually start the browser through a script, then execute the test script, and let the browser perform operations through the framework. The startup and execution of the browser is to simulate the user opening the browser and opening the page, and operating the displayed interface , to complete the automated test, because it takes a certain amount of time to open the interface until it is fully displayed and the display mechanism needs to be processed, which leads to the disadvantages of low efficiency, slow speed and poor stability of the existing user interf...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F11/36
CPCG06F11/3688
Inventor 潘晓明
Owner BEIJING JINGDONG SHANGKE INFORMATION TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Eureka Blog
Learn More
PatSnap group products