CN114448847A - Nginx-based request testing method and tool - Google Patents

Nginx-based request testing method and tool Download PDF

Info

Publication number
CN114448847A
CN114448847A CN202210108725.7A CN202210108725A CN114448847A CN 114448847 A CN114448847 A CN 114448847A CN 202210108725 A CN202210108725 A CN 202210108725A CN 114448847 A CN114448847 A CN 114448847A
Authority
CN
China
Prior art keywords
nginx
request
network protocol
target
test
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
CN202210108725.7A
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.)
Shanghai Bilibili Technology Co Ltd
Original Assignee
Shanghai Bilibili 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 Shanghai Bilibili Technology Co Ltd filed Critical Shanghai Bilibili Technology Co Ltd
Priority to CN202210108725.7A priority Critical patent/CN114448847A/en
Publication of CN114448847A publication Critical patent/CN114448847A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/18Protocol analysers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application provides a nginx-based request testing method and a tool, wherein the nginx-based request testing method comprises the following steps: acquiring a target webpage request and target response information corresponding to the target webpage request; compiling the nginx configuration file and the network protocol to be tested to obtain a nginx service compilation file; creating a nginx test case according to the target webpage request, the target response information and the nginx service compilation file; and testing the network protocol to be tested according to the nginx test example to obtain a test result of the network protocol to be tested. By integrating the nginx service into the request testing method, the optimized request testing method based on the nginx is more suitable for the use scene of network protocol diversification, and the use experience of a user is improved.

Description

