Test method and device for simulating multi-user login, storage medium and program product

By building and executing test commands, simulating multi-user concurrent login, the problem that traditional testing methods are difficult to effectively simulate multi-user login scenarios is solved, and the accurate evaluation of the concurrent authentication login capacity of the tested side is realized and the discovery of system performance bottlenecks is improved. Test efficiency.

CN119484371AActive Publication Date: 2025-02-18BEIJING TOPSEC NETWORK SECURITY TECH +2
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN202411702264.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-26
Publication Date
2025-02-18
Estimated Expiration
2044-11-26

AI Technical Summary

Technical Problem

Traditional interface testing methods are difficult to effectively simulate multi-user login scenarios, especially in obtaining and simulating device information of each user, which makes it impossible to effectively simulate and verify the test scenarios.

Method used

By building and executing test commands, we simulate multi-user concurrent login and automatically test the multi-user concurrent login performance of the tested side. The specific steps include configuring the end to be tested, the user name prefix, the number starting value and the number of logins, monitoring the number of concurrent users in real time, and dynamically updating the test commands to gradually increase the concurrent user requests.

Benefits of technology

It realizes an accurate evaluation of the concurrent authentication login capacity of the tested side, helps to discover the performance bottlenecks of the system under different loads, improves testing efficiency, and reduces manual operation errors and time consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119484371A_ABST
    Figure CN119484371A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a test method and device for simulating multi-user login, a storage medium and a program product. The method comprises the following steps: constructing a test command at a test end, and configuring a tested end identifier, a user name prefix, a serial number initial value and a login number to the test command; initiating the ith round of test by executing the test command, wherein the initial value of i is 1; in the ith round of test, an authentication login request of the user is simulated based on the user name prefix, the number initial value and the login number, and the authentication login request is sent to the tested end based on the tested end identifier; monitoring whether the number of concurrent users of the tested end is in an increasing state or not in real time; if not, the maximum concurrent user number is obtained and serves as the concurrent authentication login capacity of the tested end, and the test is ended; if yes, updating the test command based on the test information, and executing a new test command, i = i + 1. According to the method, the multi-user concurrent login can be simulated by executing and updating the test command, and the multi-user concurrent login performance of the tested end can be automatically tested.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of system testing, and in particular to a method, device, storage medium, and program product for simulating multi-user login testing. Background Art

[0002] Zero Trust is a network security strategy. Under this model, enterprises do not automatically trust any internal or external users, devices, or applications, and all access requests must be strictly verified before authorization. In the test environment, it is necessary to simulate the scenario of multiple users logging into the client at the same time. This scenario is usually used to verify the concurrent processing capabilities and security of the system. In order to simulate real user login requests, each user request must contain specific device information (such as IP address, MAC address, system information, etc.), which is used to verify the identity of the user and the legitimacy of the device. Traditional interface testing methods usually focus on simulating API requests and responses, but in this scenario, it is not easy to obtain and simulate the device information of each user, resulting in the inability to effectively simulate and verify the test scenario. Summary of the invention

[0003] In view of this, the embodiments of the present disclosure provide a simulated multi-user login test method, device, storage medium, and program product, which can simulate multi-user concurrent login by executing and updating test commands, and automatically test the multi-user concurrent login performance of the tested end.

[0004] In a first aspect, the present disclosure provides a method for simulating a multi-user login test, which adopts the following technical solution:

[0005] Construct a test command on the test end, and configure the test command with the tested end identifier, the user name prefix, the numbering start value, and the number of logins;

[0006] Initiate the i-th round of testing by executing the test command, where the initial value of i is 1;

[0007] In the i-th round of testing, based on the username prefix, the numbering start value and the number of logins, the authentication login request of the user is simulated, and based on the tested terminal identifier, the authentication login request is sent to the tested terminal;

[0008] Monitor in real time whether the number of concurrent users on the tested end is increasing;

[0009] If not, the maximum number of concurrent users is obtained and used as the concurrent authentication login capacity of the tested end, and the test ends;

[0010] If so, the test information is obtained, the test command is updated based on the test information, and the new test command is executed, i=i+1.

[0011] Optionally, the simulating the user's authentication login request based on the user name prefix, the numbering start value and the number of logins includes:

[0012] Based on the starting number value, generate the current number K, K = k0 i +k,k0 i is the starting number in the i-th round of testing, and the initial value of k is 0;

[0013] Combining the username prefix and the current ID into a current username;

[0014] Generate the current IP address and the current MAC address based on the starting value of the IP address and the starting value of the MAC address;

[0015] Get current system information;

[0016] Based on the current user name, the current IP address, the current MAC address and the current system information, simulate the user's authentication login request, k=k+1;

[0017] When the result of k-1 is less than the number of logins, a new authentication login request is simulated.

[0018] Optionally, the real-time monitoring of whether the number of concurrent users of the tested terminal is in an increasing state includes:

[0019] Obtain the number of concurrent users and sampling time of the tested end in real time;

[0020] Build a curve chart based on the number of concurrent users and sampling time obtained in real time;

[0021] Obtaining the instantaneous slope of the curve graph;

