Domain control system server upgrade test method, device, medium and product

A method for simulating data and conducting scripted tests addresses the challenges of inconsistent functions and instability in domain control system server upgrades, ensuring data consistency and system stability.

CN118860451BActive Publication Date: 2024-12-27KYLIN CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411345349.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-26
Publication Date
2024-12-27
Estimated Expiration
2044-09-26

AI Technical Summary

Technical Problem

The domain control system server upgrade process faces challenges such as insufficient test data, inconsistent functions, data loss, and system instability, leading to user data loss and disrupted business operations.

Method used

A method involving simulated data creation, scripted migration and verification, scenario testing, and performance stability testing to ensure a smooth upgrade process.

Benefits of technology

The method enables comprehensive testing, ensuring data consistency and system stability, reducing the risk of user data loss and business disruption during upgrades.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118860451B_ABST
    Figure CN118860451B_ABST
Patent Text Reader

Abstract

This invention provides a method, apparatus, medium, and product for testing domain controller system server upgrades, including: constructing simulated existing data before the domain controller system upgrade; upgrading the domain controller system server and migrating and verifying the simulated existing data through scripting; determining the scope of scenario testing; conducting scenario testing after the domain controller system server upgrade based on the simulated existing data; analyzing and determining the core business scope and performance indicator requirements; and conducting performance stability testing after the domain controller system server upgrade. This invention solves a series of problems such as insufficient test data for domain controller system server upgrades, inconsistent functions after the upgrade, data loss after the upgrade, and system instability after the upgrade, ensuring the quality of the domain controller system server upgrade process and successfully helping users upgrade.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of domestic operating systems, and specifically relates to a testing method for upgrading a domain control system itself and migrating data after the upgrade. Background Art

[0002] In the previous domain control system server upgrade test process, due to the many functional differences between the old and new systems, the upgrade test process was complicated and easy to miss tests.

[0003] Specifically, the domain control system server upgrade test has the following problems:

[0004] 1) Insufficient test data for domain control system server upgrade;

[0005] 2) The functions of the domain control system server are inconsistent after the upgrade;

[0006] 3) Data is lost after the domain control system server is upgraded;

[0007] 4) The system becomes unstable after the domain control system server is upgraded.

[0008] The above problems will cause the loss of user data due to the upgrade of the online business, and the business work cannot be carried out normally, thus affecting the business revenue of the user unit, so it is urgent to solve these problems. Summary of the invention

[0009] The purpose of the present invention is to provide a domain control system server upgrade test method, device, medium and product to solve a series of problems such as insufficient domain control system server upgrade test data, inconsistent functions after upgrade, data loss after upgrade, and system instability after upgrade, so as to ensure the quality of the domain control system server upgrade process and smoothly help users successfully upgrade.

[0010] In order to achieve the above object, the technical solution of the present invention is as follows:

[0011] A domain control system server upgrade test method, comprising:

[0012] S1: Build simulated stock data before domain control system upgrade;

[0013] S2: Upgrade the domain control system server and complete the migration and verification of simulated stock data through scripting;

[0014] S3: Determine the scope of scenario testing, and perform a scenario test after the domain control system server upgrade based on the simulated stock data;

[0015] S4: Analyze and determine the core business scope and performance indicator requirements, and conduct performance stability testing after the domain control system server is upgraded.

[0016] Furthermore, step S1 specifically includes:

[0017] S101, deployment of the old domain control system server environment;

[0018] S102, organization data simulation: import the organization data generated by simulation in advance into the old domain control system server through the BIN executable file to simulate the user's stock data;

[0019] S103, terminal data simulation: import the terminal data generated by simulation in advance into the old domain control system server through the BIN executable file;

[0020] S104, user data simulation: simulate the association relationship between the organization, terminal, and user through the jmeter script file, and add simulated user data associated with the organization data and terminal data in batches on the old domain control system server;

[0021] S105, log data simulation: Generate various logs through Python script simulation and import them into the old domain control system server in batches.

[0022] Furthermore, step S3 specifically includes:

