[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN112052163A - High-concurrency webpage pressure testing method and device, electronic equipment and storage medium - Google Patents

High-concurrency webpage pressure testing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN112052163A
CN112052163A CN202010836779.6A CN202010836779A CN112052163A CN 112052163 A CN112052163 A CN 112052163A CN 202010836779 A CN202010836779 A CN 202010836779A CN 112052163 A CN112052163 A CN 112052163A
Authority
CN
China
Prior art keywords
webpage
tested
thread
threads
web page
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.)
Granted
Application number
CN202010836779.6A
Other languages
Chinese (zh)
Other versions
CN112052163B (en
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.)
Beijing Topsec Technology Co Ltd
Beijing Topsec Network Security Technology Co Ltd
Beijing Topsec Software Co Ltd
Original Assignee
Beijing Topsec Technology Co Ltd
Beijing Topsec Network Security Technology Co Ltd
Beijing Topsec Software 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 Beijing Topsec Technology Co Ltd, Beijing Topsec Network Security Technology Co Ltd, Beijing Topsec Software Co Ltd filed Critical Beijing Topsec Technology Co Ltd
Priority to CN202010836779.6A priority Critical patent/CN112052163B/en
Publication of CN112052163A publication Critical patent/CN112052163A/en
Application granted granted Critical
Publication of CN112052163B publication Critical patent/CN112052163B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The disclosure relates to a high-concurrency webpage pressure testing method, a high-concurrency webpage pressure testing device, electronic equipment and a storage medium, wherein the method comprises the following steps: utilizing a plurality of threads in the thread pool to access the webpage to be tested simultaneously; acquiring a response result of each thread accessing the webpage to be tested; and determining a pressure test result of the webpage to be tested based on the response result of each thread accessing the webpage to be tested. The technical scheme of the embodiment of the disclosure uses the thread pool technology, ensures that the concurrent resource utilization is controlled to be minimum, and the threads in the thread pool can wait each other, and ensures that concurrent operation can be started at the same time. In addition, at any moment, the number of threads which can be used for carrying out webpage concurrent testing in the thread pool is large, the condition that a large number of testers visit the webpage at the same time can be fully simulated, and the reliability of the testing result of the webpage concurrent testing can be improved.

Description