[0022] If the instantaneous slope is positive, it is determined that the number of concurrent users on the tested end is increasing;

[0023] If the instantaneous slope is not positive, it is determined that the number of concurrent users at the measured end is in a constant state.

[0024] Optionally, the simulated multi-user login test method further includes:

[0025] Determine whether the tested terminal is used for the first time;

[0026] If yes, then obtain the device type of the tested end, and collect concurrent authentication login capacity of multiple devices of the same type based on the device type;

[0027] Taking the average value of the concurrent authentication login capacity of multiple devices of the same type as the initial value of the login number;

[0028] If not, obtain the number of CPU cores of the tested end, as well as the average utilization of each CPU core and the average request processing time in historical login operations;

[0029] Based on the number of CPU cores, the average utilization rate and the average time, an initial value of the number of logins is obtained.

[0030] Optionally, the calculation formula for the initial value of the number of logins is as follows:

[0031]

[0032] Where C1 is the initial value of the number of logins; n is the sequence number of the CPU core, 1≤n≤N; N is the number of CPU cores; u n is the average utilization of the nth CPU core; t n It is the average time for processing the nth YY+242329PCPU core request.

[0033] Optionally, the test information includes the total time of the i-th round of testing, the current number of concurrent users of the tested terminal, the request failure rate and the throughput;

[0034] Obtaining the predicted number of logins for the next round of testing based on the curve chart;

[0035] Based on the total time of the i-th round of testing, the current number of concurrent users on the tested end, the request failure rate, the throughput, and the predicted number of logins, obtain the new number of logins;

[0036] Update the starting number based on the new number of logins;

[0037] Update the test command based on the new number of entries and the new starting number value.

[0038] Optionally, the calculation formula for the new login number is as follows:

[0039] C i+1 =(Y c -y1)×T i ×(1-S i ) / L;

[0040] In the formula, C i+1 is the number of new logins; Y c is the predicted number of logins; y1 is the current number of concurrent users on the tested end; T i is the total time of the i-th round of testing; S i is the cumulative request failure rate at the end of the i-th round of testing. As the test iterations proceed, the request failure rate will be continuously updated; L is the throughput.

[0041] In a second aspect, the embodiment of the present disclosure also provides a simulated multi-user login test system, which adopts the following technical solution:

[0042] A command construction module, used to construct a test command on the test end, and configure the test command with a tested end identifier, a user name prefix, a numbering start value, and a login number;

[0043] A command execution module, used to initiate the i-th round of testing by executing the test command, where the initial value of i is 1;

[0044] The request simulation module is used to simulate the user's authentication login request in the i-th round of testing based on the user name prefix, the number starting value and the number of logins, and based on the tested terminal mark YY+242329P

[0045] Send an authentication login request to the tested end;

[0046] The status monitoring module is used to monitor in real time whether the number of concurrent users of the tested end is increasing; if not, the capacity acquisition module is executed; if so, the command update module is executed;

[0047] The capacity acquisition module is used to obtain the maximum number of concurrent users and use it as the concurrent authentication login capacity of the tested end to end the test;

[0048] The command updating module is used to obtain test information, update the test command based on the test information, and execute the new test command, i=i+1.

[0049] In a third aspect, the embodiments of the present disclosure further provide a computer device, which adopts the following technical solution:

[0050] The computer device comprises:

[0051] at least one processor; and,

[0052] a memory communicatively connected to the at least one processor; wherein,

[0053] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute any of the above-mentioned simulated multi-user login test methods.

[0054] In a fourth aspect, an embodiment of the present disclosure further provides a computer-readable storage medium, which stores computer instructions, and the computer instructions are used to enable a computer to execute any of the above-mentioned simulated multi-user login test methods.

[0055] In a fifth aspect, an embodiment of the present disclosure further provides a computer program product, including a computer program / instruction, which implements the steps of any of the above methods when executed by a processor.

[0056] The simulated multi-user login test method provided by the embodiment of the present disclosure can accurately evaluate the concurrent authentication login capacity of the tested end, that is, the maximum number of concurrent users that the system can stably handle, by gradually increasing the login requests of concurrent users, which helps to find the performance bottleneck of the system under different loads, especially when testing the zero-trust SDP multi-user login client capability, helping the development team to make more reasonable decisions when designing and deploying the system. When it is monitored that the number of concurrent users of the tested end is no longer growing, the test method will automatically stop and record the current maximum number of concurrent users, thereby avoiding excessive testing and unnecessary resource consumption. If the number of concurrent users is still growing, the test method will dynamically update the test command and continue with the next round of testing (i.e., the i+1th round) to further explore the limits of the system. The entire test process is automatically completed by building and executing test commands, reducing errors and time consumption of manual operations and improving test efficiency. Real-time monitoring of the changes in the number of concurrent users of the tested end can timely discover the changing trend of system performance and help to quickly update the test command. By configuring the username prefix and the starting value of the number, a large number of simulated users can be flexibly generated, which is suitable for test requirements of different scales and types. This flexible configuration strategy of test commands can be adjusted according to specific test objectives and requirements, increasing the applicability and scalability of the test method.