[0023] S301. Determine the scope of scenario testing: retrieve the number of times each business interface appears in the log through the customer's log, sort all business interface modules, select the interface modules with the highest ranking as core interface modules, and extract the test scenarios of each core interface module based on the distribution of external bugs of the product, and finally form a scenario test set;

[0024] S302. According to the scenario test set, test is performed based on the simulated stock data.

[0025] Further, step S4 includes:

[0026] S401. Analyze and determine the core business scope: select the core business of performance testing according to the test point selection principle;

[0027] S402, core business performance index test: According to user needs and related design requirements, sort out the index requirements of core business and conduct performance testing;

[0028] S403, key hardware performance indicator test: When each business is performing performance testing, monitor whether the CPU and memory of the cluster's master node, node node, and the server where the radius server is located are within a reasonable range;

[0029] S404, business concurrency test: Use the number of threads in jmeter to simulate the number of users, and adjust the number of threads to perform instantaneous concurrency. Test the maximum TPS of the business at a reasonable response time to estimate whether the business meets the specified performance indicators.

[0030] S405, business stress test: Get the maximum TPS of each business based on the business concurrency test, continue to run concurrently for a period of time, and find out whether the period stress test is a bottleneck. Continuously adjust the concurrency value to obtain the bottleneck value and the number of requests that can be processed when the bottleneck occurs, so as to estimate whether the business demand indicators can be met.

[0031] Another aspect of the present invention provides a domain control system server-side upgrade test device, comprising:

[0032] Data simulation module: builds simulated stock data before the domain control system is upgraded;

[0033] Upgrade module: upgrade the domain control system server and complete the migration and verification of simulated stock data through scripting;

[0034] Scenario testing module: determining the scope of scenario testing, and performing a scenario test after the domain control system server upgrade based on the simulated stock data;

[0035] Business testing module: Analyze and determine the core business scope and performance indicator requirements, and conduct performance stability testing after the domain control system server is upgraded.

[0036] Furthermore, the data simulation module includes:

[0037] Environment deployment unit: old domain control system server environment deployment;

[0038] Organization data unit: Organization data simulation, importing the organization data generated by simulation in advance into the old domain control system server through the BIN executable file to simulate the user's stock data;

[0039] Terminal data unit: terminal data simulation, importing the terminal data generated by simulation in advance into the old domain control system server through the BIN executable file;

[0040] User data unit: User data simulation, using jmeter script files to simulate the relationship between organizations, terminals, and users, and batch adding simulated user data associated with organization data and terminal data on the old domain control system server;

[0041] Log data unit: Log data simulation, generates various logs through Python script simulation, and imports them into the old domain control system server in batches.

[0042] Furthermore, the scenario testing module includes:

[0043] Scenario test scope unit: Determine the scenario test scope: retrieve the number of times each business interface appears in the log through the customer's log, sort all business interface modules, select the interface modules with the highest ranking as the core interface modules, and extract the test scenarios of each core interface module based on the distribution of external bugs of the product, and finally form a scenario test set;

[0044] Scenario testing unit: performs testing based on the simulated stock data according to the scenario testing set.

[0045] Furthermore, the business testing module includes:

[0046] Analysis and selection unit: Analyze and determine the core business scope, and select the core business of performance testing according to the test point selection principle;

[0047] Performance indicator unit: core business performance indicator testing, sort out the indicator requirements of core business according to user needs and related design requirements, and conduct performance testing;

[0048] Hardware indicator unit: key hardware performance indicator test. When each business is performing performance testing, monitor whether the CPU and memory of the cluster's master node, node node, and the server where the radius server is located are within a reasonable range;

[0049] Concurrency test unit: Business concurrency test, using the number of threads in jmeter to simulate the number of users, and continuously adjusting the number of threads for instantaneous concurrency to test the maximum TPS of the business at a reasonable response time to estimate whether the business meets the specified performance indicators;

[0050] Stress testing unit: Business stress testing, based on business concurrency testing, obtains the maximum TPS of each business, continues to run concurrently for a period of time, and determines whether the stress test during the period is a bottleneck. The concurrency value is continuously adjusted to obtain the bottleneck value and the number of requests that can be processed when the bottleneck occurs, so as to estimate whether the business demand indicators can be met.