High-concurrency webpage pressure testing method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of web page testing technologies, and in particular, to a method and an apparatus for testing a high-concurrency web page pressure, an electronic device, and a storage medium.
Background
With the continuous development of internet technology, browsing web pages is an important way for people to obtain information. There are also a myriad of software products based on the B/S architecture.
At present, most of automatic webpage testing frameworks (such as Selenium, Watin, etc.) focus on testing page elements, and cannot realize high-concurrency webpage pressure testing. Therefore, when testing the web page stress, a method that multiple testers access the web page to be tested at the same time is generally adopted. However, in practice, the number of testers is usually limited, and the condition that a large number of testers access the web page at the same time cannot be met, so that the reliability of the test result of the web page concurrent test is poor, and even the test result of the web page concurrent test cannot reflect the real actual situation.
Disclosure of Invention
In order to solve the technical problems or at least partially solve the technical problems, the present disclosure provides a high concurrent web page stress testing method, apparatus, electronic device and storage medium.
In a first aspect, the present disclosure provides a method for testing a high-concurrency web page pressure, including:
utilizing a plurality of threads in the thread pool to access the webpage to be tested simultaneously;
acquiring a response result of each thread accessing the webpage to be tested;
and determining a pressure test result of the webpage to be tested based on the response result of each thread accessing the webpage to be tested.
Further, the accessing the webpage to be tested by using a plurality of threads in the thread pool concurrently includes:
acquiring a test access request;
determining a part of threads in the thread pool as test threads based on the test access request;
and after the test threads in the thread pool are completely prepared, simultaneously accessing the webpage to be tested by each test thread.
Further, the response result includes a single response time;
determining a pressure test result of the webpage to be tested based on a response result of each thread accessing the webpage to be tested, including:
determining a comprehensive response result based on the response result of each thread accessing the webpage to be tested, wherein the comprehensive response result comprises at least one of the longest response time, the shortest response time and the average response time;
and determining a pressure test result of the webpage to be tested based on the comprehensive response result.
Further, the accessing the webpage to be tested by using a plurality of threads in the thread pool concurrently includes:
and if the webpage to be tested can arrive, utilizing a plurality of threads in the thread pool to access the webpage to be tested simultaneously.
Further, before the step of using a plurality of threads in the thread pool to access the web page to be tested concurrently if the web page to be tested can arrive, the method further includes:
receiving the URL of the webpage to be tested by using an HttpWebRequest interface of a net frame;
and judging whether the webpage to be tested can be reached or not based on the URL of the webpage to be tested.
Further, after obtaining the response result of each thread accessing the webpage to be tested, the method includes:
judging whether to quit the test;
if the test is not quitted, the memory resources corresponding to the thread pool are not recycled, the step of utilizing a plurality of threads in the thread pool to access the webpage to be tested simultaneously and the step of obtaining the response result of each thread accessing the webpage to be tested are repeatedly executed.
Further, after determining the stress test result of the web page to be tested based on the response result of each thread accessing the web page to be tested, the method further includes:
and displaying the response result of each thread accessing the webpage to be tested and/or the pressure test result of the webpage to be tested.
In a second aspect, the present disclosure further provides a device for testing high concurrent web page pressure, including:
the access module is used for utilizing a plurality of threads in the thread pool to access the webpage to be tested simultaneously;
the response result acquisition module is used for acquiring the response result of each thread accessing the webpage to be tested;
and the test result determining module is used for determining the pressure test result of the webpage to be tested based on the response result of each thread accessing the webpage to be tested.
In a third aspect, the present disclosure also provides an electronic device, including: a processor and a memory;
the processor is configured to perform the steps of any of the methods described above by calling a program or instructions stored in the memory.
In a fourth aspect, the present disclosure also provides a computer-readable storage medium storing a program or instructions for causing a computer to perform the steps of any of the methods described above.
Compared with the prior art, the technical scheme provided by the embodiment of the disclosure has the following advantages:
the technical scheme of the embodiment of the disclosure uses the thread pool technology, ensures that the concurrent resource utilization is controlled to be minimum, and the threads in the thread pool can wait each other, and ensures that concurrent operation can be started at the same time. In addition, at any moment, the number of threads which can be used for carrying out webpage concurrent testing in the thread pool is large, the condition that a large number of testers visit the webpage at the same time can be fully simulated, and the reliability of the testing result of the webpage concurrent testing can be improved.
The native web interface provided by the net framework enables no redundant function to consume hardware performance during concurrent operation.
According to the technical scheme, the visual interface is provided for the testers to observe the test results, and the user experience can be improved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
In order to more clearly illustrate the embodiments or technical solutions in the prior art of the present disclosure, the drawings used in the description of the embodiments or prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without inventive exercise.
Fig. 1 is a flowchart of a method for testing a high-concurrency web page pressure according to an embodiment of the present disclosure;
FIG. 2 is a flowchart of another method for testing the stress of a highly concurrent web page according to an embodiment of the present disclosure;
FIG. 3 is a block diagram of an apparatus for implementing the high concurrent web page stress test method of FIG. 2;
fig. 4 is a block diagram of a structure of a high-concurrency web page stress testing apparatus according to an embodiment of the present disclosure;
fig. 5 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present disclosure.
Detailed Description
In order that the above objects, features and advantages of the present disclosure may be more clearly understood, aspects of the present disclosure will be further described below. It should be noted that the embodiments and features of the embodiments of the present disclosure may be combined with each other without conflict.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present disclosure, but the present disclosure may be practiced in other ways than those described herein; it is to be understood that the embodiments disclosed in the specification are only a few embodiments of the present disclosure, and not all embodiments.
Fig. 1 is a flowchart of a method for testing a high-concurrency web page stress according to an embodiment of the present disclosure. The execution subject of the high concurrent web page stress test method can be a user terminal or a server and the like. The high-concurrency webpage pressure testing method comprises the following steps:
and S110, utilizing a plurality of threads in the thread pool to access the webpage to be tested simultaneously.
A thread pool may be understood as a pattern of thread usage. Creating/destroying threads is accompanied by system overhead, and creating/destroying threads too frequently can greatly affect processing efficiency, and further affect cache locality and overall performance. The thread pool maintains a plurality of threads, and waits for a supervisory administrator to assign tasks that can be executed concurrently. This avoids the cost of creating and destroying threads while processing short-time tasks. The thread pool not only can ensure the full utilization of the kernel, but also can prevent over-scheduling.
There are various implementation methods of this step, and for example, the implementation method of this step may include: acquiring a test access request; determining part of threads in the thread pool as test threads based on the test access request; after all the testing threads in the thread pool are prepared, all the testing threads access the webpage to be tested at the same time.
The test access request should include necessary information for accessing the web page to be tested, for example, the test access request includes a URL (Uniform Resource Locator) of the web page to be tested; or the test access request comprises a URL (uniform resource locator) of the webpage to be tested and a request header; alternatively, the test access request includes the URL of the web page to be tested, the request header, and the cookie.
And S120, acquiring a response result of each thread accessing the webpage to be tested.
The response result may be various, for example, a single response time of the web page for each thread is tested.
S130, determining a pressure test result of the webpage to be tested based on the response result of each thread accessing the webpage to be tested.
There are various specific implementation methods of this step, for example, if the response result includes a single response time; the specific implementation method of the step can comprise the following steps: determining a comprehensive response result based on the response result of each thread accessing the webpage to be tested, wherein the comprehensive response result comprises at least one of the longest response time, the shortest response time and the average response time; and determining a pressure test result of the webpage to be tested based on the comprehensive response result.
The benefit of a thread pool over a thread that is continually created is that the thread pool saves system resources consumed by creating the thread. In practice, the upper limit of threads in the thread pool may be specified as desired. Illustratively, the thread pool upper limit may be set to 32767. It should be noted that, theoretically, the more CPU cores/threads, the larger the upper limit of the thread pool that can be set by the thread pool. For an unused thread, the thread pool simply suspends it and does not destroy it for subsequent use. The thread pool is suitable for concurrent operation with simple logic and short operation time. The logic for accessing the test web page is not complex, and the single execution time is very short, so that the method is suitable for using the thread pool technology.
The essence of the technical scheme is that the method is beneficial to simulating a high concurrency scene that a plurality of people visit the webpage to be tested at the same time by the thread pool to realize the high concurrency webpage pressure test, and the thread upper limit in the thread pool is large in practice, so that the method can fully simulate the condition that a plurality of users visit the tested webpage at the same time, and can ensure that the obtained high concurrency webpage pressure test result is reliable. Additionally, with the thread pool, system resources consumed by creation/destruction of threads may be reduced.
It should be noted that, in the case of not considering other scheduling time consumption, one execution of N threads is theoretically N times faster than the execution of a single-threaded loop, that is, the efficiency improvement degree depends on the number of threads. However, in practical situations, the time consumption of the thread pool call is considered, and the use of the threads in the threads may be reduced when the load of the CPU carrying N threads is large.
Optionally, on the basis of the above technical solutions, S110 may be replaced with: and if the webpage to be tested can arrive, utilizing a plurality of threads in the thread pool to access the webpage to be tested simultaneously. The essence of the setting is that before the concurrent web page pressure test is carried out on the web page to be tested, whether the web page to be tested can be normally accessed is judged. The normal access may be understood as that when the webpage to be tested is accessed, the flow size of the webpage to be tested is appropriate, or the webpage to be tested returns a preset code. Since if the web page to be tested is not reachable, it is meaningless to conduct concurrent web page stress testing on the web page. The setting can ensure that the concurrent access pressure test is carried out only under the condition that the webpage to be tested can be normally accessed, and can avoid unnecessary test from consuming system resources.
On the basis of the above technical solution, optionally, before the multiple threads in the thread pool are used to access the web page to be tested concurrently if the web page to be tested can arrive, the method further includes: receiving the URL of the webpage to be tested by using an HttpWebRequest interface of a net frame; and judging whether the webpage to be tested can be reached or not based on the URL of the webpage to be tested. Because the web page request uses a self-contained Windows system, the net library interface HttpWebRequest is a simple web page access method package, no redundant function exists, and the consumption of system resources during testing is reduced.
On the basis of the foregoing technical solutions, optionally, after S120, the method includes: judging whether to quit the test; if the test is not exited, the memory resources corresponding to the thread pool are not recycled, and step S110 and step S120 are repeatedly executed. The purpose of this is to enter the loop test mode without exiting the test. The significance of the setting is to simulate the thinking condition of a user and test the long-time pressure resistance of the webpage to be tested. Alternatively, the time interval of two adjacent tests may be set. Alternatively, in practice, the execution of the thread pool may be controlled by the host process to suspend while adding resources to the thread pool. After one execution, it can be selected whether to continue execution. And if the execution is continued, the system memory resources are not released, the prepared test threads are suspended, a waiting state is entered, and when all the test threads are prepared, concurrent access is performed again to ensure the execution simultaneity. And if the execution is not continued, releasing the system memory resources. In addition, in the above scheme, if the execution is continued, the system memory resource is not released, so that the time spent by the thread for preempting the memory resource can be reduced.
In practice, when performing the loop test, the number of test threads used in each test may be the same or different. In practice, the determination may be made according to the operation condition of the current device under concurrent test.
On the basis of the above technical solutions, optionally, after S130, the method further includes: and displaying the response result of each thread accessing the webpage to be tested and/or the pressure test result of the webpage to be tested. The pressure testing device is arranged in such a way that a user can intuitively know the pressure testing result, so that follow-up operation is facilitated, and the user experience is improved.
Fig. 2 is a flowchart of another method for testing a high-concurrency web page stress according to an embodiment of the present disclosure. Fig. 2 is a specific example of fig. 1. Fig. 3 is a block diagram of an apparatus for implementing the high concurrent web page stress test method in fig. 2. Referring to fig. 2 and 3, the high concurrent web page stress test method includes:
firstly, the pre-access testing module receives a URL (uniform resource locator) and a request header of a webpage to be tested by using an http Webrequest interface, accesses the webpage to be tested by bypassing a certificate, and checks the accessibility of the webpage to be tested and whether data (such as a preset code) is correctly returned. And (4) reserving parameter data (such as necessary information for accessing the webpage to be tested, such as URL (uniform resource locator) of the webpage to be tested), and transmitting the parameter data to the pressure testing module after the parameter data passes verification.
Secondly, the pressure test module receives parameter data (such as necessary information for accessing the webpage to be tested, such as URL of the webpage to be tested) transmitted by the pre-access test module, the parameter data is delivered to the high concurrency execution module for concurrent access, and whether the cyclic execution module is called or not is determined by knowing whether the cyclic access is available or not.
Again, the high concurrency execution module uses the ThreadPool interface, generates a large number of access requests to join the thread pool, and uses a delegation method specific to the net framework to have all threads wait for events ready for completion. After all the effective threads in the thread pool are prepared, the requests are sent out simultaneously, and the effect of instantly accessing a large number of webpages is achieved.
And thirdly, if the circular execution module is started, the resources which are accessed concurrently last time cannot be released, and the requests continue to be regenerated in each thread pool. The entrusting method adds a delay event on the original basis and simulates the transient thinking action of the client.
Finally, the recording module records response results, such as single response time, longest and shortest response time and average response time information, when each thread sends a request. And the information is displayed in a Winform visual window, so that the test personnel can conveniently observe and record.
The technical scheme has the following advantages:
the technical scheme uses the thread pool technology, ensures that the utilization of concurrent resources is controlled to be minimum, and ensures that concurrent operations can be started at the same time because threads in the thread pool can wait for each other. In addition, at any moment, the number of threads which can be used for carrying out webpage concurrent testing in the thread pool is large, the condition that a large number of testers visit the webpage at the same time can be fully simulated, and the reliability of the testing result of the webpage concurrent testing can be improved.
The native web interface provided by the net framework enables no redundant function to consume hardware performance during concurrent operation.
According to the technical scheme, the visual interface is provided for the testers to observe the test results, and the user experience can be improved.
The embodiment of the disclosure also provides a high-concurrency webpage pressure testing device. Fig. 4 is a block diagram of a structure of a high-concurrency web page stress testing apparatus according to an embodiment of the present disclosure. Referring to fig. 4, the high concurrent web page stress testing apparatus includes:
the access module 310 is configured to access a webpage to be tested concurrently by using a plurality of threads in the thread pool;
a response result obtaining module 320, configured to obtain a response result of each thread accessing the webpage to be tested;
the test result determining module 330 is configured to determine a pressure test result of the webpage to be tested based on a response result of each thread accessing the webpage to be tested.
Further, the access module 310 is specifically configured to:
acquiring a test access request;
determining a part of threads in the thread pool as test threads based on the test access request;
and after the test threads in the thread pool are completely prepared, simultaneously accessing the webpage to be tested by each test thread.
Further, the response result includes a single response time;
a test result determination module 330 configured to:
determining a comprehensive response result based on the response result of each thread accessing the webpage to be tested, wherein the comprehensive response result comprises at least one of the longest response time, the shortest response time and the average response time;
and determining a pressure test result of the webpage to be tested based on the comprehensive response result.
Further, the access module 310 is specifically configured to:
and if the webpage to be tested can arrive, utilizing a plurality of threads in the thread pool to access the webpage to be tested simultaneously.
Further, the high concurrent web page pressure testing device also comprises a pre-access module, which is used for receiving the URL of the web page to be tested by utilizing an http webrequest interface of a net frame before utilizing a plurality of threads in a thread pool to access the web page to be tested concurrently if the web page to be tested can arrive;
and judging whether the webpage to be tested can be reached or not based on the URL of the webpage to be tested.
Further, the high-concurrency webpage pressure testing device also comprises a circulating module, wherein the circulating module is used for judging whether to quit the test or not after the response result of each thread for accessing the webpage to be tested is obtained; if the test is not quitted, the memory resources corresponding to the thread pool are not recycled, the step of utilizing a plurality of threads in the thread pool to access the webpage to be tested simultaneously and the step of obtaining the response result of each thread accessing the webpage to be tested are repeatedly executed.
Further, the high-concurrency webpage pressure testing device further comprises a display module, which is used for displaying the response result of each thread accessing the webpage to be tested and/or the pressure testing result of the webpage to be tested after the pressure testing result of the webpage to be tested is determined based on the response result of each thread accessing the webpage to be tested.
The device disclosed in the above embodiments can implement the processes of the methods disclosed in the above method embodiments, and has the same or corresponding beneficial effects. To avoid repetition, further description is omitted here.
Fig. 5 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present disclosure, as shown in fig. 5, the electronic device may be a user terminal or a server, and the electronic device includes:
one or more processors 301, one processor 301 being illustrated in FIG. 5;
a memory 302;
the electronic device may further include: an input device 303 and an output device 304.
The processor 301, the memory 302, the input device 303 and the output device 304 in the electronic apparatus may be connected by a bus or other means, and fig. 5 illustrates the connection by the bus as an example.
The memory 302, which is a non-transitory computer-readable storage medium, may be used to store software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to the high concurrent web page stress test method in the embodiments of the present disclosure (e.g., the access module 310, the response result obtaining module 320, and the test result determining module 330, shown in fig. 4). The processor 301 executes various functional applications of the server and data processing by running software programs, instructions and modules stored in the memory 302, namely, implements the high concurrent web page stress test method of the above method embodiment.
The memory 302 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to use of the electronic device, and the like. Further, the memory 302 may include high speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, memory 302 optionally includes memory located remotely from processor 301, which may be connected to a terminal device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 303 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the electronic apparatus. The output means 304 may comprise a display device such as a display screen.
Embodiments of the present disclosure also provide a computer-readable storage medium containing a program or instructions for causing a computer to execute a method for high concurrent web page stress testing, the method comprising:
utilizing a plurality of threads in the thread pool to access the webpage to be tested simultaneously;
acquiring a response result of each thread accessing the webpage to be tested;
and determining a pressure test result of the webpage to be tested based on the response result of each thread accessing the webpage to be tested.
Optionally, the computer executable instructions, when executed by the computer processor, may be further configured to perform the technical solution of the high concurrent web page stress testing method provided by any embodiment of the present disclosure.
From the above description of the embodiments, it is obvious for a person skilled in the art that the present disclosure can be implemented by software and necessary general hardware, and certainly can be implemented by hardware, but in many cases, the former is a better embodiment. Based on such understanding, the technical solutions of the present disclosure may be embodied in the form of a software product, which may be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute the methods according to the embodiments of the present disclosure.
It is noted that, in this document, relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The foregoing are merely exemplary embodiments of the present disclosure, which enable those skilled in the art to understand or practice the present disclosure. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the disclosure. Thus, the present disclosure is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A high-concurrency webpage pressure testing method is characterized by comprising the following steps:
utilizing a plurality of threads in the thread pool to access the webpage to be tested simultaneously;
acquiring a response result of each thread accessing the webpage to be tested;
and determining a pressure test result of the webpage to be tested based on the response result of each thread accessing the webpage to be tested.
2. The method for testing high concurrent web page stress according to claim 1, wherein the accessing the web page to be tested concurrently by using a plurality of threads in the thread pool comprises:
acquiring a test access request;
determining a part of threads in the thread pool as test threads based on the test access request;
and after the test threads in the thread pool are completely prepared, simultaneously accessing the webpage to be tested by each test thread.
3. The method for testing high concurrent web page stress according to claim 1, wherein the response result comprises a single response time;
determining a pressure test result of the webpage to be tested based on a response result of each thread accessing the webpage to be tested, including:
determining a comprehensive response result based on the response result of each thread accessing the webpage to be tested, wherein the comprehensive response result comprises at least one of the longest response time, the shortest response time and the average response time;
and determining a pressure test result of the webpage to be tested based on the comprehensive response result.
4. The method for testing high concurrent web page stress according to claim 1, wherein the accessing the web page to be tested concurrently by using a plurality of threads in the thread pool comprises:
and if the webpage to be tested can arrive, utilizing a plurality of threads in the thread pool to access the webpage to be tested simultaneously.
5. The method for testing web page stress of high concurrency according to claim 4, wherein if the web page to be tested can arrive, before accessing the web page to be tested by using a plurality of threads in the thread pool, the method further comprises:
receiving the URL of the webpage to be tested by using an HttpWebRequest interface of a net frame;
and judging whether the webpage to be tested can be reached or not based on the URL of the webpage to be tested.
6. The method for testing the stress of the highly concurrent web pages according to claim 1, wherein after obtaining the response result of each thread accessing the web page to be tested, the method comprises:
judging whether to quit the test;
if the test is not quitted, the memory resources corresponding to the thread pool are not recycled, the step of utilizing a plurality of threads in the thread pool to access the webpage to be tested simultaneously and the step of obtaining the response result of each thread accessing the webpage to be tested are repeatedly executed.
7. The method for testing web page stress of high concurrency according to claim 1, wherein after determining the stress test result of the web page to be tested based on the response result of each thread accessing the web page to be tested, the method further comprises:
and displaying the response result of each thread accessing the webpage to be tested and/or the pressure test result of the webpage to be tested.
8. A high concurrency webpage pressure testing device is characterized by comprising:
the access module is used for utilizing a plurality of threads in the thread pool to access the webpage to be tested simultaneously;
the response result acquisition module is used for acquiring the response result of each thread accessing the webpage to be tested;
and the test result determining module is used for determining the pressure test result of the webpage to be tested based on the response result of each thread accessing the webpage to be tested.
9. An electronic device, comprising: a processor and a memory;
the processor is adapted to perform the steps of the method of any one of claims 1 to 7 by calling a program or instructions stored in the memory.
10. A computer-readable storage medium, characterized in that it stores a program or instructions for causing a computer to carry out the steps of the method according to any one of claims 1 to 7.
CN202010836779.6A 2020-08-19 2020-08-19 High concurrency webpage pressure testing method and device, electronic equipment and storage medium Active CN112052163B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010836779.6A CN112052163B (en) 2020-08-19 2020-08-19 High concurrency webpage pressure testing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010836779.6A CN112052163B (en) 2020-08-19 2020-08-19 High concurrency webpage pressure testing method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112052163A true CN112052163A (en) 2020-12-08
CN112052163B CN112052163B (en) 2023-11-10