[0057] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the following preferred embodiments are specifically cited and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0059] Figure 1 A flowchart of a method for simulating multi-user login testing provided by an embodiment of the present disclosure;

[0060] Figure 2 A flowchart of the authentication login request simulation method provided in an embodiment of the present disclosure;

[0061] Figure 3A flow chart of a growth status determination method provided by an embodiment of the present disclosure;

[0062] Figure 4 A flowchart of a method for setting an initial value of the number of logins provided in an embodiment of the present disclosure;

[0063] Figure 5 A flowchart of a test command updating method provided by an embodiment of the present disclosure;

[0064] Figure 6 A principle block diagram of a simulated multi-user login test system provided by an embodiment of the present disclosure;

[0065] Figure 7 A schematic diagram of the structure of a computer device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0066] The embodiments of the present disclosure are described in detail below with reference to the accompanying drawings.

[0067] It should be clear that the following embodiments of the present disclosure are described by specific specific examples, and those skilled in the art can easily understand other advantages and effects of the present disclosure from the contents disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of the present disclosure, rather than all of the embodiments. The present disclosure can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present disclosure. It should be noted that the following embodiments and features in the embodiments can be combined with each other in the absence of conflict. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present disclosure.

[0068] It should be noted that various aspects of the embodiments within the scope of the appended claims are described below. It should be apparent that the aspects described herein may be embodied in a wide variety of forms, and any specific structure and / or function described herein is merely illustrative. Based on the present disclosure, it should be understood by those skilled in the art that an aspect described herein may be implemented independently of any other aspect, and two or more of these aspects may be combined in various ways. For example, any number of aspects described herein may be used to implement the device and / or practice the method. In addition, other structures and / or functionalities other than one or more of the aspects described herein may be used to implement this device and / or practice this method.

[0069] It should also be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present disclosure. The drawings only show components related to the present disclosure rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed arbitrarily, and the component layout may also be more complicated.

[0070] Additionally, in the following description, specific details are provided to facilitate a thorough understanding of the examples. However, one skilled in the art will appreciate that aspects may be practiced without these specific details.

[0071] Reference Figure 1 The present disclosure provides a method for simulating multi-user login testing, comprising the following steps:

[0072] S1: Construct a test command on the test end, and configure the test end identifier, user name prefix, number starting value, and login number in the test command;

[0073] S2: Initiate the i-th round of testing by executing the test command, where the initial value of i is 1;

[0074] S3: In the i-th round of testing, based on the username prefix, the starting value of the number and the number of logins, the authentication login request of the user is simulated, and based on the tested terminal identifier, the authentication login request is sent to the tested terminal;

[0075] S4: Monitor in real time whether the number of concurrent users on the tested end is increasing; if not, execute YY+242329P

[0076] Go to S5; if yes, go to S6;

[0077] S5: Get the maximum number of concurrent users and use it as the concurrent authentication login capacity of the tested end, and end the test;

[0078] S6: Get test information, update the test command based on the test information, i=i+1, return to S2, and execute the new test command.

[0079] The simulated multi-user login test method disclosed in the present invention can accurately evaluate the concurrent authentication login capacity of the tested end, that is, the maximum number of concurrent users that the system can stably handle, by gradually increasing the login requests of concurrent users, which helps to find the performance bottleneck of the system under different loads, especially when testing the zero-trust SDP multi-user login client capability, helping the development team to make more reasonable decisions when designing and deploying the system. When it is monitored that the number of concurrent users of the tested end is no longer growing, the test method will automatically stop and record the current maximum number of concurrent users, thereby avoiding excessive testing and unnecessary resource consumption. If the number of concurrent users is still growing, the test method will dynamically update the test command and continue with the next round of testing (i.e., the i+1th round) to further explore the limits of the system. The entire test process is automatically completed by building and executing test commands, reducing errors and time consumption of manual operations and improving test efficiency. Real-time monitoring of the changes in the number of concurrent users of the tested end can timely discover the changing trend of system performance and help to quickly update the test command. By configuring the username prefix and the starting value of the number, a large number of simulated users can be flexibly generated, which is suitable for test requirements of different scales and types. This flexible configuration strategy of test commands can be adjusted according to specific test objectives and requirements, increasing the applicability and scalability of the test method.

[0080] In summary, the simulated multi-user login test method can efficiently and accurately evaluate the performance and capacity of the system in the concurrent authentication login scenario through automation, dynamic adjustment and real-time monitoring, providing strong support for the optimization and expansion of the system.

[0081] In S1, the test end can be a client, that is, a personal computer (PC). A test command is constructed on the test end, and command parameters are configured for the test command. The command parameters include a test program identifier, a tester identifier, a test end identifier, a user name prefix, a number starting value, and a number of logins. Among them, the test program identifier refers to the unique identifier of the test program to be called; the tester identifier refers to the unique identifier of the tester who initiates the test command; the test end identifier refers to the IP of the test end, and the test end can be a TopSDP (Top Security Device Protocol) controller, so the test end identifier can also be called the controller IP; a large number of registered user names are preset, each user name includes a user name prefix and a number, the user name prefix refers to the fixed part of the user name, which is used to identify the group or category to which the user belongs, and the number starting value refers to the starting value of the number part in the user name, which is usually set to an integer; the number of logins refers to the total number of simulated user logins during the i-th round of testing, where i represents the number of iterations of the test, and the initial value of i is 1.

