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
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
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...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com