Family

ID=73600408

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010836779.6A Active CN112052163B (en) 2020-08-19 2020-08-19 High concurrency webpage pressure testing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112052163B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114257529A (en) * 2021-12-24 2022-03-29 深圳市欣博跃电子有限公司 Network equipment stability testing method, device, equipment, system and medium
CN115567718A (en) * 2022-09-29 2023-01-03 苏州浪潮智能科技有限公司 Transcoding card testing method and device, electronic equipment and readable storage medium
CN116132328A (en) * 2023-02-10 2023-05-16 北京安锐卓越信息技术股份有限公司 Network pressure testing method and device, storage medium and electronic equipment

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012118577A (en) * 2010-11-29 2012-06-21 Ird:Kk Illegal domain detection device, illegal domain detection method and program
US20120259833A1 (en) * 2011-04-11 2012-10-11 Vistaprint Technologies Limited Configurable web crawler
CN104317938A (en) * 2014-10-31 2015-01-28 北京国双科技有限公司 Webpage validation method and device
CN106371987A (en) * 2015-07-24 2017-02-01 北京奇虎科技有限公司 Test method and device
CN108282478A (en) * 2018-01-23 2018-07-13 湖南科技学院 A kind of WEB site safeties detection method, device and computer-readable medium
CN108572919A (en) * 2018-05-30 2018-09-25 平安普惠企业管理有限公司 Automated testing method, device, computer equipment and storage medium
CN110058990A (en) * 2019-03-12 2019-07-26 平安普惠企业管理有限公司 Performance test methods and device, computer equipment, storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012118577A (en) * 2010-11-29 2012-06-21 Ird:Kk Illegal domain detection device, illegal domain detection method and program
US20120259833A1 (en) * 2011-04-11 2012-10-11 Vistaprint Technologies Limited Configurable web crawler
CN104317938A (en) * 2014-10-31 2015-01-28 北京国双科技有限公司 Webpage validation method and device
CN106371987A (en) * 2015-07-24 2017-02-01 北京奇虎科技有限公司 Test method and device
CN108282478A (en) * 2018-01-23 2018-07-13 湖南科技学院 A kind of WEB site safeties detection method, device and computer-readable medium
CN108572919A (en) * 2018-05-30 2018-09-25 平安普惠企业管理有限公司 Automated testing method, device, computer equipment and storage medium
CN110058990A (en) * 2019-03-12 2019-07-26 平安普惠企业管理有限公司 Performance test methods and device, computer equipment, storage medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114257529A (en) * 2021-12-24 2022-03-29 深圳市欣博跃电子有限公司 Network equipment stability testing method, device, equipment, system and medium
CN115567718A (en) * 2022-09-29 2023-01-03 苏州浪潮智能科技有限公司 Transcoding card testing method and device, electronic equipment and readable storage medium
CN116132328A (en) * 2023-02-10 2023-05-16 北京安锐卓越信息技术股份有限公司 Network pressure testing method and device, storage medium and electronic equipment