Nginx-based request testing method and tool
Technical Field
The application relates to the technical field of internet, in particular to a nginx-based request testing method. The application also relates to a nginx-based request test tool, a computing device, and a computer-readable storage medium.
Background
With the development of internet technology, lightweight web page access is applied more and more, a request testing tool is derived, request tests in different network environments are simulated in a mode of recording and replaying user requests, and developers are assisted in testing, evaluating and optimizing self-developed services.
The request testing tool is developed, the used network protocol is only HTTP1.1, more advanced protocols such as HTTP2 and HTTP3 are widely applied to a plurality of websites along with the development of the technology, and the existing request testing tool cannot meet the current service scene, so that richer request testing tools and request testing methods are needed to adapt to the existing network protocol, the experimental test of developers is facilitated, and the purpose of more comprehensively adjusting and optimizing the service performance is achieved.
Disclosure of Invention
In view of this, the embodiments of the present application provide a nginx-based request testing method. The application also relates to a nginx-based request test tool, a computing device and a computer-readable storage medium, so as to solve the problems of difficult maintenance and poor flexibility of the existing request test tool in the prior art.
According to a first aspect of the embodiments of the present application, there is provided a nginx-based request testing method, including:
acquiring a target webpage request and target response information corresponding to the target webpage request;
compiling the nginx configuration file and the network protocol to be tested to obtain a nginx service compilation file;
creating a nginx test case according to the target webpage request, the target response information and the nginx service compilation file;
and testing the network protocol to be tested according to the nginx test example to obtain a test result of the network protocol to be tested.
According to a second aspect of the embodiments of the present application, there is provided a nginx-based request test tool, including:
the acquisition module is used for acquiring a target webpage request and target response information corresponding to the target webpage request;
the compiling module is used for compiling the nginx configuration file and the network protocol to be tested to obtain a nginx service compiling file;
the creating module is used for creating a nginx test case according to the target webpage request, the target response information and the nginx service compilation file;
and the testing module is used for testing the network protocol to be tested according to the nginx testing example to obtain a testing result of the network protocol to be tested.
According to a third aspect of embodiments herein, there is provided a computing device comprising a memory, a processor and computer instructions stored on the memory and executable on the processor, the processor implementing the steps of the nginx-based request test method when executing the computer instructions.
According to a fourth aspect of embodiments herein, there is provided a computer readable storage medium storing computer instructions which, when executed by a processor, implement the steps of the nginx-based request test method.
The application provides a nginx-based request testing method, which is applied to a website protocol testing tool and comprises the following steps: acquiring a target webpage request and target response information corresponding to the target webpage request; compiling the nginx configuration file and the network protocol to be tested to obtain a nginx service compilation file; creating a nginx test case according to the target webpage request, the target response information and the nginx service compilation file; and testing the network protocol to be tested according to the nginx test example to obtain a test result of the network protocol to be tested.
According to the application, the nginx server optimization request testing method is used for providing higher-performance service for webpage request testing, and the nginx service is integrated into the request testing method, so that the optimized nginx-based request testing method is more suitable for use scenes with diversified network protocols, and the use experience of users is improved.
Drawings
FIG. 1 is an architecture diagram of a nginx-based request testing tool according to an embodiment of the present application;
fig. 2 is a flowchart of a nginx-based request testing method according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of a nginx-based request testing tool according to an embodiment of the present application;
fig. 4 is a block diagram of a computing device according to an embodiment of the present application.
Detailed Description
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present application. This application is capable of implementation in many different ways than those herein set forth and of similar import by those skilled in the art without departing from the spirit of this application and is therefore not limited to the specific implementations disclosed below.
The terminology used in the one or more embodiments of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the one or more embodiments of the present application. As used in one or more embodiments of the present application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used in one or more embodiments of the present application refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It will be understood that, although the terms first, second, etc. may be used herein in one or more embodiments of the present application to describe various information, these information should not be limited by these terms. These terms are only used to distinguish one type of information from another. For example, a first aspect may be termed a second aspect, and, similarly, a second aspect may be termed a first aspect, without departing from the scope of one or more embodiments of the present application. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
First, the noun terms to which one or more embodiments of the present application relate are explained.
Record refers to hijacking and saving by a specific technique both HTTP requests initiated by the user using the browser and responses received.
Playback (playback) means that the recorded HTTP request is again initiated through the browser and a corresponding response is returned.
Nginx: the system is a high-performance HTTP and reverse proxy web server and is characterized by small occupied memory and strong concurrency capability.
Mahimahi is a set of user space tools for network simulation and analysis, is a lightweight tool based on MIT design, can record and replay HTTP content, provides a tool for simulating network conditions to perform simulation experiments in different network environments, and can well help developers to evaluate experiments and optimize self-developed services. However, the network protocol used by the WEB side in the Mahimahi project only supports HTTP1.1 and SPDY protocols, with the development of internet technology, more advanced HTTP2 and HTTP3(QUIC) protocols have been widely applied, most websites use HTTP2 to improve service performance nowadays, and in recent years, with the promotion of HTTP3(QUIC) protocol, more and more websites and services also support HTTP3 protocol. Mahimahi has gradually become unsuitable for the present business scenario.
In view of this, in the present application, a nginx-based request test method is provided, and the present application relates to a nginx-based request test tool, a computing device, and a computer-readable storage medium, which are described in detail in the following embodiments one by one.
Fig. 1 shows an architecture diagram of a nginx-based request testing tool according to an embodiment of the present application, as shown in fig. 1, a browser (browser) serves as a Client (Client) to initiate a URL request to a server, and the server processes the request and then returns response information, where the response information may use a plurality of network protocols, such as HTTP1.0, HTTP1.1, HTTP2.0, HTTP3.0, and so on.
After a nginx-based request testing tool is started, a proxy server service is started, a client sends a webpage request, the request generated by a browser is led into the proxy server service, the proxy server service sends the request to a server address, then the proxy server service acquires response information returned by the server, the webpage request and the response information are stored in a corresponding storage directory (disk), and simultaneously, a connected server IP and a domain name are recorded in a DNS file.
When the replay operation is executed, the Nginx-based request testing tool provided by the application can create an offline environment, simulate a plurality of virtual network cards according to the Server IP information stored in the DNS file, start a dnsmasq process for DNS resolution for serving subsequent webpage requests, and simulate a Server in the recording process through one or more Nginx Server processes, when a user starts a webpage request, a browser initiates an access request which is the same as that in recording, and after the access request reaches a Nginx Server through different network protocols, the embedded CGI module is matched with the optimal response,
the nginx service performance is high, the application is wide, a plurality of websites and servers are built by using the nginx service, the nginx project is open, the modularized structural design is convenient to develop, the nginx service is also modularized for supporting a plurality of network protocols, an independent HTTP2 protocol module and other independent network protocol modules are provided, the nginx service is used for optimizing a request testing tool, specifically, the nginx service is used for replacing the original network service, and the nginx configuration file, the nginx process starting, the fastcgi process starting and the like are included.
Because the nginx service supports independent network protocol modules, different network protocol modules can be deployed in the same server, and corresponding configuration files are configured, so that different network protocols are tested in the same hardware environment, more accurate test results are obtained, and technicians can conveniently perform targeted adjustment according to subsequent test results.
In the nginx-based request testing tool provided by the application, a self-signature function is further arranged, the function is used for self-generating a signature certificate and a key for each accessed service and is used for verification through a browser, the self-signature is a self-signature root CA locally created by a user, and the self-signature root CA is used for generating the self-signature certificate and the key for each nginx service.
In addition, the spawncgi service and the fastcgi service need to be installed for starting a fastcgi process and executing a CGI script, and it should be noted that in the nginx-based request test tool provided in the present application, the spawncgi service and the fastcgi service are operated as separate services.
The application provides a request testing tool based on nginx can support multiple network protocol to through the form of configuration network protocol module, make things convenient for the developer to independently test, in the follow-up use, the developer can oneself configure the parameter of different network protocol as required, need not to destroy current test flow, improves efficiency of software testing.
Fig. 2 shows a flowchart of a nginx-based request testing method according to an embodiment of the present application, which specifically includes the following steps:
step 202: and acquiring a target webpage request and target response information corresponding to the target webpage request.
The target webpage request specifically refers to a webpage request which needs to be replayed in a webpage request test, and the target response information corresponding to the target webpage request specifically refers to the recorded response information corresponding to the webpage request.
The target webpage request and the target response information are real webpage requests recorded in advance, and specifically, before the target webpage request and the target response information corresponding to the target webpage request are acquired, the method further includes:
recording a webpage request and response information corresponding to the webpage request;
and storing the webpage request and the response information to a request test database.
In practical application, in a recording stage, a browser receives a link address of a webpage, sends a webpage request to a corresponding server based on the link address of the webpage, acquires the webpage request through a proxy server service, guides the request generated by the browser into the proxy server service, forwards the request to the server by the proxy server service, receives response information returned by the server, correspondingly stores the response information and the webpage request into a test database, and the test database is used for providing data support for subsequent webpage request playback.
Correspondingly, the acquiring of the target webpage request and the target response information corresponding to the target webpage request includes:
determining a target web page request from the test database;
and acquiring the target webpage request and target response information corresponding to the target webpage request.
In the webpage request replay process, a target webpage request for replay is determined from the test database, and target response information corresponding to the target webpage request is obtained.
Step 204: and compiling the nginx configuration file and the network protocol to be tested to obtain a nginx service compilation file.
The nginx configuration file is a configuration parameter file required by running the nginx service, the apache service is used in the mahimahi tool, the nginx service is used for replacing the apache service in the request testing tool based on the nginx provided by the application, correspondingly, the apache configuration parameter file in the original code needs to be replaced by the nginx configuration parameter file, and the configuration of the nginx configuration file, the startup of the nginx process, the startup of the fastcgi process and the like can be specifically included.
Further, the nginx configuration file of the present application is generated by a technician configuration, and correspondingly, the method further includes:
receiving a nginx configuration instruction, wherein the nginx configuration instruction carries a nginx configuration parameter;
and generating a nginx configuration file based on the nginx configuration parameters.
The nginx configuration instruction specifically refers to an instruction input by a technician to configure the nginx service, including but not limited to nginx implementation code, configuration parameters, and the like.
The network protocol to be tested specifically refers to a network protocol to be tested, the network protocol to be tested needs to be a network protocol supported by a nginx-based request testing tool, and the network protocol to be tested in the nginx-based request testing tool provided by the application includes at least one of HTTP1.1, HTTP2 and HTTP3(QUIC) protocols.
In the application, the network protocols to be tested are stored in the form of independent modules, namely, a plurality of nginx network protocol modules are compiled in a nginx-based request testing tool provided by the application, and corresponding configuration files are deployed, so that each nginx network protocol module corresponds to one network protocol to be tested, when a certain network protocol needs to be tested, the corresponding nginx network protocol module is directly selected, a plurality of network protocol modules can share the same proxy server, and the proxy server does not need to be configured for each protocol independently. Meanwhile, the extension of subsequent network protocols is facilitated, and when a new network protocol comes out, the new network protocol can be added into the nginx-based request testing tool in a mode of adding an independent module.
Project codes of the nginx service are open sources, and the modular structural design of the nginx service also provides convenience for development and configuration.
When a webpage request is replayed, a nginx configuration file and a module of a network protocol to be tested need to be compiled in advance, and then configuration information for starting a nginx service is input into a request testing tool based on the nginx so as to obtain a nginx service compiling file.
Step 206: and creating a nginx test case according to the target webpage request, the target response information and the nginx service compilation file.
The nginx test case specifically refers to a test case for testing the network protocol to be tested according to the target webpage request and the target response information.
Specifically, after the web page request is sent to the server, a plurality of services are corresponding to the server, each service corresponds to one IP or domain name, a nginx test case can be created for each IP or domain name, and each IP or domain name can also share one nginx test case by modifying a nginx configuration file.
Since the nginx service requires an additional cgi service to coordinate matching of HTTP requests and responses, an additional fastcgi service to coordinate the nginx test case needs to be launched in the nginx-based request test tool.
The cgi (Common Gateway Interface) is a specification of an external program when the web server runs, the function of the server can be extended according to the program written by the cgi, the cgi application program can interact with a browser, and can also communicate with an external data source such as a database server and the like through a data API to acquire data from the external data source.
In addition, in order to meet the requirement of browser security, the method further comprises the following steps:
an instance certificate and an instance key are created for the nginx test instance.
Specifically, the user needs to create a root CA locally, create an instance certificate and an instance key for each service in the replay phase, and add the root CA to the browser, so that the browser trusts the instance certificate provided by the nginx test instance when the ssl handshake.
There are some browsers that do not support self-signed certificates when using the QUIC protocol, and it is necessary to manually set the domain names that will use the QUIC protocol to the white list and to specify the protocol version numbers that they will use when starting the browser by means of the command line parameters, such as forcing the QUIC protocol away from the request for domain a and domain B in the nginx test case by means of the command line parameters, and using the Q050 version protocol, taking the HTTP2 protocol away from the other requests for both domain names, then the request to access domain a and domain B follows the QUIC protocol when the browser performs interactive tests on the nginx test case, the other domain names following the HTTP2 protocol.
Step 208: and testing the network protocol to be tested according to the nginx test example to obtain a test result of the network protocol to be tested.
After the nginx test case is created, the nginx test case is operated to test the network protocol to be tested, and simultaneously, the test result of the network protocol to be tested is obtained, wherein the test result includes but is not limited to the response time, the IP address, the port number, the protocol type, the flow information and the like corresponding to each network protocol to be tested.
After the testing is completed, the method further comprises:
generating a test report of the network protocol to be tested according to the test result;
and feeding back the test report.
In practical application, after the test result is generated, the test result needs to be analyzed, so that a test report is generated, the test report is fed back to relevant technicians, and the technicians can perform targeted optimization processing on the service according to the test report.
According to the request testing method based on nginx, a target webpage request and target response information corresponding to the target webpage request are obtained; compiling the nginx configuration file and the network protocol to be tested to obtain a nginx service compilation file; creating a nginx test case according to the target webpage request, the target response information and the nginx service compilation file; and testing the network protocol to be tested according to the nginx test example to obtain a test result of the network protocol to be tested. By the method, the nginx service is applied to the request testing tool, the request testing method is optimized through the high-efficiency performance of the nginx service, the modular structural design and the abundant network protocols, the change of the original technology is reduced, meanwhile, the diversity of the network protocols is enriched, the nginx-based request testing method is better suitable for the current use scene, and the use experience of technicians is improved.
Corresponding to the above method embodiment, the present application further provides an nginx-based request test tool embodiment, and fig. 3 shows a schematic structural diagram of a nginx-based request test tool provided in an embodiment of the present application. As shown in fig. 3, the tool comprises:
an obtaining module 302, configured to obtain a target web page request and target response information corresponding to the target web page request;
the compiling module 304 is used for compiling the nginx configuration file and the network protocol to be tested to obtain a nginx service compiling file;
a creating module 306, configured to create a nginx test case according to the target web page request, the target response information, and the nginx service compilation file;
the testing module 308 is configured to test the network protocol to be tested according to the nginx test case, and obtain a test result of the network protocol to be tested.
Optionally, the tool further comprises:
the certificate module is used for creating an example certificate and an example key for the nginx test example;
the nginx configuration module is used for receiving the nginx configuration instruction and generating a nginx configuration file;
the network protocol configuration module is used for configuring a command by a network protocol and generating a network protocol to be tested;
the system comprises a Spawncgi module, a fastcgi module and a CGI module, wherein the Spawncgi module is used for starting a fastcgi process, and the fastcgi process is used for executing a CGI script;
and the feedback module is used for feeding back the test report of the network protocol to be tested according to the test result.
Optionally, the network protocol to be tested includes at least one of HTTP1.1, HTTP2, and HTTP3 protocols.
Optionally, the tool further comprises:
the recording module is used for recording a webpage request and response information corresponding to the webpage request;
and the storage module is used for storing the webpage request and the response information corresponding to the webpage request.
The application provides a based on nginx's request testing tool, with nginx service application to request testing tool in, through nginx service's high efficiency performance, modular structural design, abundant network protocol optimize the request testing method, when reducing the change to former technique, richened network protocol's variety for based on nginx's request testing method is better be applicable to present use scenario, has promoted technical staff's use experience.
The above is an illustrative scheme of the nginx-based request testing tool of the present embodiment. It should be noted that the technical solution of the nginx-based request test tool and the above-mentioned technical solution of the nginx-based request test method belong to the same concept, and details of the technical solution of the nginx-based request test tool, which are not described in detail, can be referred to the above-mentioned description of the technical solution of the nginx-based request test method.
Fig. 4 shows a block diagram of a computing device 400 provided according to an embodiment of the present application. The components of the computing device 400 include, but are not limited to, a memory 410 and a processor 420. Processor 420 is coupled to memory 410 via bus 430 and database 450 is used to store data.
Computing device 400 also includes access device 440, access device 440 enabling computing device 400 to communicate via one or more networks 460. Examples of such networks include the Public Switched Telephone Network (PSTN), a Local Area Network (LAN), a Wide Area Network (WAN), a Personal Area Network (PAN), or a combination of communication networks such as the internet. The access device 440 may include one or more of any type of network interface (e.g., a Network Interface Card (NIC)) whether wired or wireless, such as an IEEE802.11 Wireless Local Area Network (WLAN) wireless interface, a worldwide interoperability for microwave access (Wi-MAX) interface, an ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a bluetooth interface, a Near Field Communication (NFC) interface, and so forth.
In one embodiment of the application, the above-described components of computing device 400 and other components not shown in FIG. 4 may also be connected to each other, such as by a bus. It should be understood that the block diagram of the computing device architecture shown in FIG. 4 is for purposes of example only and is not limiting as to the scope of the present application. Those skilled in the art may add or replace other components as desired.
Computing device 400 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., tablet computer, personal digital assistant, laptop computer, notebook computer, netbook, etc.), mobile phone (e.g., smartphone), wearable computing device (e.g., smartwatch, smart glasses, etc.), or other type of mobile device, or a stationary computing device such as a desktop computer or PC. Computing device 400 may also be a mobile or stationary server.
Wherein processor 420, when executing said computer instructions, performs the steps of said nginx-based request test method.
The above is an illustrative scheme of a computing device of the present embodiment. It should be noted that the technical solution of the computing device and the technical solution of the request testing method based on nginx belong to the same concept, and details of the technical solution of the computing device, which are not described in detail, can be referred to the description of the technical solution of the request testing method based on nginx.
An embodiment of the present application further provides a computer readable storage medium storing computer instructions, which when executed by a processor, implement the steps of the nginx-based request test method as described above.
The above is an illustrative scheme of a computer-readable storage medium of the embodiment. It should be noted that the technical solution of the storage medium belongs to the same concept as the technical solution of the request test method based on nginx, and for details that are not described in detail in the technical solution of the storage medium, reference may be made to the description of the technical solution of the request test method based on nginx.
The foregoing description of specific embodiments of the present application has been presented. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
The computer instructions comprise computer program code which may be in the form of source code, object code, an executable file or some intermediate form, or the like. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
It should be noted that for simplicity and convenience of description, the above-described method embodiments are described as a series of combinations of acts, but those skilled in the art will appreciate that the present application is not limited by the order of acts, as some steps may, in accordance with the present application, occur in other orders and/or concurrently. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
The preferred embodiments of the present application disclosed above are intended only to aid in the explanation of the application. Alternative embodiments are not exhaustive and do not limit the invention to the precise embodiments described. Obviously, many modifications and variations are possible in light of the above teaching. The embodiments were chosen and described in order to best explain the principles of the application and its practical applications, to thereby enable others skilled in the art to best understand and utilize the application. The application is limited only by the claims and their full scope and equivalents.