[0082] In S2, the test tool (simulation test client) is a large software or script collection containing multiple test programs. Navigate to the directory where the test tool is stored through the command line interface, enter the directory, run the test tool directly in the command line and send the test command. When the test tool receives the test command, it calls the corresponding test program according to the test program identifier in the test command to execute the test command, and the i-th round of testing begins.

[0083] In S3, in the i-th round of testing, the test program simulates the user's authentication login request based on the username prefix, the starting value of the number and the number of logins, and sends multiple authentication login requests to the tested end based on the tested end identifier.

[0084] Reference Figure 2 The flowchart of the authentication login request simulation method shown in the figure includes the following steps:

[0085] S31: Generate the current number K based on the starting number value, K=k0 i +k,k0 i is the starting number in the i-th round of testing, and the initial value of k is 0;

[0086] S32: combining the user name prefix and the current number into the current user name;

[0087] S33: Generate a current IP address and a current MAC address based on the starting value of the IP address and the starting value of the MAC address;

[0088] S34: Get current system information;

[0089] S35: Based on the current user name, current IP address, current MAC address and current system information, simulate the user's authentication login request, k=k+1;

[0090] S36: Determine whether the result of k-1 is less than the number of logins; if so, return to S31 to simulate a new authentication login request; if not, execute S37;

[0091] S37: Waiting for the next round of iterative testing.

[0092] In S31, k is reinitialized to 0 at the beginning of each round of testing.

[0093] In S32, the current number is added to the username prefix to form a complete username, and the username generated at this time is used as the current username.

[0094] In S33, the current IP address is represented as P, P = P0 + k, and P0 is the starting value of the IP address. Note that it is necessary to determine whether the last bit (fourth bit) of P reaches the upper limit (e.g., 255); if so, add 1 to the second to last bit (third bit) of P, and reset the last bit to the lower limit (e.g., 1); if not, add 1 to the last bit of P.

[0095] The current MAC address is expressed as M, M = M0 + k, and M0 is the starting value of the MAC address. Note that it is necessary to determine whether the last bit (the sixth bit) of M reaches the upper limit (for example, FF); if so, add 1 to the second to last bit (the fifth bit) of M and reset the last bit to the lower limit (for example, 00); if not, add 1 to the last bit of M.

[0096] In S34, the current system information can be determined in three ways: first, a preset set of system information is used as the current system information, which can represent the system environment to be simulated; second, different system information is iteratively extracted from the preset information library as the current system information to cover a variety of possible system environments; third, the current system information is directly generated based on real-time performance data. This method can dynamically adjust the system configuration based on real-time performance data to more accurately simulate the actual operating environment. The current system information includes system version, IMEI information, device serial number, etc.

[0097] In S35, the current user name, current IP address, current MAC address and current system information are constructed as a device information entity (i.e., stdev). The internally defined login() function is called by stdev to simulate the user's authentication login request, and an authentication login request is initiated to the corresponding tested end through the tested end identifier. The total number of requests is determined according to the set number of logins. Since the time interval between each request is very short and some requests are even sent in parallel, it can be regarded as a series of authentication login requests being initiated continuously in each round of testing. After receiving the authentication login request, the tested end will execute the authentication process and return the authentication result. If the authentication is successful, the tested end provides relevant information such as the authentication token; if the authentication fails, the corresponding error code and failure reason are returned. This process ensures comprehensive testing and verification of the tested end's authentication mechanism.

[0098] In S36-S37, calculate the result of k-1. If the result is less than the number of logins, continue to repeat the above steps to simulate a new authentication login request. If the result is equal to the number of logins, wait for the next round of iterative testing (i.e. the i+1th round of testing).

[0099] In S4, refer to Figure 3 The flow chart of the growth status judgment method is shown, which monitors in real time whether the number of concurrent users of the tested terminal is in a growth state, including the following steps:

[0100] S41: obtaining the number of concurrent users and sampling time of the tested terminal in real time;

[0101] S42: constructing a curve graph based on the number of concurrent users and sampling time obtained in real time;

[0102] S43: Obtaining the instantaneous slope of the curve graph;

[0103] S44: Determine whether the instantaneous slope is positive; if so, execute S45; if not, execute S46;

[0104] S45: determining that the number of concurrent users of the tested terminal is in an increasing state;

[0105] S46: Determine whether the number of concurrent users of the tested terminal is constant.

[0106] In S41-S42, the number of concurrent users refers to the number of online users on the measured end, and the sampling time refers to the specific time when the number of concurrent users is collected. In order to intuitively display this dynamic change, an xoy coordinate system is constructed, in which the x-axis represents the sampling time and the y-axis represents the number of concurrent users. The coordinate points (x, y) are determined by the real-time collected number of concurrent users and the corresponding sampling time, and the coordinate points are connected in sequence to form a curve graph. As time goes by and data collection continues, the curve graph will be continuously updated to reflect the changing trend of the number of concurrent users over time.