[0051] The present invention also provides a computer-readable storage medium, wherein the storage medium stores a computer program, and the computer program is used to execute the above-mentioned domain control system server-based upgrade test method.

[0052] The present invention also provides a computer program product, including a computer program, and when the computer program is executed by a processor, the above-mentioned domain control system server-based upgrade test method is implemented.

[0053] Compared with the prior art, the present invention has the following beneficial effects:

[0054] 1) The present invention can simulate user data volumes up to tens of thousands, which is more in line with the user's on-site environment and helps testers find problems to a greater extent;

[0055] 2) The present invention checks whether the data before and after the upgrade are consistent in a scripted manner, helping testers to find problems more efficiently and accurately;

[0056] 3) The scenario test case set of the present invention is objectively formed by analyzing a large number of user problems and usage habits, so that the focus of the tester can better match the focus of the user, thereby discovering more user concerns in advance internally;

[0057] 4) The present invention adopts the core function selection principle to reasonably select the core function points that need to be paid attention to in performance testing and formulate performance indicators. And formulate corresponding scripts through Jmeter to facilitate testers to quickly determine whether the performance and stability meet the standards. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] Figure 1 is a method flow chart of an embodiment of the present invention;

[0059] Figure 2 It is a flow chart of constructing simulated inventory data according to an embodiment of the present invention. DETAILED DESCRIPTION

[0060] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments may be combined with each other.

[0061] The present invention will be further described below in conjunction with the accompanying drawings and specific embodiments.

[0062] The present invention provides a method for testing the upgrade of a domain control system server. Figure 1 As shown, the method comprises the following steps:

[0063] S1: Build simulated stock data before the domain control system is upgraded;

[0064] 1) Deployment of the old domain control system server environment;

[0065] Build the old domain control system server environment according to the deployment manual;

[0066] 2) Construct simulated stock data;

[0067] Construct a script to simulate stock data. The simulated stock data can simulate the status of the user's use of the platform and generate some process data, making the test environment closer to the user's use environment, assisting testers to find problems in the test environment in advance, and reducing the occurrence of quality problems in the production environment. In order to simulate the above stock data, the following Organize-data.BIN, terminal_host.BIN, addTerminalUser.jmx, Journal_data.py related data files and scripts are developed and designed. The functions of each file are as follows:

[0068] Organize-data.BIN is an executable file. In this embodiment, the file contains 170,000 organizational data and 8 organizational levels generated in advance. This file is mainly used to import these 170,000 organizational data into the organizational data of the old domain control system server to simulate the existing data of the organization. Execute Organize-data.BIN on the old domain control system server to import 170,000 organizational data.

[0069] Terminal_host.BIN is an executable file. This embodiment contains 6000 simulated terminal data in this file. Each terminal data has host name, IP, online login time, and Mac address related information. This file is mainly used to import these 6000 terminal data into the terminal data of the old domain control system server. Execute terminal_host.BIN on the server to import 6000 terminal data.

[0070] Since user data needs to be associated with the organization data and terminal data, it is difficult to achieve using ordinary scripts or files. In this embodiment, the Jmeter tool is used to simulate the association between the organization, terminal, and user, thereby formulating the jmeter script file addTerminalUser.jmx. By executing this script file, users can be added in batches, and the association between the organization data and terminal data previously built separately can be linked together to form the association between the data. Through this file, 200,000 user data are generated, and these data are well associated with the organization data and terminal data. Each piece of data contains user group structure, disabled users, enabled users, ordinary permission users, and sudo permission users.

[0071] Considering that there are many types of logs that need to be generated and copied to the corresponding database, and the database for the domain management platform log management is not MySQL, a python script file Journal_data.py is developed to simulate the generation of various logs. Executing the Journal_data.py script can batch import logs, including USB copy, network access, software installation, peripheral use, administrator, and compliance check logs. There are an average of 200,000 records in various logs.

[0072] The above data to be imported are generated by scripts and files according to the characteristics of each type. The flowchart of constructing data is as follows Figure 2 shown.

[0073] S2: Domain control system server upgrade and data verification;

