Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Web front-end testing method and device

A test method and web front-end technology, applied in the Internet field, can solve the problems of complex front-end unit test case maintenance, improve maintainability and test efficiency, and reduce high coupling.

Active Publication Date: 2019-01-29
南方电网互联网服务有限公司
View PDF2 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, the test cases of business functions are directly coupled to the business code. The high coupling degree of the front-end business code makes the maintenance of the front-end unit test cases extremely complicated.

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
  • Web front-end testing method and device
  • Web front-end testing method and device
  • Web front-end testing method and device

Examples

Experimental program
Comparison scheme
Effect test

no. 1 example

[0030] Please refer to image 3 , is a webpage front-end testing method provided by a preferred embodiment of the present invention, and is applied to a client 401 and a webpage server 100 connected to each other through communication. The webpage front-end testing method comprises the following steps:

[0031]Step S101, the client 401 generates access request data in response to a test instruction.

[0032] In this embodiment, the client 401 acquires data for loading web pages and data for implementing various front-end website services from the web server 100 through the access request data. The access request data includes a test identifier for identifying a function to be tested that needs to be tested and a file to be tested corresponding to the function to be tested. It should be noted that the corresponding relationship between the function to be tested and the file to be tested can be preset. The access request data also includes the webpage address corresponding to...

no. 2 example

[0062] Such as Image 6 Shown is a webpage front-end testing method provided by a preferred embodiment of the present invention, the method is applied to the webpage server 100, and the webpage front-end testing method includes the following steps:

[0063] Step S201, receiving the access request data sent by the client 401, wherein the access request data includes a test identifier for identifying a function to be tested that needs to be tested.

[0064] In this embodiment, the access request data is parsed, and the test identification of the function to be tested that needs to be tested is obtained from the access request data. The test identification includes the identification of the file to be tested and the identification of the function to be tested. The identifier of the file to be tested may be the name of the file to be tested, for example, the name of the file to be tested may be demo.js; the identifier of the function to be tested may be the name of the function t...

no. 3 example

[0075] Please refer to Figure 7 , is the webpage front-end testing device 200 applied to the webpage server 100 provided by the preferred embodiment of the present invention. The webpage front-end testing device 200 includes: a receiving module 201 , an acquiring module 202 , a generating module 203 and a sending module 204 .

[0076] The receiving module 201 is configured to receive the access request data sent by the client 401, wherein the access request data includes a test identifier for identifying a function to be tested that needs to be tested.

[0077] In the embodiment of the present invention, step S201 may be executed by the receiving module 201 .

[0078] The obtaining module 202 is used to obtain the test case corresponding to the function to be tested according to the test identification; and is also used to obtain the data to be fed back according to the access request data, wherein the data to be fed back includes information related to the function to be te...

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 present invention provides a webpage front-end testing method, device, system, apparatus, and readable storage medium related to the technical field of Internet technology. The method is applied to a client and a webpage server communicatively connected to each other, and comprises: the client generating access request data in response to a test instruction, wherein the access request data comprises a test identifier used to identify a function to be tested that requires testing; sending the access request data to the webpage server; the webpage server acquiring, according to the test identifier, a test case corresponding to the function to be tested; acquiring, according to the access request data, data to be fed back, wherein the data to be fed back comprises a file to be tested corresponding to the function to be tested; generating response data according to the test case and the data to be fed back; sending the response data to the client; and the client executing the response data to acquire a test result. The present invention reduces coupling of response data, enhances testing accuracy and efficiency, and reduces time and labor costs of testing.

Description

technical field [0001] The invention relates to the technical field of the Internet, in particular, to a method and a device for testing a front-end of a web page. Background technique [0002] The web front-end is an important branch of Internet technology, which occupies an extremely important position in interface display and user interaction. With the development of the Internet, more and more back-end business logic is gradually front-end, making the front-end business logic increasingly complex. [0003] In recent years, the front-end technology has changed with each passing day, and various unit testing solutions have emerged in the front-end field, such as jasmine and mocha. Although these unit testing schemes can guarantee the quality of the front-end code to a certain extent. However, the test cases of business functions are directly coupled to the business code, and the high coupling degree of the front-end business code makes the maintenance of the front-end un...

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 Patents(China)
IPC IPC(8): G06F11/36H04L29/08
CPCG06F11/3684H04L67/125H04L67/34
Inventor 朱子剑陈少杰张文明
Owner 南方电网互联网服务有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products