[0107] Note that the token is usually valid for 8 hours, which is enough to complete the entire test project. Therefore, during the entire test project, no users will go offline, and accordingly, the number of concurrent users on the tested end will not decrease.

[0108] In S43, whenever the number of concurrent users of the measured terminal is updated, the instantaneous slope of the curve graph is immediately obtained. The calculation formula of the instantaneous slope is as follows:

[0109] m=(y1-y2) / (x1-x2)

[0110] In the formula, y1 is the latest number of concurrent users of the measured end, that is, the current number of concurrent users of the measured end; y2 is the number of concurrent users of the measured end collected last time; x1 is the sampling time of y1 YY+242329P

[0111] time; x2 is the sampling time of y2.

[0112] In S44-S46, if the instantaneous slope is positive, it is determined that the number of concurrent users of the tested end is in an increasing state, indicating that the tested end has not reached the tolerance limit of online users at this time, and the tolerance limit of the tested end still needs to be explored. If the instantaneous slope is not positive, it is determined that the number of concurrent users of the tested end is in a constant state, indicating that the tested end has reached the tolerance limit of online users at this time.

[0113] In S5, when the number of concurrent users of the tested end is constant, the maximum number of concurrent users obtained during the test (i.e., the number of concurrent users of the tested end collected in the last round) is obtained and used as the concurrent authentication login capacity of the tested end, the test is ended, and the simulation of authentication login requests is stopped.

[0114] Furthermore, since the device information entity needs to be prepared before making an authentication login request, if the number of logins initially set far exceeds the concurrent authentication login capacity of the tested end, the preparation of many device information entities will become redundant. On the contrary, if the number of logins initially set is far lower than the concurrent authentication login capacity of the tested end, the completion time of the overall test project will be extended, thereby affecting the test efficiency. To this end, the simulated multi-user login test method disclosed in the present invention also includes: making targeted adjustments to the initial value of the number of logins based on the device details of the tested end to ensure the efficiency and accuracy of the test. Such adjustments help optimize resource utilization and ensure the reliability of test results. Specifically, refer to Figure 4 The flowchart of the method for setting the initial value of the number of logins is shown. Obtaining the initial value of the number of logins includes the following steps:

[0115] S7: Determine whether the tested terminal is used for the first time; if so, execute S8; if not, execute S10;

[0116] S8: Obtain the device type of the tested end, and collect concurrent authentication login capacity of multiple devices of the same type based on the device type;

[0117] S9: taking the average value of the concurrent authentication login capacity of multiple devices of the same type as the initial value of the login number;

[0118] S10: Obtain the number of CPU cores of the tested end, as well as the average utilization of each CPU core and the average request processing time in historical login operations;

[0119] S11: Based on the number of CPU cores, average utilization, and average time, an initial value of the number of logins is obtained.

[0120] In the above, whether the tested end is used for the first time refers to whether the tested end has gone through the process of user identity authentication and login before the test. If it has not gone through the process of user identity authentication and login, it is considered to be used for the first time. The concurrent authentication and login capacity of the tested end is evaluated by collecting the concurrent authentication and login capacity of multiple devices of the same type as the tested end, and the initial value of the number of logins is set based on this. If the tested end has gone through the process of user identity authentication and login, it is considered not to be used for the first time. The initial value of the number of logins is calculated by the number of CPU cores of the tested end and the average utilization rate of each CPU core in historical login operations and the average time of request processing (i.e., the average time for the CPU core to process authentication and login requests). The calculation formula is as follows:

[0121]

[0122] In the formula, C1 is the initial value of the number of logins, and the prototype of C1 is C i , C i Indicates the number of logins in the i-th round of testing. However, the initial value of the number of logins is set in the first round of testing, so i is 1 at this time; n is the sequence number of the CPU core, 1≤n≤N; N is the number of CPU cores; u n is the average utilization of the nth CPU core; t n YY+242329P processed for the nth CPU core request

[0123] Average time.

[0124] In S6, refer to Figure 5 A flow chart of a test command update method is shown. In a specific implementation scheme, test information is obtained, command parameters in the test command are updated based on the test information, and a new test command is executed, including the following steps:

[0125] S61: The test information includes the total time of the i-th round of testing, the current number of concurrent users of the tested end, the request failure rate and the throughput;

[0126] S62: Obtain the predicted number of logins for the next round of testing based on the curve chart;

[0127] S63: based on the total time of the i-th round of testing, the current number of concurrent users of the tested terminal, the request failure rate, the throughput and the predicted number of logins, obtain a new number of logins;

[0128] S64: based on the new number of logins, update the starting value of the number;

[0129] S65: Update the test command based on the new number of logins and the new starting number value.

[0130] In S61, test information is obtained, and the test information includes the total time of the i-th round of testing, the current number of concurrent users of the tested end, the request failure rate and the throughput, wherein the current number of concurrent users of the tested end refers to the current number of concurrent users of the tested end monitored after the end of this round of testing; the request failure rate is equal to the ratio between the total number of request failures accumulated in each round of testing and the total number of logins in each round of testing; the throughput refers to the number of requests successfully processed by the tested end in unit time.