Also Published As

Publication number Publication date
CN112052163B (en) 2023-11-10

Similar Documents

Publication Publication Date Title
US8863085B1 (en) Monitoring web applications
Garbers et al. Finding clusters in VLSI circuits
CN112052163B (en) High concurrency webpage pressure testing method and device, electronic equipment and storage medium
US10666758B2 (en) Browser resource pre-pulling method, terminal and storage medium
US20150089299A1 (en) Online application testing across browser environments
US20120253745A1 (en) System and method for testing performance of mobile application server
US9491247B2 (en) Automatic capture of detailed analysis information based on remote server analysis
WO2016150324A1 (en) Page module rendering method, apparatus and display device
CN105630683B (en) A kind of cloud testing architecture
US20180131779A1 (en) Recording And Triggering Web And Native Mobile Application Events With Mapped Data Fields
CN106649057A (en) Method and device for testing server pressure
CN102880616A (en) Browser page loading method and device
US20160226728A1 (en) Automatic capture of detailed analysis information for web application outliers with very low overhead
CN114095567B (en) Data access request processing method and device, computer equipment and medium
CN102916847A (en) Method and device for monitoring website speed
US20220038444A1 (en) Cloud device, application processing method, electronic device and storage medium
CN109948332A (en) A kind of physical machine login password remapping method and device
EP3148120A1 (en) Service system test method and device
CN111859077B (en) Data processing method, device, system and computer readable storage medium
CN111431767A (en) Multi-browser resource synchronization method and device, computer equipment and storage medium
WO2020077681A1 (en) Method and apparatus for lazy loading of js script
CN112491974B (en) Remote browsing method, device, storage medium, terminal equipment and server
CN111800511B (en) Synchronous login state processing method, system, equipment and readable storage medium
CN113986719A (en) Automatic test method and system for large-scale cluster performance based on cloud service
CN113362173A (en) Anti-duplication mechanism verification method, anti-duplication mechanism verification system, electronic equipment and storage medium

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
GR01 Patent grant
GR01 Patent grant