[0074] 1) Export the old domain control system server environment data:

[0075] Upload the upgrade script;

[0076] Execute the backup script: Execute the script bash kcm_backup.sh | tee backup.log to export. After the export is complete, check whether the backup file is generated normally in the backup directory. The kcm_backup.sh script is used to copy and backup the mysql, es, and redis database files to the specified path respectively to prevent the upgrade from failing. The data can also be rolled back to the state before the upgrade.

[0077] 2) Build a new domain control system server environment:

[0078] Build a new domain control system server environment according to the deployment manual;

[0079] 3) Execute the data migration script to migrate the data of the old domain control system server environment to the new domain control system server environment:

[0080] Copy the backup file: Copy the backup-datetime.tar.gz file backed up on the old domain control system server environment to the master node server in the new domain control system server environment, decompress it, and enter the decompressed directory.

[0081] Execute the script to migrate data: Execute the script bash kcm_restore.sh | tee restore.log to migrate data and observe whether there are obvious errors during the migration process. kcm_restore.sh is used to store the data in the mysql, es, and redis database files according to the upgraded new table structure.

[0082] Switch domain name resolution: modify the domain name resolution of the DNS server and resolve the domain name of the domain controller to the new domain controller system server environment.

[0083] 4) After the server upgrade is completed, compare the data of the organizational structure, user management, terminal host, policy management, software management, task management, audit management, reports, cascade configuration, AD domain configuration and synchronization, activation management, configuration center and other modules between the new and old systems to see if they are consistent:

[0084] Use "SHOW CREATE TABLE table_name" to check whether the table structure of the organization, terminal, user, and log table is correct. If it is correct, then use "SELECT * FROM table_name_a MINUS SELECT * FROMtable_name_b; SELECT * FROM table_name_b MINUS SELECT * FROM table_name_a" to check whether the data of the organization, terminal, user, and log table is as expected. When the return value of the select statement is empty, the data is correct. Finally, it can be confirmed whether the stock data constructed in step S1 has been successfully migrated.

[0085] The data verification method here is different from the data migration in S2. Data migration mainly constructs the table structure of the upgraded system and then fills in the data. Data verification, on the other hand, compares the actual table with the sample table.

[0086] Verify whether the linkage function between the client and the server module is normal and available.

[0087] S3: Scenario test after the domain control system server is upgraded;

[0088] The purpose of scenario testing after the domain control system server is upgraded is to ensure that the core functions of the domain control system and the user's newer functions can operate normally after the server is upgraded.

[0089] 1) Determine the scope of scenario testing:

[0090] Through the customer's log, retrieve the number of times the business interface appears in the log, sort all the core interfaces, select the top 10 most active interface modules, and then extract the test scenarios of each module from the user's feedback, and finally form a scenario test set (test case set). The following are examples of interfaces that need to be retrieved:

[0091]

[0092] 2) Execute scenario test:

[0093] Perform the scenario test after the upgrade and record the test results. According to the scenario test set, the scenario test can include: organization management, user management, terminal host, task management, software management, policy management, synchronization and cascading, log and report, activation management, system management, server disaster recovery and related module testing. The scenario test after the upgrade confirms as efficiently as possible whether the core functions of the upgraded domain controller and the functions that users are most concerned about can be used normally. The following is an example of the scope of scenario testing:

[0094]

[0095] S4: Performance stability test after domain control system server upgrade;

[0096] 1) Analyze and determine the core business scope:

[0097] According to the following test point selection principles, log reporting, heartbeat, policy issuance, and user login are selected as the core businesses of performance testing.

[0098] a. Core business module: the core business module determined during the product requirements discussion;

[0099] b. Business modules with high concurrency: Search the number of times the business interface appears in the customer's log, sort all core interfaces, and select the top 5 interface modules. The list of interfaces to be searched is as follows:

[0100]

[0101] c. Business modules with more complex logic: Modules with more than 5 paths in the design process are more complex logic modules.

[0102] d. Modules with complex database operations or transactions: Use "SHOW CREATE TABLE table_name" to view each database table. If the table structure has more than 10 attributes, it is a complex database operation.