Claims (13)

1. A nginx-based request testing method is characterized by comprising the following steps:
acquiring a target webpage request and target response information corresponding to the target webpage request;
compiling the nginx configuration file and the network protocol to be tested to obtain a nginx service compilation file;
creating a nginx test case according to the target webpage request, the target response information and the nginx service compilation file;
and testing the network protocol to be tested according to the nginx test example to obtain a test result of the network protocol to be tested.
2. The nginx-based request testing method of claim 1, wherein the method further comprises:
an instance certificate and an instance key are created for the nginx test instance.
3. The nginx-based request testing method of claim 1, wherein the method further comprises:
receiving a nginx configuration instruction, wherein the nginx configuration instruction carries a nginx configuration parameter;
and generating the nginx configuration file based on the nginx configuration parameters.
4. The nginx-based request testing method of claim 1, wherein the method further comprises:
recording a webpage request and response information corresponding to the webpage request;
and storing the webpage request and the response information to a request test database.
5. The nginx-based request testing method of claim 4, wherein obtaining a target web page request and target response information corresponding to the target web page request comprises:
determining a target web page request from the test database;
and acquiring the target webpage request and target response information corresponding to the target webpage request.
6. The nginx-based request testing method of claim 1, wherein the method further comprises:
generating a test report of the network protocol to be tested according to the test result;
and feeding back the test report.
7. The nginx-based request testing method of claim 1, wherein the network protocols to be tested comprise at least one of HTTP1.1, HTTP2, HTTP3 protocols.
8. A nginx-based request testing tool, comprising:
the acquisition module is used for acquiring a target webpage request and target response information corresponding to the target webpage request;
the compiling module is used for compiling the nginx configuration file and the network protocol to be tested to obtain a nginx service compiling file;
the creating module is used for creating a nginx test case according to the target webpage request, the target response information and the nginx service compilation file;
and the testing module is used for testing the network protocol to be tested according to the nginx testing example to obtain a testing result of the network protocol to be tested.
9. The nginx-based request testing tool of claim 8, further comprising:
the certificate module is used for creating an instance certificate and an instance key for the nginx test instance;
the nginx configuration module is used for receiving the nginx configuration instruction and generating a nginx configuration file;
the network protocol configuration module is used for configuring a command by a network protocol and generating a network protocol to be tested;
the system comprises a Spawncgi module, a fastcgi module and a CGI module, wherein the Spawncgi module is used for starting a fastcgi process, and the fastcgi process is used for executing a CGI script;
and the feedback module is used for feeding back the test report of the network protocol to be tested according to the test result.
10. The nginx-based request testing tool of claim 8, wherein the network protocols to be tested comprise at least one of HTTP1.1, HTTP2, HTTP3 protocols.
11. The nginx-based request testing tool of claim 8, further comprising:
the recording module is used for recording a webpage request and response information corresponding to the webpage request;
and the storage module is used for storing the webpage request and the response information corresponding to the webpage request.
12. A computing device comprising a memory, a processor, and computer instructions stored on the memory and executable on the processor, wherein the steps of the method of any of claims 1-7 are implemented when the computer instructions are executed by the processor.
13. A computer-readable storage medium storing computer instructions, which when executed by a processor, perform the steps of the method of any one of claims 1 to 7.
CN202210108725.7A 2022-01-28 2022-01-28 Nginx-based request testing method and tool Pending CN114448847A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210108725.7A CN114448847A (en) 2022-01-28 2022-01-28 Nginx-based request testing method and tool

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210108725.7A CN114448847A (en) 2022-01-28 2022-01-28 Nginx-based request testing method and tool