[0131] In S62, a mathematical method of polynomial regression or logistic regression is used to obtain the predicted number of logins for the next round of testing based on a curve graph.

[0132] In S63, the calculation formula of the new number of logins is as follows:

[0133] C i+1 =(Y c -y1)×T i ×(1-S i ) / L;

[0134] In the formula, C i+1 is the number of new logins; Y c is the predicted number of logins; T i is the total time of the i-th round of testing; S i is the cumulative request failure rate at the end of the i-th round of testing. As the test iteration YY+242329P progresses, the request failure rate will be continuously updated; L is the throughput.

[0135] In S64, the new numbering starting value k0 i+1 =k0 i +C i .

[0136] In S65, the new login number and the new number starting value replace the two command parameters of the test command, namely the original login number and the original number starting value, respectively, thereby completing the update of the test command, executing the new test command, i=i+1, and initiating a new round of testing.

[0137] Through the above solution, the number of requests initiated for the next test can be adjusted based on the test details, the number of test iterations can be reduced as much as possible, the resources on the test side can be saved, and the high efficiency of the test can be ensured.

[0138] In another specific implementation scheme, the test information includes the CPU usage rate, memory usage rate and concurrent user login rate of the test terminal, wherein the concurrent user login rate is calculated based on the number of logged-in users login_users and the test execution time. When the CPU usage rate and memory usage rate exceed the preset usage rate threshold (e.g., 80%), and the concurrent user login rate is lower than the preset rate threshold, these three conditions are met, Ci+1 =C i -R, where R is a preset integer, for example, R = 20; when any of the above three conditions is not met, C i+1 =C i .

[0139] This solution takes into account the equipment capacity of the test end, and while ensuring that it does not cause too much resource pressure on the test end, it issues more authentication login requests to reduce the test time.

[0140] In each round of testing, multiple processes are started in advance, waiting for the preparation of the device information entity to be completed, and then the authentication login request is immediately sent. In order to reduce the pressure on the test end and save process resources, when a round of testing is completed, all processes are closed. If the next round of testing is required, the process will be restarted. Alternatively, if the number of new logins is less than the preset number threshold, the closure ratio is determined based on the new number of logins and the preset number threshold, and the corresponding part of the process is closed according to the closure ratio. Such a process helps to optimize resource utilization and ensure the efficiency of the testing process. Among them, the closure ratio refers to the need to close the original, and the calculation formula for the closure ratio is as follows:

[0141] G=(gC i+1 ) / g

[0142] Where G is the closing ratio; g is the preset number threshold.

[0143] The present disclosure also provides a specific example:

[0144] Navigate to the directory where the test tool is located through the command line interface (cmd), and then enter the test command `TestClient.exe 10.7.107.174pjh 100 10 50`. Press the Enter key to execute the test command, which will start a background process to use 100 users with usernames from pjh50 to pjh149 to concurrently log in to the SDP controller with IP address 10.7.107.174. After the test is completed, the test tool will decide whether to continue to the next round of testing or stop the test based on the test information. If a specific trigger condition is met, the test tool will continue to execute the command `TestClient.exe 10.7.107.174pjh 80 10 150` for the next round of testing, and the number of logins will be updated to 150. This process will be repeated until the condition for stopping the test is met. Finally, view the results output by the test tool to obtain the maximum number of concurrent users supported by the SDP system.

[0145] To summarize, this solution automatically generates complete login information by simulating a multi-user client test tool, which can efficiently and automatically test the multi-user concurrent login performance of the zero-trust SDP client, avoiding the cumbersome operation, troublesome device information acquisition and single-user login limitations of the traditional method, significantly saving test time, improving test efficiency, and accurately evaluating the user login concurrent performance of the zero-trust system.

[0146] Reference Figure 6 The present disclosure provides a simulated multi-user login test system, comprising:

[0147] Command construction module 101, used to construct a test command on the test end, and configure YY+242329P to the test command

[0148] The ID of the tested terminal, the username prefix, the starting value of the number, and the number of logins;

[0149] A command execution module 102 is used to initiate the i-th round of testing by executing a test command, where the initial value of i is 1;

[0150] The request simulation module 103 is used to simulate the user's authentication login request based on the username prefix, the number starting value and the number of logins in the i-th round of testing, and send the authentication login request to the tested terminal based on the tested terminal identifier;

[0151] The status monitoring module 104 is used to monitor in real time whether the number of concurrent users of the tested terminal is increasing; if not, the capacity acquisition module is executed; if so, the command update module is executed;

[0152] The capacity acquisition module 105 is used to obtain the maximum number of concurrent users and use it as the concurrent authentication login capacity of the tested terminal, and then end the test;

[0153] The command updating module 106 is used to obtain test information, update the test command based on the test information, and execute the new test command, i=i+1.

[0154] The various variations and specific examples of the simulated multi-user login test method provided above are also applicable to the simulated multi-user login test system provided in the present invention. Through the above detailed description of the simulated multi-user login test method, those skilled in the art can clearly know the implementation method of the simulated multi-user login test system. For the sake of brevity of the specification, it will not be described in detail here.