[0103] e. Modules with frequent disk read and write operations: Capture 24-hour resource monitoring status when the business is running to see which processes consume more resources.

[0104] 2) Core business performance indicator testing;

[0105] According to user needs and related design requirements, such as: the number of user terminals is 20,000, the minute-level peak login users account for 50% of the total number of users, and the terminal control client sends a heartbeat request every 30 seconds to obtain the latest strategy. For example:

[0106] 2.1 For user login:

[0107] It is estimated that the number of users logging in at the minute peak level accounts for 50% of the total number of users. The total number of terminals is 20,000, and the calculation based on the concurrency at the second level gives the following results:

[0108] TPS = (20000*50%) / 60=166;

[0109] 2.2 Regarding policy delivery and heartbeat:

[0110] Based on the scale of 20,000 terminals, the terminal control client sends a heartbeat request every 30 seconds to obtain the latest policy. Based on the concurrency calculation at the second level, the following results are obtained:

[0111] TPS = 200000 / 30≈666;

[0112] 2.3 Log Collection:

[0113] Client log reporting uses configurable parameters to set the upload frequency and upload method (the default data packet reaches 20k or 15 minutes) to report logs. The log reporting is estimated based on 20,000 terminals, and the following results are obtained:

[0114] TPS = 20000 / 900≈23;

[0115] According to the above calculation method, the following indicators are finally sorted out:

[0116]

[0117] Use Jmeter to perform 5-minute performance tests on 20,000 concurrent core business interfaces for log reporting, heartbeat, policy delivery, and user login to verify whether the response success rate, TPS, and RT / ART indicators meet the standards.

[0118] 3) Key hardware performance indicator testing;

[0119] When performing performance testing on each service, it is necessary to monitor whether the CPU and memory of the cluster's master node, node node, and the server where the radius server is located are within a reasonable range. The memory and CPU indicators of the master node, node node, and radius server are as follows:

[0120]

[0121] 4) Business concurrency testing;

[0122] Use the number of threads in jmeter to simulate the number of users, and adjust the number of threads for instantaneous concurrency to test the maximum TPS of the business at a reasonable response time to estimate whether the business meets the specified performance indicators.

[0123] 5) Business stress testing.

[0124] Based on the concurrency test, the maximum TPS of each business is obtained. The concurrency is continued for 30 minutes to determine whether the 30-minute stress test is a bottleneck. The concurrency value is continuously adjusted to obtain the bottleneck value and the number of requests that can be processed when the bottleneck occurs, thereby estimating whether the business demand indicators can be met.

[0125] The above-mentioned embodiments are only preferred implementations of the present invention, and are only used to help understand the method and core ideas of the present application. The protection scope of the present invention is not limited to the above-mentioned embodiments. All technical solutions under the idea of ​​the present invention belong to the protection scope of the present invention. It should be pointed out that for ordinary technicians in this technical field, some improvements and modifications without departing from the principle of the present invention should also be regarded as the protection scope of the present invention.

Claims

1. A domain control system server upgrade test method, characterized in that: include: S1: Build simulated stock data before domain control system upgrade; S2: Upgrade the domain control system server and complete the migration and verification of simulated stock data through scripting; S3: Determine the scope of scenario testing, and perform a scenario test after the domain control system server upgrade based on the simulated stock data; S4: Analyze and determine the core business scope and performance indicator requirements, and conduct performance stability tests after the domain control system server is upgraded; Step S1 specifically includes: S101, deployment of the old domain control system server environment; S102, organization data simulation: import the organization data generated by simulation in advance into the old domain control system server through the BIN executable file to simulate the user's stock data; S103, terminal data simulation: import the terminal data generated by simulation in advance into the old domain control system server through the BIN executable file; S104, user data simulation: simulate the association relationship between the organization, terminal, and user through the jmeter script file, and add simulated user data associated with the organization data and terminal data in batches on the old domain control system server; S105, log data simulation: Generate various logs through Python script simulation and import them into the old domain control system server in batches; Step S3 specifically includes: S301. Determine the scope of scenario testing: retrieve the number of times each business interface appears in the log through the customer's log, sort all business interface modules, select the top interface modules as core interface modules, and extract the test scenarios of each core interface module based on the distribution of external bugs of the product, and finally form a scenario test set; S302. According to the scenario test set, test is performed based on the simulated stock data.