Publications (1)

Publication Number Publication Date
CN114448847A true CN114448847A (en) 2022-05-06

Family

ID=81371680

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210108725.7A Pending CN114448847A (en) 2022-01-28 2022-01-28 Nginx-based request testing method and tool

Country Status (1)

Country Link
CN (1) CN114448847A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190097893A1 (en) * 2017-09-28 2019-03-28 Airmagnet, Inc. System and method for distributed testing of end-to-end performance of a server
CN112311774A (en) * 2020-10-16 2021-02-02 北京金山云网络技术有限公司 Data processing method and device, electronic equipment and storage medium
CN112860569A (en) * 2021-02-23 2021-05-28 腾讯科技(深圳)有限公司 Automatic testing method and device, electronic equipment and storage medium
US11196712B1 (en) * 2020-12-29 2021-12-07 Teso LT, UAB Proxy scraper detector

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190097893A1 (en) * 2017-09-28 2019-03-28 Airmagnet, Inc. System and method for distributed testing of end-to-end performance of a server
CN112311774A (en) * 2020-10-16 2021-02-02 北京金山云网络技术有限公司 Data processing method and device, electronic equipment and storage medium
US11196712B1 (en) * 2020-12-29 2021-12-07 Teso LT, UAB Proxy scraper detector
CN112860569A (en) * 2021-02-23 2021-05-28 腾讯科技(深圳)有限公司 Automatic testing method and device, electronic equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
黄聪颖;滕建;: "利用反向代理服务器对基于Web的选课系统的性能优化", 微型电脑应用, no. 10 *

