A stress testing method and system for AD domain server
By creating test IP and test ports at the test source and calling the initialization and binding function files of the protocol management library, the problem that existing AD domain server stress testing tools cannot achieve multi-user and IP login or single-user multi-IP login is solved, achieving wider testing results and higher compatibility.
Patent Information
- Application Number
- CN202211485511.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-24
- Publication Date
- 2025-05-02
- Estimated Expiration
- 2042-11-24
AI Technical Summary
The existing AD domain server stress testing tools cannot achieve multi-user same-IP login or single-user multi-IP login, resulting in the test results being unapplicable.
By creating a test IP and test port at the test source, and calling the initialization and binding function files of the protocol management library, establishing a connection and logging into the AD domain server, obtaining the login results, and calculating the stress test results based on the login results.
The login mode with multiple users and multiple IPs is realized, which expands the applicability of the test effect and improves the compatibility of AD domain servers.
Smart Images

Figure CN115842750B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to access and operation technology of AD domain servers, and in particular to a stress testing method and system for AD domain servers. Background Art
[0002] A domain is a basic unit that runs independently in a Windows network. To access each other, a trust relationship must be established. The domain serves as a security boundary. Active Directory (AD) is a centralized directory management service in Windows Server that is responsible for the architecture of large-scale network environments. The Active Directory service is a core component of the Windows platform. It provides a powerful means for users to manage the identities and relationships of the various components of the network environment.
[0003] In order to prevent a large number of users from accessing the AD domain, which would cause excessive access pressure on the AD domain and lead to system crashes on the AD domain server, testers usually use some specific tools to perform stress tests on the AD domain to determine the maximum number of users that can access the AD domain at the same time. AD domain stress tests generally use ADtest as a testing tool.
[0004] However, this tool only supports single IP testing, and cannot bind any IP address and port. It cannot concurrently log in multiple users with the same IP or a single user with multiple IPs. It is also impossible to test multiple users using the same IP or the same user using multiple different IPs. As a result, it is impossible to test the AD domain server for the above scenarios, resulting in the test results being not applicable. Summary of the invention
[0005] To solve the problem that the stress test of a single IP on the AD domain server is not applicable to the scenario of multiple IP logins.
[0006] In a first aspect, an embodiment of the present application provides a stress testing method for an AD domain server, the method comprising: creating at least one test IP and at least one test port at a test source;
[0007] Calling the initialization file of the protocol management library to initialize the AD domain server according to the initialization file, so that the test source establishes a connection with the AD domain server;
[0008] Calling the binding function file of the protocol management library, wherein the binding function file is used to bind the test IP and the test port;
[0009] Log in to the AD domain server at least once through the bound test IP and the test port, and obtain a login result, wherein the login result includes a successful login and a failed login;
[0010] The stress test result is calculated based on the number of test IPs that failed and / or successfully logged in in the login results.
[0011] In some embodiments, the method further comprises:
[0012] If the login result is successful, add the test IP and the corresponding bound test port, and log in to the AD domain server again;
[0013] If the login result is a login failure, the number of test IPs that are currently logged in is recorded, and the stress test result is obtained based on the number of test IPs.
[0014] In some embodiments, in the step of creating at least one test IP and at least one test port at the test source, the method further includes:
[0015] Creating a first number of the test IPs at the test source;
[0016] Add the test IP to the IP list of the test source;
[0017] A second number of test ports is generated according to the IP list by a random function; the second number is greater than or equal to the first number.
[0018] In some embodiments, before the step of creating a first number of the test IPs at the test source, the method further includes:
[0019] Initializing the IP list through the Dynamic Host Configuration Protocol;
[0020] The test IP is included in the non-local IP list of the IP list.
[0021] In some embodiments, the step of logging into the AD domain server at least once through the bound test IP and the test port further includes:
[0022] Randomly generate a corresponding username and test IP password according to the test IP;
[0023] Through the test port bound to the test IP, the user name and the test IP password are sequentially input into the login port of the AD domain server to log in to the AD domain server.
[0024] In some embodiments, in the step of logging into the AD domain server at least once through the bound test IP and the test port and obtaining the login result, the method further includes:
[0025] If the bound test IP and the test port log in to the AD domain server multiple times, obtain the login result each time;
[0026] Filter all login results to find the test IP addresses that have successfully logged in;
[0027] Record the login duration corresponding to the test IP that successfully logged in.
[0028] In some embodiments, the step of calculating the stress test result according to the number of test IPs that failed to log in and / or successfully logged in in the login result further includes:
[0029] Get the number of successful test IPs and the number of failed test IPs in all login results;
[0030] Calculate the login success rate based on the number of test IPs that successfully logged in and the number of test IPs that failed to log in;
[0031] The stress test result is calculated based on the login success rate.
[0032] In some embodiments, the method further comprises:
[0033] When the test IP logs out of the AD domain server, the logout duration of the test IP is recorded;
[0034] According to the duration threshold, filtering the number of delayed logout durations and the number of non-delayed logout durations from the logout durations;
[0035] The stress test result is corrected according to the ratio of the delayed logout duration to the non-delayed logout duration.
[0036] In some embodiments, after the step of calculating the stress test result according to the number of test IPs that failed to log in and / or successfully logged in in the login result, the method further includes:
[0037] Log out all the test IPs from the AD domain server;
[0038] Clear the IP list of the test source and delete the login traces of the test source.
[0039] In a second aspect, the present application further provides a stress testing system for an AD domain server, which is configured to perform any one of the stress testing methods for an AD domain server in the first aspect, wherein the system includes a testing module, and the testing module is configured to:
[0040] Creating at least one test IP and at least one test port at the test source;
[0041] Calling the initialization file of the protocol management library to initialize the AD domain server according to the initialization file, so that the test source establishes a connection with the AD domain server;
[0042] Calling the binding function file of the protocol management library, wherein the binding function file is used to bind the test IP and the test port;
[0043] Log in to the AD domain server at least once through the bound test IP and the test port, and obtain a login result, wherein the login result includes a successful login and a failed login;
[0044] The stress test result is calculated based on the number of test IPs that failed and / or successfully logged in in the login results.
[0045] It can be seen from the above scheme that the stress testing method and system of the AD domain server provided by the present application, by creating a test IP and a test port at the test source, and calling the initialization file of the protocol management library to initialize the AD domain server according to the initialization file, so that the test source is connected to the AD domain server. Then call the binding function file to bind the test IP and the test port, use the bound test IP and the test port to log in to the AD domain server, obtain the login result, and calculate the stress test result according to the number of test IPs that failed to log in and / or successfully logged in in the login result. The present application creates a certain amount of test IP and test port, logs in to the AD domain server after binding to achieve the purpose of stress testing the AD domain server, and can realize a multi-user multi-IP login mode, expand the multi-applicability of the test effect, and improve the compatibility of the AD domain server. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] In order to more clearly illustrate the technical solution of the present application, the drawings required for use in the embodiments are briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0047] Figure 1 This is a flowchart of a stress testing method for an AD domain server in an embodiment of the present application;
[0048] Figure 2 A flowchart for creating a test IP and a test port in an embodiment of the present application;
[0049] Figure 3 This is a flow chart of calculating the stress test result according to the login result in an embodiment of the present application;
[0050] Figure 4 This is a schematic diagram of options for testing IP login failure in an embodiment of the present application;
[0051] Figure 5 This is a flow chart of calculating the stress test results when testing multiple IP logins in an embodiment of the present application;
[0052] Figure 6 This is a flow chart of correcting stress test results based on logout duration in an embodiment of the present application. DETAILED DESCRIPTION
[0053] In order to make the purpose and implementation method of the present application clearer, the exemplary implementation method of the present application will be clearly and completely described below in conjunction with the drawings in the exemplary embodiments of the present application. Obviously, the described exemplary embodiments are only part of the embodiments of the present application, rather than all the embodiments.
[0054] It should be noted that the brief description of terms in this application is only for the convenience of understanding the embodiments described below, and is not intended to limit the embodiments of this application. Unless otherwise specified, these terms should be understood according to their common and usual meanings.
[0055] The terms "first", "second", "third", etc. in the specification and claims of this application and the above drawings are used to distinguish similar or similar objects or entities, and do not necessarily mean to limit a specific order or sequence, unless otherwise noted. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances.
[0056] The terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover but not exclude inclusion, for example, a product or device comprising a list of components is not necessarily limited to all the components expressly listed but may include other components not expressly listed or inherent to such product or device.
[0057] AD stands for Active Directory, which is responsible for the centralized directory management service of large-scale network environments. When users need to query information data in the active directory, they need to use their personal IP address to log in to the AD domain server. However, if a large number of users log in to the AD domain server at the same time, it will cause the AD domain server system to crash.
[0058] Therefore, before the AD domain server is enabled, testers usually use some specific tools to perform stress tests on the AD domain to determine the maximum number of users that can access the AD domain at the same time. AD domain stress tests generally use ADtest as a testing tool.
[0059] However, this tool only supports single IP testing, and cannot bind any IP address and port. It cannot concurrently log in multiple users with the same IP or a single user with multiple IPs. It is also impossible to test multiple users using the same IP or the same user using multiple different IPs. As a result, it is impossible to test the AD domain server for the above scenarios, resulting in the test results being not applicable.
[0060] In order to adapt to different scenarios, the AD server is tested, and the embodiment of the present application provides a stress testing method for the AD domain server, such as Figure 1 As shown, the method includes:
[0061] S100: Create a test IP and a test port at the test source;
[0062] In this embodiment, the test source can be any electronic device that can use the IP and the port corresponding to the IP to log in to the server, which can also be called a test device, for example, a mobile phone terminal or a computer terminal with a login program. The test IP is the IP that will test the AD domain server. The test port is used to connect to the login port of the AD domain server.
[0063] It should be noted that the AD domain server in the above embodiment has multiple login ports, and the user can use any test IP to bind to the test port and log in to the AD domain server through the login port. In some embodiments, a user can use only one test IP to log in to the AD domain server through different test devices. The same user can also use multiple test IPs to bind corresponding test ports and log in to the AD domain server.
[0064] Corresponding to the above login methods, the user can also create one or more test IPs and test ports according to the required number of test IPs and test ports. Figure 2 As shown, when multiple test IPs and test ports are created at the test source, the method further includes:
[0065] S101: Create a first number of the test IPs at the test source.
[0066] In this embodiment, the first number can be determined according to the number of users and the number of test IPs used by each user. For example, when there are 100 users testing the AD domain server at the same time, and each user uses one test IP, the first number is the total number of users, that is, 100. If each user uses 5 test IPs, the first number is the product of the total number of users and the number of test IPs used by each user, that is, 500.
[0067] In this embodiment, each user may also use a different number of test IPs, and in this case the first number may be the sum of the number of test IPs used by each user.
[0068] S102: Add the test IP to the IP list of the test source.
[0069] In the test source, there is an IP address local to the test source. In order to distinguish between the local IP and the test IP, the test source can read the IP list of the test source and divide the IP list of the test source into a local IP list and a non-local IP list, and then add all the test IPs to the non-local IP list.
[0070] Before adding the test IP to the non-local IP list, the tester can also initialize the IP list through the Dynamic Host Configuration Protocol and clear all IP addresses in the non-local IP list. The non-local IP list only contains the generated test IP, thereby improving the efficiency of AD domain server testing.
[0071] S103: Generate a second number of test ports through a random function according to the IP list.
[0072] In this embodiment, a second number of test ports is generated by a random function to ensure that the test ports are randomly generated, thereby improving the applicability of the scenario. In addition, in order to cope with the problem that when a test IP uses different test ports, there is no reserved test port, causing some test IPs to be unable to establish a connection with the AD domain server. Among them, the second number is greater than or equal to the first number, that is, the number of test ports needs to be greater than the number of test IPs to ensure that all test IPs can be bound to the test port.
[0073] In some embodiments, multiple test ports may be established according to each test IP. For example, three test ports, namely test port A, test port B and test port C, may be set according to the first test IP.
[0074] S200: calling the initialization file of the protocol management library to initialize the AD domain server according to the initialization file, so that the test source establishes a connection with the AD domain server.
[0075] In some embodiments, the protocol management library includes a variety of initialization files, which can perform different degrees of initialization on the AD domain server. Among them, different initialization files have different reset parameters for the AD domain server. After the AD domain server is initialized, in order to facilitate the test source to successfully log in to the AD domain server, it is also necessary to establish a connection between the test source and the AD domain server.
[0076] The protocol management library may include the Lightweight Directory Access Protocol (LDAP) protocol, which is a protocol used to access the directory database of the AD domain server.
[0077] Compared with relational databases (such as MySQL and Oracle), the directory database of the AD domain server organizes data in a tree structure, similar to a file directory. The directory database is optimized for query, browsing, and searching, so the LDAP protocol has a particularly strong read performance. Therefore, in order to access the directory database, the LDAP protocol is required as an implementation protocol.
[0078] S300: calling the binding function file of the protocol management library.
[0079] Wherein, the binding function file is used to bind the test IP and the test port. In this embodiment, the test source can use different test IPs to bind different test ports each time it logs in, or it can keep the same test port unchanged and change the test port that needs to be bound. After the test source uses the test IP and the corresponding bound test port to log in, when logging out, it can also call the unbinding function file of the protocol management library to unbind the test IP and the test port bound in step S300, so that the test IP can bind other test ports during the subsequent login process to achieve the purpose of diversified testing.
[0080] S400: Log in to the AD domain server at least once through the bound test IP and the test port, and obtain the login result.
[0081] The login result includes a successful login and a failed login. In this embodiment, if the test IP and the test port successfully log in to the AD domain server, the AD domain server can generate a corresponding login result, as well as the address of the backup test IP, and send the successful login result to the address of the corresponding test IP to prompt the test source corresponding to the test IP and the corresponding test port have successfully logged in to the AD domain server.
[0082] If the test IP and test port fail to successfully log in to the AD domain server, the AD domain server can generate a corresponding failed login result, as well as the address of the backup test IP, and send the failed login result to the address of the corresponding test IP to prompt that the test IP and the corresponding test port corresponding to the test source have failed to log in.
[0083] like Figure 4As shown, after obtaining the login result of failed login, the test source can display a prompt box for re-login, which includes a re-login option and a cancel login option. The user can enter a login instruction through the test source to indicate whether the test source should re-login the AD domain server.
[0084] It should be noted that when all bound test IPs and test ports log in successfully, it means that the login pressure of the AD domain server has not reached the test effect. At this time, you can also increase the test source or increase the number of test IPs to achieve the purpose of effectively testing the AD domain server.
[0085] S500: Calculate the stress test result according to the number of test IPs with failed and / or successful logins in the login results.
[0086] Figure 3 Flow chart for calculating stress test results. In this embodiment, the stress test results can be calculated by calculating the ratio of the number of IPs that successfully logged in to the total number of tested IPs in the login results to calculate the success rate. Alternatively, the ratio of the number of IPs that failed to log in to the total number of tested IPs in the login results to calculate the failure rate.
[0087] Each time you log in, the login result of the test IP may change according to the login pressure of the AD domain server. If there are fewer IPs currently logged in to the AD domain server and the login pressure is less than the pressure threshold, then the probability of successful login of the test IP will be greater than the probability of failed login. If the login pressure is greater than the pressure threshold, then the probability of successful login of the test IP will be less than the probability of failed login.
[0088] In order to more accurately obtain the stress test result of the AD domain server according to the login result, in some embodiments, the method further includes:
[0089] If the login result is successful, add the test IP and the corresponding bound test port, and log in to the AD domain server again.
[0090] In this embodiment, if the login result of the test IP is successful, it means that the maximum number of IP logins has not been reached in the AD domain server at this time. Therefore, it is necessary to add a test IP and the corresponding bound test port to test the AD domain server, and re-login using the test IP that successfully logged in to obtain the second login result.
[0091] If the login result is a login failure, it means that the number of IPs that have logged into the AD domain server has reached the maximum number of IP logins. At this time, it is necessary to record the number of test IPs that are currently logged in, and obtain the stress test result based on the number of test IPs.
[0092] In order to ensure that the test IP logs in under a safe network environment, in some embodiments, before executing step S400, the following steps may also be included:
[0093] A corresponding user name and test IP password are randomly generated according to the test IP. After the test source correctly connects to the login port of the AD domain server, it needs to use the randomly generated user name and the corresponding test IP password to log in to the AD domain server.
[0094] Through the test port bound to the test IP, enter the username and the test IP password in sequence into the login port of the AD domain server. The AD domain server will verify the test IP password based on the username. If the test IP password is correct, the AD domain server will generate a login permit and send it to the IP address corresponding to the test IP.
[0095] In some embodiments, the login permission can be set to a number of times. For example, in order to prevent the test IP from logging in maliciously multiple times, the login permission can be set to one time, and a new login permission will be generated when the test IP logs in next time. If a test IP wants to obtain a long-term login permission, such as a login permission for a preset number of times, it can also send an authorization request to the AD domain server, obtain the authorization result fed back by the AD domain server for the authorization request, and set the login permission of the test IP according to the result.
[0096] If the test IP password is incorrect, the AD domain server will generate an alarm message and send it to the IP address corresponding to the test IP, and block the login request from the test source.
[0097] In order to be able to count the login status of the test IP each time it logs into the AD domain server, in some embodiments, step S400 further includes:
[0098] Use the same bound test IP and test port to log in to the AD domain server multiple times and obtain the login results of each login.
[0099] There are successful logins and failed logins in the login results. In this embodiment, the test source will filter the test IPs with successful logins in all login results, and record the login time corresponding to the test IPs with successful logins. Based on the login time, the pressure status of the AD domain server is judged.
[0100] For example, the test source uses the same bound test IP and test port to log in to the AD domain server 30 times, of which 10 login results are successful and 20 login results are failed. The test source will record the login duration of each of the 10 successful logins and compare them according to the login duration threshold. The login duration threshold is the login duration of a normal IP when the AD domain server is under normal pressure. If the login duration exceeds the duration threshold, it means that the AD domain server is under too much pressure. If the login duration is less than or equal to the login duration threshold, it means that the AD domain server is under moderate pressure. The test source can use this to calculate the maximum number of IP logins when the AD domain server is overloaded.
[0101] The test source can also calculate the stress test result by counting the number of failed login results and calculating the ratio. Figure 5 As shown, step S500 may also include:
[0102] S501: Obtain the number of test IPs with successful logins and the number of test IPs with failed logins in all login results.
[0103] In this embodiment, all test IPs can be logged into the AD domain server in batches, for example, a total of 30 test IPs can be evenly divided into three groups, each with 10. The test source can record the login results in batches and obtain the login results in batches, for example, four successful logins and six failed logins in the first batch.
[0104] After counting the login results of the first batch of test IPs, the test source can log out of the AD domain server with the successfully logged in test IP, or keep the successfully logged in test IP and continue to test the next batch of test IPs, and so on, until the last batch of test IPs is tested.
[0105] S502: Calculate the login success rate according to the number of the test IPs that successfully logged in and the number of the test IPs that failed to log in.
[0106] In this embodiment, the test source can calculate the login success rate in batches. For example, after counting the login results of the first batch, the first login success rate of the first batch is calculated, and the second success rate of the second batch is calculated according to the login results of the second batch, and so on. Finally, the login success rate of all test IPs is calculated according to the login success rate of each batch.
[0107] S503: Calculate the stress test result according to the login success rate.
[0108] In this embodiment, the higher the login success rate, the easier it is for the test IP to log in to the AD domain server, and the lower the pressure level of the AD domain server. The lower the login success rate, the more difficult it is for the test IP to log in to the AD domain server, and the higher the pressure level of the AD domain server.
[0109] When the test IP logs in multiple times, it is also necessary to log out of the test IP. Therefore, in addition to the login status of the test IP, the stress test results can also be adjusted by the length of time the test IP is logged out. Figure 6 In some embodiments, the method further comprises:
[0110] When the test IP logs out of the AD domain server, the logout duration of the test IP is recorded. In this embodiment, the subject that performs the logout is the test source, and the test source sends a logout request to the AD domain server. The timing starts after the AD domain server receives the logout request, and stops after the test IP logs out of the AD domain server.
[0111] After recording the logout duration, the test source can also filter the number of delayed logout durations and the number of non-delayed logout durations from the logout duration according to the duration threshold; the delayed logout duration is the logout duration whose duration exceeds the duration threshold, and the non-delayed logout duration is the logout duration whose duration does not exceed the duration threshold.
[0112] The test source can correct the obtained stress test results according to the ratio of the delayed logout duration to the non-delayed logout duration to make the stress test solution more accurate.
[0113] In order to facilitate the use of the AD domain server after the test, in some embodiments, after step S500, all test IPs can also be logged out of the AD domain server, and the IP list of the test source can be cleared, or only the local IP of the test source can be retained and the test IP can be deleted. After clearing the test IP, the test source can delete the login trace of the test source to restore the AD domain server and bring the AD domain server to an initial state.
[0114] In order to better perform the above-mentioned stress testing method for the AD domain server, some embodiments of the present application further provide a stress testing system for the AD domain server, the system comprising a testing module, and the testing module is configured as follows:
[0115] Creating at least one test IP and at least one test port at the test source;
[0116] Calling the initialization file of the protocol management library to initialize the AD domain server according to the initialization file, so that the test source establishes a connection with the AD domain server;
[0117] Calling the binding function file of the protocol management library, wherein the binding function file is used to bind the test IP and the test port;
[0118] Log in to the AD domain server at least once through the bound test IP and the test port, and obtain a login result, wherein the login result includes a successful login and a failed login;
[0119] The stress test result is calculated based on the number of test IPs that failed and / or successfully logged in in the login results.
[0120] It can be seen from the above scheme that the stress testing method and system of the AD domain server provided by the present application, by creating a test IP and a test port at the test source, and calling the initialization file of the protocol management library to initialize the AD domain server according to the initialization file, so that the test source is connected to the AD domain server. Then call the binding function file to bind the test IP and the test port, use the bound test IP and the test port to log in to the AD domain server, obtain the login result, and calculate the stress test result according to the number of test IPs that failed to log in and / or successfully logged in in the login result. The present application creates a certain amount of test IP and test port, logs in to the AD domain server after binding to achieve the purpose of stress testing the AD domain server, and can realize a multi-user multi-IP login mode, expand the multi-applicability of the test effect, and improve the compatibility of the AD domain server.
[0121] Those skilled in the art can clearly understand that the technology in the embodiments of the present invention can be implemented by means of software plus a necessary general hardware platform. Based on such an understanding, the technical solution in the embodiments of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which can be stored in a computer-readable storage medium.
[0122] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
[0123] For the convenience of explanation, the above description has been made in conjunction with specific embodiments. However, the above exemplary discussion is not intended to be exhaustive or limit the embodiments to the specific forms disclosed above. Based on the above teachings, various modifications and variations can be obtained. The selection and description of the above embodiments are intended to better explain the present disclosure, so that those skilled in the art can better use the embodiments.
Claims
1. A stress testing method for an AD domain server, characterized in that: The method comprises: Creating at least one test IP and at least one test port at the test source; Calling the initialization file of the protocol management library to initialize the AD domain server according to the initialization file, so that the test source establishes a connection with the AD domain server; Calling the binding function file of the protocol management library, wherein the binding function file is used to bind the test IP and the test port; The corresponding user name and test IP password are randomly generated through the bound test IP; Through the test port bound to the test IP, the user name and the test IP password are sequentially input into the login port of the AD domain server, so that the AD domain server verifies the test IP password according to the user name and obtains the login result, which includes login success and login failure; If the test IP password is correct, obtain a successful login result, and obtain a login license sent by the AD domain server to the test IP, wherein the login license includes a number of uses, and the number of uses is obtained by sending an authorization request to the AD domain server; Calculate the stress test result based on the number of test IPs that failed to log in and / or successfully logged in in the login result; If the bound test IP and test port log in to the AD domain server multiple times, then obtain the test IP that successfully logs in; Record the login duration corresponding to the test IP that successfully logged in; If the login duration is greater than the login duration threshold, outputting a first stress test result; If the login duration is less than or equal to the login duration threshold, the second stress test result is output.
2. The stress testing method for an AD domain server according to claim 1, characterized in that: The method further comprises: If the login result is successful, add the test IP and the corresponding bound test port, and log in to the AD domain server again; If the login result is a login failure, the number of test IPs that are currently logged in is recorded, and the stress test result is obtained based on the number of test IPs.
3. The stress testing method for an AD domain server according to claim 1, characterized in that: In the step of creating at least one test IP and at least one test port at the test source, the method further comprises: Creating a first number of the test IPs at the test source; Add the test IP to the IP list of the test source; A second number of test ports is generated according to the IP list by a random function; the second number is greater than or equal to the first number.
4. The stress testing method for an AD domain server according to claim 3, characterized in that: Before the step of creating a first number of the test IPs at the test source, the method further comprises: Initializing the IP list through the Dynamic Host Configuration Protocol; The test IP is included in the non-local IP list of the IP list.
5. The stress testing method for an AD domain server according to claim 1, characterized in that: The step of calculating the stress test result according to the number of test IPs that failed to log in and / or successfully logged in in the login result also includes: Get the number of test IPs that successfully logged in and the number of test IPs that failed to log in among all login results; Calculate the login success rate based on the number of test IPs that successfully logged in and the number of test IPs that failed to log in; The stress test result is calculated based on the login success rate.
6. The stress testing method for an AD domain server according to claim 1, characterized in that: The method further comprises: When the test IP logs out of the AD domain server, the logout duration of the test IP is recorded; According to the duration threshold, filtering the number of delayed logout durations and the number of non-delayed logout durations from the logout durations; The stress test result is corrected according to the ratio of the delayed logout duration to the non-delayed logout duration.
7. The stress testing method for an AD domain server according to claim 1, characterized in that: After the step of calculating the stress test result according to the number of test IPs that failed to log in and / or successfully logged in in the login result, the method further includes: Log out all the test IPs from the AD domain server; Clear the IP list of the test source and delete the login traces of the test source.
8. A stress testing system for an AD domain server, characterized in that: The system includes a test module configured to: Creating at least one test IP and at least one test port at the test source; Calling the initialization file of the protocol management library to initialize the AD domain server according to the initialization file, so that the test source establishes a connection with the AD domain server; Calling the binding function file of the protocol management library, wherein the binding function file is used to bind the test IP and the test port; The corresponding user name and test IP password are randomly generated through the bound test IP; Through the test port bound to the test IP, the user name and the test IP password are sequentially input into the login port of the AD domain server, so that the AD domain server verifies the test IP password according to the user name and obtains the login result, which includes login success and login failure; If the test IP password is correct, obtain a successful login result, and obtain a login license sent by the AD domain server to the test IP, wherein the login license includes a number of uses, and the number of uses is obtained by sending an authorization request to the AD domain server; Calculate the stress test result based on the number of test IPs that failed to log in and / or successfully logged in in the login result; If the bound test IP and test port log in to the AD domain server multiple times, then obtain the test IP that successfully logs in; Record the login duration corresponding to the test IP that successfully logged in; If the login duration is greater than the login duration threshold, outputting a first stress test result; If the login duration is less than or equal to the login duration threshold, the second stress test result is output.
Citation Information
Patent Citations
Robot system and realization method, client sides and servers thereof and game system
CN105704166A