2. The domain control system server upgrade test method according to claim 1, characterized in that: Step S4 includes: S401. Analyze and determine the core business scope: select the core business of performance testing according to the test point selection principle; S402, core business performance index test: According to user needs and related design requirements, sort out the index requirements of core business and conduct performance testing; S403, key hardware performance indicator test: When each business is performing performance testing, monitor whether the CPU and memory of the cluster's master node, node node, and the server where the radius server is located are within a reasonable range; S404, business concurrency test: Use the number of threads in jmeter to simulate the number of users, and adjust the number of threads to perform instantaneous concurrency. Test the maximum TPS of the business at a reasonable response time to estimate whether the business meets the specified performance indicators. S405, business stress test: Get the maximum TPS of each business based on the business concurrency test, continue to run concurrently for a period of time, and find out whether the period stress test is a bottleneck. Continuously adjust the concurrency value to obtain the bottleneck value and the number of requests that can be processed when the bottleneck occurs, so as to estimate whether the business demand indicators can be met.

3. A domain control system server upgrade test device, characterized in that: include: Data simulation module: builds simulated stock data before the domain control system is upgraded; Upgrade module: upgrade the domain control system server and complete the migration and verification of simulated stock data through scripting; Scenario testing module: determining the scope of scenario testing, and performing a scenario test after the domain control system server upgrade based on the simulated stock data; Business testing module: Analyze and determine the core business scope and performance indicator requirements, and conduct performance stability testing after the domain control system server is upgraded; The data simulation module includes: Environment deployment unit: old domain control system server environment deployment; Organization data unit: Organization data simulation, importing the organization data generated by simulation in advance into the old domain control system server through the BIN executable file to simulate the user's stock data; Terminal data unit: terminal data simulation, importing the terminal data generated by simulation in advance into the old domain control system server through the BIN executable file; User data unit: User data simulation, using jmeter script files to simulate the relationship between organizations, terminals, and users, and batch adding simulated user data associated with organization data and terminal data on the old domain control system server; Log data unit: log data simulation, generate various logs through Python script simulation, and import them into the old domain control system server in batches; The scenario testing module includes: Scenario test scope unit: Determine the scenario test scope: retrieve the number of times each business interface appears in the log through the customer's log, sort all business interface modules, select the top few interface modules as core interface modules, and extract the test scenarios of each core interface module based on the distribution of external bugs of the product, and finally form a scenario test set; Scenario testing unit: performs testing based on the simulated stock data according to the scenario testing set.

4. The domain control system server upgrade test device according to claim 3, characterized in that: Business testing modules include: Analysis and selection unit: Analyze and determine the core business scope, and select the core business of performance testing according to the test point selection principle; Performance indicator unit: core business performance indicator testing, sort out the indicator requirements of core business according to user needs and related design requirements, and conduct performance testing; Hardware indicator unit: key hardware performance indicator test. When each business is performing performance testing, monitor whether the CPU and memory of the cluster's master node, node node, and the server where the radius server is located are within a reasonable range; Concurrency test unit: Business concurrency test, using the number of threads in jmeter to simulate the number of users, and continuously adjusting the number of threads for instantaneous concurrency to test the maximum TPS of the business at a reasonable response time to estimate whether the business meets the specified performance indicators; Stress testing unit: Business stress testing, based on business concurrency testing, obtains the maximum TPS of each business, continues to run concurrently for a period of time, and determines whether the stress test during the period is a bottleneck. The concurrency value is continuously adjusted to obtain the bottleneck value and the number of requests that can be processed when the bottleneck occurs, so as to estimate whether the business demand indicators can be met.

5. A computer-readable storage medium storing a computer program, characterized in that: The computer program is used to execute the domain control system server upgrade test method as described in any one of claims 1-2.

6. A computer program product comprising a computer program, characterized in that When the computer program is executed by the processor, the domain control system server upgrade test method according to any one of claims 1 to 2 is implemented.