Similar Documents

Publication Publication Date Title
US11979452B1 (en) Demo recording utility
CN106874389B (en) Data migration method and device
US20030182408A1 (en) Load test system for a server and method of use
US9652364B1 (en) Cloud service for mobile testing and debugging
JP7483929B2 (en) Method and apparatus for evaluating jointly trained models - Patents.com
CN105068876B (en) Method based on distributed deployment prototype collection cell phone application performance data
US20170286269A1 (en) Local Chat Service Simulator for Bot Development
CN110413594A (en) A kind of more example method for testing pressure of Redis and device
CN113448988A (en) Method and device for training algorithm model, electronic equipment and storage medium
WO2020245504A1 (en) Method and system for integration testing
CN112347401A (en) House same-screen watching method, system, device and computer readable storage medium
KR20200048633A (en) System and method for automatically testing software
CN105094787B (en) Method and device for processing enterprise internet application
CN113434384B (en) Pressure testing method and device
CN114448847A (en) Nginx-based request testing method and tool
CN115473810B (en) Double-end synchronous script hot updating method and device
CN111953718B (en) Page debugging method and device
CN114915565B (en) Network debugging method and system
CN111240855A (en) API debugging system, method, storage medium and computer device
JPWO2013171858A1 (en) Synchronization program and synchronization method
CN114285779B (en) Processing method, device and system of test request
CN109587282B (en) Method and system for SR (scheduling request) oriented automatic node IP (Internet protocol) configuration of complete equipment cabinet
CN112995699B (en) Online live broadcast method, live broadcast equipment, live broadcast system and electronic equipment
CN111782291B (en) Method and device for starting test page
JP5148670B2 (en) Setting method and system for setting appliances by unique address

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20220506