[0155] The computer device according to the embodiment of the present disclosure includes a memory and a processor. The memory is used to store non-temporary computer-readable instructions. Specifically, the memory may include one or more computer program products, and the computer program product may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may, for example, include a random access memory (RAM) and / or a cache memory (cache), etc. The non-volatile memory may, for example, include a read-only memory (ROM), a hard disk, a flash memory, etc.

[0156] The processor may be a central processing unit (CPU) or other forms of processing units with data processing capabilities and / or instruction execution capabilities, and may control other components in the computer device to perform desired functions. In one embodiment of the present disclosure, the processor is used to run the computer-readable instructions stored in the memory, so that the computer device performs all or part of the steps of the simulated multi-user login test method of each embodiment of the present disclosure.

[0157] Those skilled in the art should be able to understand that in order to solve the technical problem of how to obtain a good user experience, the present embodiment may also include well-known structures such as a communication bus and an interface, and these well-known structures should also be included in the protection scope of the present disclosure.

[0158] like Figure 7 A schematic diagram of the structure of a computer device provided in an embodiment of the present disclosure is shown, which is a schematic diagram of the structure of a computer device suitable for implementing the embodiment of the present disclosure. Figure 7 The computer device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0159] like Figure 7 As shown, the computer device may include a processor (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) or a program loaded from a storage device into a random access memory (RAM). In the RAM, various programs and data required for the operation of the computer device are also stored. The processor, ROM, and RAM are connected to each other via a bus. An input / output (I / O) interface is also connected to the bus.

[0160] Typically, the following devices can be connected to the I / O interface: input devices such as sensors or visual information acquisition devices; output devices such as display screens; storage devices such as tapes, hard disks, etc.; and communication devices. The communication device can allow the computer device to communicate with other devices (such as edge computing devices) wirelessly or by wire to exchange data. Figure 7A computer device having various devices is shown, but it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed instead.

[0161] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device, or installed from a ROM. When the computer program is executed by a processor, all or part of the steps of the simulated multi-user login test method of the embodiment of the present disclosure are executed.

[0162] For detailed description of this embodiment, reference may be made to the corresponding descriptions in the aforementioned embodiments, which will not be repeated here.

[0163] According to the computer-readable storage medium of the embodiment of the present disclosure, non-transitory computer-readable instructions are stored thereon. When the non-transitory computer-readable instructions are executed by a processor, all or part of the steps of the simulated multi-user login test method of each embodiment of the present disclosure are executed.

[0164] The computer-readable storage media include, but are not limited to, optical storage media (e.g., CD-ROM and DVD), magneto-optical storage media (e.g., MO), magnetic storage media (e.g., magnetic tape or mobile hard disk), media with built-in rewritable non-volatile memory (e.g., YY+242329P

[0165] memory card) and media with built-in ROM (e.g. ROM cartridge).

[0166] For detailed description of this embodiment, reference may be made to the corresponding descriptions in the aforementioned embodiments, which will not be repeated here.

[0167] The basic principles of the present disclosure are described above in conjunction with specific embodiments. However, it should be noted that the advantages, strengths, effects, etc. mentioned in the present disclosure are only examples and not limitations, and it cannot be considered that these advantages, strengths, effects, etc. are required by each embodiment of the present disclosure. In addition, the specific details disclosed above are only for the purpose of illustration and ease of understanding, and are not limitations. The above details do not limit the present disclosure to the necessity of adopting the above specific details to be implemented.

[0168] In the present disclosure, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. The block diagrams of the devices, devices, equipment, and systems involved in the present disclosure are only illustrative examples and are not intended to require or imply that they must be connected, arranged, and configured in the manner shown in the block diagram. As will be appreciated by those skilled in the art, these devices, devices, equipment, and systems can be connected, arranged, and configured in any manner. Words such as "including", "comprising", "having", etc. are open words, referring to "including but not limited to", and can be used interchangeably with them. The words "or" and "and" used here refer to the words "and / or" and can be used interchangeably with them, unless the context clearly indicates otherwise. The words "such as" used here refer to the phrase "such as but not limited to", and can be used interchangeably with them.

[0169] Additionally, as used herein, "or" used in a list of items beginning with "at least one" indicates a separate list, so that, for example, a list of "at least one of A, B, or C" means A or B or C, or AB or AC or BC, or ABC (i.e., A and B and C). Furthermore, the word "exemplary" does not mean that the example described is preferred or better than other examples.

[0170] It should also be noted that in the system and method of the present disclosure, each component or each step can be decomposed and / or recombined. Such decomposition and / or recombination should be regarded as equivalent solutions of the present disclosure.

[0171] Various changes, substitutions, and modifications of the techniques described herein may be made without departing from the teachings defined by the appended claims. Furthermore, the scope of the claims of the present disclosure is not limited to the specific aspects of the processes, machines, manufactures, compositions of events, means, methods, and actions described above. Currently existing or later to be developed processes, machines, manufactures, compositions of events, means, methods, or actions that perform substantially the same functions or achieve substantially the same results as the corresponding aspects described herein may be utilized. Thus, the appended claims include such processes, machines, manufactures, compositions of events, means, methods, or actions within their scope.

[0172] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present disclosure. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other aspects without departing from the scope of the present disclosure. Therefore, the present disclosure is not intended to be limited to the aspects shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

[0173] The above description has been given for the purpose of illustration and description. In addition, this description is not intended to limit the embodiments of the present disclosure to the forms disclosed herein. Although multiple example aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, changes, additions and sub-combinations thereof.

Claims

1. A method for simulating multi-user login testing, characterized in that: include: Construct a test command on the test end, and configure the test command with the tested end identifier, the user name prefix, the numbering start value, and the number of logins; Initiate the i-th round of testing by executing the test command, where the initial value of i is 1; In the i-th round of testing, based on the username prefix, the numbering start value and the number of logins, the authentication login request of the user is simulated, and based on the tested terminal identifier, the authentication login request is sent to the tested terminal; Monitor in real time whether the number of concurrent users on the tested end is increasing; If not, the maximum number of concurrent users is obtained and used as the concurrent authentication login capacity of the tested end, and the test ends; If so, the test information is obtained, the test command is updated based on the test information, and the new test command is executed, i=i+1.

2. The simulated multi-user login test method according to claim 1, characterized in that: The simulating the user's authentication login request based on the user name prefix, the numbering start value and the number of logins includes: Based on the starting number value, generate the current number K, K = k0 i +k,k0 i is the starting number in the i-th round of testing, and the initial value of k is 0; Combining the username prefix and the current ID into a current username; Generate the current IP address and the current MAC address based on the starting value of the IP address and the starting value of the MAC address; Get current system information; Based on the current user name, the current IP address, the current MAC address and the current system information, simulate the user's authentication login request, k=k+1; When the result of k-1 is less than the number of logins, a new authentication login request is simulated.

3. The simulated multi-user login test method according to claim 1, characterized in that: The real-time monitoring of whether the number of concurrent users of the tested terminal is in an increasing state includes: Obtain the number of concurrent users and sampling time of the tested end in real time; Build a curve chart based on the number of concurrent users and sampling time obtained in real time; Obtaining the instantaneous slope of the curve graph; If the instantaneous slope is positive, it is determined that the number of concurrent users on the tested end is increasing; If the instantaneous slope is not positive, it is determined that the number of concurrent users at the measured end is in a constant state.

4. The simulated multi-user login test method according to claim 1, characterized in that: The method further comprises: Determine whether the tested terminal is used for the first time; If yes, then obtain the device type of the tested end, and collect concurrent authentication login capacity of multiple devices of the same type based on the device type; Taking the average value of the concurrent authentication login capacity of multiple devices of the same type as the initial value of the login number; If not, obtain the number of CPU cores of the tested end, as well as the average utilization of each CPU core and the average request processing time in historical login operations; Based on the number of CPU cores, the average utilization rate and the average time, an initial value of the number of logins is obtained.

5. The method for simulating multi-user login testing according to claim 4, characterized in that: The calculation formula of the initial value of the number of logins is as follows: Where C1 is the initial value of the number of logins; n is the sequence number of the CPU core, 1≤n≤N; N is the number of CPU cores; u n is the average utilization of the nth CPU core; t n Average time of request processing for the nth CPU core.

6. The method for simulating multi-user login testing according to claim 3, characterized in that: The test information includes the total time of the i-th round of testing, the current number of concurrent users of the tested end, the request failure rate and the throughput; Obtaining the predicted number of logins for the next round of testing based on the curve chart; Based on the total time of the i-th round of testing, the current number of concurrent users on the tested end, the request failure rate, the throughput, and the predicted number of logins, obtain the new number of logins; Update the starting number based on the new number of logins; Update the test command based on the new number of entries and the new starting number value.

7. The method for simulating multi-user login testing according to claim 1, characterized in that: The calculation formula for the new number of logins is as follows: C i+1 =(Y c -y1)×T i ×(1-S i ) / L; In the formula, C i+1 is the number of new logins; Y c is the predicted number of logins; y1 is the current number of concurrent users on the tested end; T i is the total time of the i-th round of testing; S i is the cumulative request failure rate at the end of the i-th round of testing. As the test iterations proceed, the request failure rate will be continuously updated; L is the throughput.

8. A computer device, characterized in that: The computer device includes: YY+242329P at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the simulated multi-user login test method described in any one of claims 1-7.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, which are used to enable a computer to execute the simulated multi-user login test method described in any one of claims 1-7.

10. A computer program product comprising computer instructions, characterized in that: When the computer instructions are executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • VPN (Virtual Private Network) equipment state secret test method and device, electronic equipment and storage medium

    CN115766553A

  • BMC pressure test method and device, equipment and storage medium

    CN115794525A

  • BMC pressure testing method and device and storage medium

    CN116719707A

  • Test user switching method and device, equipment, storage medium and program product

    CN118013506A

  • Method, system and program product for determining a number of concurrent users accessing a system

    US20080109547A1