DNS Automation Performance Testing Method, Device, Equipment and Readable Storage Medium
Through the data-driven DNS automation performance testing method, using parameterized combinations and preset data query functions, test files are automatically generated and stored in the blockchain, solving the problem of inefficient DNS performance testing and achieving efficient DNS performance testing.
Patent Information
- Application Number
- CN202010793590.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-08-07
- Publication Date
- 2025-07-22
- Estimated Expiration
- 2040-08-07
AI Technical Summary
The existing DNS performance testing methods are inefficient, manual operations are cumbersome, automated script maintenance costs are high, and data collection is cumbersome.
Parameterized combination is performed through data-driven methods, and the domain name resolution request is automatically simulated using preset data query functions, DNS performance test files are generated, and stored in the blockchain to separate the test data from business logic, and reduce manual preparation of duplicate data file operations.
It saves time and labor costs for large-scale multi-scenario DNS performance testing, improves testing efficiency, reduces code maintenance difficulty, and achieves efficient performance testing.
Smart Images

Figure CN111930621B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of computer networks, and particularly to a DNS automated performance testing method, device, equipment, and computer-readable storage medium. Background Art
[0002] The Domain Name System (DNS) enables enterprises and developers to convert domain names that are easy to manage and identify into digital IP addresses used by computers for interconnection and communication, and provides a global load balancing function for the high availability of Internet applications. Therefore, it is quite important to ensure the high availability of DNS services. When performing performance testing on DNS, open-source tools are usually used to simulate real user behaviors and conduct a large number of DNS domain name resolution requests. During the stress testing process, it is necessary to simulate the performance of a large number of multi-scenario DNSs, such as simulating different numbers of concurrent user requests, different resolution request durations, different domain name resolutions, and sub-domain name resolutions of different record types. Generally speaking, comprehensive performance testing of DNS products requires testing dozens or even hundreds of scenarios.
[0003] When conducting a large number of multi-scenarios, if traditional manual operation of tools for stress testing is used, it is obviously unrealistic, not only with single and cumbersome operations. If general automated scripts are used, each scenario corresponds to an automated script, and such a large number of scripts will undoubtedly increase the costs of script maintenance and development, and the scripts for each scenario are independent, and the operation of collecting and summarizing data is still cumbersome. All the above situations reflect the problem of low testing efficiency of existing DNS performance testing methods. Summary of the Invention
[0004] The main purpose of the present invention is to provide a DNS automated performance testing method, device, equipment, and computer-readable storage medium, aiming to solve the technical problem of low testing efficiency of existing DNS performance testing methods.
[0005] To achieve the above purpose, the present invention provides a DNS automated performance testing method, and the DNS automated performance testing method includes the following steps:
[0006] Obtain multi-scenario information of the Domain Name System (DNS), extract a corresponding multi-scenario configuration parameter set from the multi-scenario information, and abstract multiple sub-scenario parameter combinations according to the multi-scenario configuration parameter set, where each scenario corresponds to several sub-scenarios;
[0007] Automatically simulate domain name resolution requests based on a preset data query function, and obtain queried data of the domain name resolution requests, so as to generate a domain name test file for DNS performance testing based on the queried data;
[0008] Based on the domain name test file and multiple combinations of the sub-scenario parameters, perform DNS performance test operations under each sub-scenario to obtain DNS performance test results under all sub-scenarios.
[0009] Optionally, the steps of obtaining multi-scenario information of the Domain Name System (DNS), extracting a corresponding set of multi-scenario configuration parameters from the multi-scenario information, and abstracting multiple combinations of sub-scenario parameters based on the set of multi-scenario configuration parameters include:
[0010] Obtain multi-scenario information of DNS, and use a preset processing function to process the multi-scenario information to obtain configuration parameters under each scenario, so as to summarize the configuration parameters under all scenarios into the set of multi-scenario configuration parameters;
[0011] Take the value of each configuration parameter in the set of multi-scenario configuration parameters as a value set, and use the Cartesian product principle between the value sets to obtain multiple combinations of the sub-scenario parameters, so as to randomly abstract the sub-scenario parameter combinations of multiple sub-scenarios corresponding to each scenario, and summarize them into multiple combinations of the sub-scenario parameters.
[0012] Optionally, before the step of automatically simulating a domain name resolution request based on a preset data query function, obtaining the queried data of the domain name resolution request, and generating a domain name test file for DNS performance test based on the queried data, further includes:
[0013] Build a network environment required for performing DNS performance tests, and install a preset DNS stress test tool;
[0014] Check the network environment and the DNS stress test tool to ensure the normal operation of the network environment and the DNS stress test tool.
[0015] Optionally, the step of automatically simulating a domain name resolution request based on a preset data query function, obtaining the queried data of the domain name resolution request, and generating a domain name test file for DNS performance test based on the queried data includes:
[0016] Perform a domain name addition operation in the network environment, and generate a basic resolution record;
[0017] Use the data query function to automatically simulate a domain name resolution request, and generate the queried data according to the currently added domain name and the basic domain name record, so as to integrate the queried data into the domain name test file, where the domain name test file is stored in the blockchain.
[0018] Optionally, the step of performing DNS performance test operations under each sub-scenario based on the domain name test file and multiple combinations of the sub-scenario parameters to obtain DNS performance test results under all sub-scenarios includes:
[0019] Generate an object spectrum file corresponding to each combination of the sub-scenario parameters, and use a DNS stress test tool loaded with the domain name test file to perform DNS performance test operations on each of the object spectrum files one by one;
[0020] When the DNS performance test operations for all the object spectrum files are completed, use the specified monitoring metric data collected under all sub-scenarios as the DNS performance test results under all sub-scenarios.
[0021] Optionally, after the step of using the specified monitoring metric data collected under all sub-scenarios as the DNS performance test results under all sub-scenarios when the DNS performance test operations for all the object spectrum files are completed, it further includes:
[0022] Write the specified monitoring metric data into a preset database;
[0023] Integrate the specified monitoring data in the database and perform visual display.
[0024] Optionally, after the step of performing DNS performance test operations under each sub-scenario based on the domain name test file and multiple combinations of the sub-scenario parameters to obtain DNS performance test results under all sub-scenarios, it further includes:
[0025] Receive a custom performance discrimination function created for each sub-scenario, and perform customized performance analysis on the DNS performance test results under all sub-scenarios based on the custom performance discrimination function.
[0026] In addition, to achieve the above object, the present invention further provides a DNS automated performance test device, and the DNS automated performance test device includes:
[0027] A parameter combination generation module, configured to obtain multi-scenario information of the Domain Name System (DNS), extract a corresponding multi-scenario configuration parameter set from the multi-scenario information, and abstract multiple combinations of sub-scenario parameters according to the multi-scenario configuration parameter set, wherein each scenario corresponds to several sub-scenarios;
[0028] A test file generation module, configured to automatically simulate a domain name resolution request based on a preset data query function, and obtain queried data of the domain name resolution request, so as to generate a domain name test file for DNS performance test based on the queried data;
[0029] A test result acquisition module, which is used to perform DNS performance test operations under each sub-scenario based on the domain name test file and various combinations of the sub-scenario parameters, so as to obtain the DNS performance test results under all sub-scenarios.
[0030] Optionally, the parameter combination generation module includes:
[0031] A parameter subset summary unit, which is used to obtain multi-scenario information of DNS, and use a preset processing function to process the multi-scenario information to obtain the configuration parameters under each scenario, so as to summarize the configuration parameters under all scenarios into the multi-scenario configuration parameter set;
[0032] A parameter combination abstraction unit, which is used to take the value of each configuration parameter in the multi-scenario configuration parameter set as a value set, and use the Cartesian product principle between the value sets to obtain various combinations of the sub-scenario parameters, so as to randomly abstract the sub-scenario parameter combinations of multiple sub-scenarios corresponding to each scenario, and summarize them into various combinations of the sub-scenario parameters.
[0033] Optionally, the DNS automated performance testing device further includes:
[0034] An environment initialization module, which is used to build a network environment required for performing DNS performance tests and install a preset DNS stress testing tool;
[0035] Check the network environment and the DNS stress testing tool to ensure the normal operation of the network environment and the DNS stress testing tool.
[0036] Optionally, the test file generation module includes:
[0037] A domain name addition unit, which is used to perform domain name addition operations in the network environment and generate basic resolution records;
[0038] A data integration unit, which is used to automatically simulate domain name resolution requests using the data query function, and generate the queried data according to the currently added domain name and the basic domain name record, so as to integrate the queried data into the domain name test file, where the domain name test file is stored in the blockchain.
[0039] Optionally, the test result acquisition module includes:
[0040] A test operation execution unit, which is used to generate an object spectrum file corresponding to each combination of the sub-scenario parameters, and use the DNS stress testing tool loaded with the domain name test file to perform DNS performance test operations on each of the object spectrum files one by one;
[0041] An index data collection unit, configured to, until the DNS performance test operations for all the object score files are completed, use the specified monitoring metric data collected in all sub-scenarios as the DNS performance test results in all sub-scenarios.
[0042] Optionally, the test result acquisition module further includes:
[0043] A visualization display unit, configured to write the specified monitoring metric data into a preset database;
[0044] Integrate the specified monitoring data in the database and perform visualization display.
[0045] Optionally, the DNS automated performance testing device further includes:
[0046] A function customization module, configured to receive custom performance discrimination functions created for each sub-scenario, and perform customized performance analysis on the DNS performance test results in all sub-scenarios based on the custom performance discrimination functions.
[0047] In addition, to achieve the above object, the present invention further provides a DNS automated performance testing device, the DNS automated performance testing device includes a processor, a memory, and a DNS automated performance testing program stored on the memory and executable by the processor, wherein when the DNS automated performance testing program is executed by the processor, the steps of the DNS automated performance testing method as described above are implemented.
[0048] In addition, to achieve the above object, the present invention further provides a computer-readable storage medium, on which a DNS automated performance testing program is stored, wherein when the DNS automated performance testing program is executed by a processor, the steps of the DNS automated performance testing method as described above are implemented.
[0049] The present invention provides a DNS automated performance testing method, apparatus, device, and computer-readable storage medium. The DNS automated performance testing method, through a data-driven approach, parametrically combines different scenarios to obtain a variety of different sub-scenario parameter combinations, thereby saving the time and labor costs of large-scale multi-scenario DNS performance testing. By presetting a data query function to automatically simulate domain name resolution requests and automatically obtain the corresponding data to be queried, it is not necessary to prepare a large number of single, repetitive data files and file data operations in advance, further reducing labor costs and improving process efficiency. By running a variety of different sub-scenarios for performance testing and combining the aforementioned parametric combination generation steps, the test data is completely separated from the business logic. For testers who do not understand the specific business logic, they only need to maintain the file of the corresponding configuration parameters without modifying the code, eliminating the difficulty of script writing and greatly reducing the code maintenance cost, thereby improving the efficiency of performance testing. Therefore, the technical problem of low test efficiency in the existing DNS performance testing method is solved. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 It is a schematic hardware structure diagram of the DNS automated performance testing device involved in the solution of the embodiment of the present invention;
[0051] Figure 2 It is a schematic flowchart of the first embodiment of the DNS automated performance testing method of the present invention;
[0052] Figure 3 It is a schematic flowchart of a specific embodiment of the DNS automated performance testing method of the present invention;
[0053] Figure 4 It is a schematic diagram of the functional modules of the DNS automated performance testing apparatus of the present invention.
[0054] The realization, functional features, and advantages of the object of the present invention will be further described in conjunction with the embodiments with reference to the accompanying drawings. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0055] It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0056] The DNS automated performance testing method involved in the embodiment of the present invention is mainly applied to a DNS automated performance testing device, which can be a device with display and processing functions such as a PC, a portable computer, a mobile terminal, etc.
[0057] Refer to Figure 1 , Figure 1This is a schematic diagram of the hardware structure of the DNS automated performance testing device involved in the solution of the embodiment of the present invention. In the embodiment of the present invention, the DNS automated performance testing device may include a processor 1001 (such as a CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Among them, the communication bus 1002 is used to realize the connection and communication between these components; the user interface 1003 may include a display screen (Display) and an input unit such as a keyboard (Keyboard); the network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface); the memory 1005 may be a high-speed RAM memory or a stable memory (non-volatile memory), such as a disk memory, and the memory 1005 may optionally be a storage device independent of the aforementioned processor 1001.
[0058] Those skilled in the art can understand that Figure 1 the hardware structure shown in does not constitute a limitation on the DNS automated performance testing device, and may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements.
[0059] Continuing to refer to Figure 1 , Figure 1 the memory 1005, as a computer-readable storage medium, may include an operating system, a network communication module, and a DNS automated performance testing program.
[0060] In Figure 1 , the network communication module is mainly used to connect to the server and communicate with the server for data; while the processor 1001 can call the DNS automated performance testing program stored in the memory 1005 and execute the DNS automated performance testing method provided by the embodiment of the present invention.
[0061] Based on the above hardware structure, various embodiments of the DNS automated performance testing method of the present invention are proposed.
[0062] The Domain Name System (DNS) converts domain names that are easy to manage and identify for enterprises and developers into digital IP addresses used by computers for interconnection and communication, and provides a global load balancing function for the high availability of Internet applications. Therefore, it is quite important to ensure the high availability of DNS services. When performing performance testing on DNS, open-source tools are usually used to simulate real user behaviors and perform a large number of DNS domain name resolution requests. During the stress testing process, it is necessary to simulate the performance of a large number of multi-scenario DNSs, such as simulating different user concurrent request numbers, different parsing request durations, different domain name resolutions, and sub-domain name resolutions of different record types. Generally speaking, comprehensive performance testing of DNS products requires dozens or even hundreds of scenarios for testing.
[0063] When conducting large - scale multi - scenario tests, if traditional manual operation is used to press - test with tools, it is obviously unrealistic. Not only is the operation single and cumbersome, but also due to the large number of scenarios, errors are likely to occur when collecting results, checking the DNS service status, and the CPU and memory occupancy rates of the DNS server. If general automated scripts are used, with each scenario corresponding to an automated script, such a large number of scripts will undoubtedly increase the cost of script maintenance and development. Moreover, since the scripts for each scenario are independent, it still requires time and human resources to collect and summarize the data. All of the above situations reflect the problem of low test efficiency in the existing DNS performance testing methods.
[0064] To solve the above problems, the present invention provides a DNS automated performance testing method. That is, through a data - driven approach, different scenarios are parametrically combined to obtain a variety of different sub - scenario parameter combinations, which saves the time and human costs of large - scale multi - scenario DNS performance testing. By presetting a data query function to automatically simulate domain name resolution requests and automatically obtain the corresponding data to be queried, it is no longer necessary to prepare a large number of single, repetitive data files and file data operations in advance, further reducing the human cost and improving the process efficiency. By running a variety of different sub - scenarios for performance testing and combining with the aforementioned parametric combination generation step, the test data is completely separated from the business logic. For testers who do not understand the specific business logic, they only need to maintain the file of the corresponding configuration parameters and do not need to modify the code, eliminating the difficulty of script writing and greatly reducing the cost of code maintenance, thereby improving the efficiency of performance testing. Therefore, the technical problem of low test efficiency in the existing DNS performance testing methods is solved.
[0065] Refer to Figure 2 , Figure 2 which is the flowchart of the first embodiment of the DNS automated performance testing method of the present invention.
[0066] The first embodiment of the present invention provides a DNS automated performance testing method, and the DNS automated performance testing method includes the following steps:
[0067] Step S10, obtain multi - scenario information of the Domain Name System (DNS), extract the corresponding multi - scenario configuration parameter set from the multi - scenario information, and abstract a variety of sub - scenario parameter combinations according to the multi - scenario configuration parameter set, where each scenario corresponds to several sub - scenarios;
[0068] In this embodiment, the multi-scenarios are real user behavior scenarios that need to be simulated when performing stress testing on DNS, so as to obtain the performance of DNS under multi-scenarios. For example, it is necessary to simulate different numbers of concurrent user requests, different parsing request durations, different domain name resolutions, sub-domain name resolutions of different record types, etc. The multi-scenario information is usually obtained according to the scenario ID passed in by the user or specified in advance. For example, when the user needs to perform DNS performance testing at this time, a runcase message instruction is sent to the terminal equipped with the DNS automated performance testing program. This instruction is similar to an instruction of runcase command + caseid. When the terminal receives this instruction, it can further find the information of multiple scenarios that need to be simulated for the current DNS performance testing according to the caseid in the instruction, that is, the above-mentioned multi-scenario information. The terminal processes the currently obtained multi-scenario information to obtain the configuration parameters corresponding to each scenario, and takes the configuration parameters corresponding to all scenarios as a multi-scenario configuration parameter set. Finally, based on various parameters in the multi-scenario configuration parameter set and the available values of each parameter, each scenario is further divided into several sub-scenarios, and the scenario configuration parameters under each scenario are randomly combined into multiple sub-scenario configuration parameter combinations. It should be noted that the above parameter combination method can adopt a random combination method or can be combined according to specific rules according to actual needs. This embodiment does not make specific limitations.
[0069] Step S20: Automatically simulate a domain name resolution request based on a preset data query function, and obtain the queried data of the domain name resolution request, so as to generate a domain name test file for DNS performance testing based on the queried data;
[0070] In this embodiment, the preset data query function is defined in the present invention and is used to simulate domain name resolution requests for a large number of different domain names and sub-domains. This function can automatically generate corresponding queried data according to the added domain names and different types of sub-records, without the tester preparing a single data file in advance. The queried data can specifically be the DNS server address, DNS server port, and the maximum number of specified query outputs, etc. The domain name test file is a file automatically generated based on the above-mentioned queried data and is also a necessary test file during the DNS performance testing process. DNS stress testing tools such as dnsperf or queryperf can only normally execute the testing process after obtaining the domain name test file.
[0071] Step S30: Based on the domain name test file and multiple sub-scenario parameter combinations, perform DNS performance testing operations under each sub-scenario to obtain DNS performance test results under all sub-scenarios.
[0072] In this embodiment, the performance detection results may include metric data, paths, etc. After obtaining the domain name test file, the terminal can perform actual domain name resolution operations to conduct DNS performance tests. It should be noted that the method for the terminal to perform performance tests on multiple sub-scenarios can be to execute them one by one in a certain order or to execute them in parallel. This embodiment does not make specific limitations. The terminal usually implements this through some DNS stress test tools such as dnsperf or queryperf. For example, in the way that the terminal executes each sub-scenario one by one, the JSON files generated by combining different sub-scenario parameters are respectively passed into the sub-scenario execution module, and the performance test is executed through the test tool. After each sub-scenario is executed, the JSON file of the next sub-scenario parameter combination is continued to be passed in until all the sub-scenario parameter combinations are completely run.
[0073] As a specific embodiment, as Figure 3 shown. When the DNS automated performance test system on the server receives the Runcase message instruction, it finds the corresponding multi-scenario information according to the caseid in the instruction, and after processing the multi-scenario information through the handle function, it obtains the parameter configuration files corresponding to each scenario, such as the case.cfg file. The system passes the case.cfg file into the Pare_gen module (parameter_generator module parameter generation module), combines the different parameters defined in case.cfg, and then passes the parameters.json generated by different parameter combinations into the runcase module to execute the performance test. After each case is executed, the next parameters.json is continued to be passed in for execution until all the parameter combinations are completely run. During the running process, the collection module continuously processes and collects data, and writes the overall data into the database for convenient analysis and comparison.
[0074] For the specific business logic execution part of the case, it is divided into three parts as a whole: Env_int, Case_steps, and Env_clean. The Env_int part mainly performs some environment initialization work, including the construction of the network environment (network) and the installation and inspection of tools, to ensure that the network environment and tools are normal. The Case_steps part mainly operates according to the DNS service test, including adding domains (add domain), adding, updating, and deleting subdomains (add records, update records, delete records), binding VPCs (bind vpcs), and the process of monitoring and data collection for stress testing of domain name resolution. The get query.txt in the figure refers to automatically generating a domain name test file, login vms means logging in to the virtual machine, and dnsperf domains means performing domain name resolution in each sub-scenario through the DNS stress testing tool dnsperf, and collectresults represents the test result collection operation. The Env_clean part restores the environment to its initial state to prevent parameters from affecting the environment during the execution process. When each scenario test is completed, the system will collect the specified monitoring metrics and summarize them into the connection file uniformly.
[0075] In this embodiment, the present invention obtains multi-scenario information of the Domain Name System (DNS), extracts a corresponding multi-scenario configuration parameter set from the multi-scenario information, and abstracts multiple sub-scenario parameter combinations according to the multi-scenario configuration parameter set, where each scenario corresponds to several sub-scenarios; automatically simulates a domain name resolution request based on a preset data query function, and obtains the queried data of the domain name resolution request, so as to generate a domain name test file for DNS performance testing based on the queried data; based on the domain name test file and multiple sub-scenario parameter combinations, performs DNS performance testing operations under each sub-scenario to obtain DNS performance test results under all sub-scenarios. In the above manner, the present invention parametrically combines different scenarios through a data-driven approach to obtain multiple different sub-scenario parameter combinations, saving the time cost and labor cost of large-scale multi-scenario DNS performance testing; by presetting a data query function to automatically simulate a domain name resolution request and automatically obtain the corresponding queried data, it is not necessary to prepare a large number of single and repetitive data files and file data operations in advance, further reducing the labor cost and improving the process efficiency; by running multiple different sub-scenarios for performance testing and combining the foregoing parametric combination generation steps, the test data is completely separated from the business logic. For testers who do not understand the specific business logic, they only need to maintain the file of the corresponding configuration parameters, and do not need to modify the code, eliminating the difficulty of script writing and greatly reducing the code maintenance cost, thereby improving the efficiency of performance testing. Therefore, the technical problem of low test efficiency of the existing DNS performance testing method is solved.
[0076] Further, based on the above Figure 2 shown in the first embodiment, a second embodiment of the DNS automated performance testing method of the present invention is proposed. In this embodiment, step S10 includes:
[0077] Obtain multi-scenario information of DNS, and use a preset processing function to process the multi-scenario information to obtain configuration parameters under each scenario, so as to summarize the configuration parameters under all scenarios into the multi-scenario configuration parameter set;
[0078] Take the value of each configuration parameter in the multi-scenario configuration parameter set as a value set, and use the Cartesian product principle between each value set to obtain multiple sub-scenario parameter combinations, so as to randomly abstract the sub-scenario parameter combinations of multiple sub-scenarios corresponding to each scenario, and summarize them into multiple sub-scenario parameter combinations.
[0079] In this embodiment, the preset processing function is the handle function, which is used to obtain the configuration parameters of each scenario from the multi-scenario information. When the terminal receives the runcase message (runcase connmand + caseid) instruction, the handle function is used to process and find the configuration parameter file corresponding to each scenario (equivalent to the above-mentioned configuration parameters). Since each type of configuration parameter can usually take multiple values, for example, for the configuration parameter of the maximum concurrent requests, multiple different optional values can be taken. List all the possible values of each configuration parameter as a value set. For example, if there are currently 10 scenarios and each scenario has 3 different configuration parameters, 30 value sets can be generated. The terminal converts the different configuration parameters defined in the configuration parameter file into the Cartesian product of the value sets, thereby randomly abstracting multiple different parameter combinations. The Cartesian product refers to, in mathematics, the Cartesian product of two sets X and Y, denoted as X×Y, where the first object is a member of X and the second object is one of all possible ordered pairs of members of Y. For example, if the first value set has 5 possible values and the second value set has 7 possible values, there are 35 parameter combination methods between the first value set and the second value set.
[0080] Further, after step S30, it further includes:
[0081] Receiving the custom performance discrimination functions created for each sub-scenario, and based on the custom performance discrimination functions, performing customized performance analysis on the DNS performance test results under all the sub-scenarios.
[0082] In this embodiment, the custom discrimination function is a function defined by the tester according to actual needs for obtaining customized health indicators in the DNS performance test.
[0083] For the collection and analysis of test results, a custom function can be used to customize the collection of health indicators for different scenarios and customize the discrimination of test results. That is to say, an extensible entry is provided, enabling the tester to obtain customized health indicators other than the conventional monitoring indicators after completing the DNS performance test. For example, the conventional monitoring indicators are the queries-per-second (QPS), CPU and memory occupancy rates on the DNS server, etc. And through the custom function, the tester can also obtain additional new health indicator data such as the memory peak value and overall success rate during the performance test of multiple sub-scenarios belonging to the same scenario.
[0084] Furthermore, by performing random parametric combinations based on the Cartesian product principle, all possible sub-scenarios can be simulated, thereby improving the effectiveness of the test results. Through custom functions, customized collection of health indicators for different scenarios and customized discrimination of test results can be achieved, which is more conducive to the unified collection and persistent management of the results.
[0085] Furthermore, based on the above Figure 2 shown in the first embodiment, a third embodiment of the DNS automated performance testing method of the present invention is proposed. In this embodiment, step S20 includes:
[0086] Build a network environment required for performing DNS performance testing and install a preset DNS stress testing tool;
[0087] Check the network environment and the DNS stress testing tool to ensure the normal operation of the network environment and the DNS stress testing tool.
[0088] In this embodiment, network environment initialization needs to be performed first. First, build a network environment required for DNS performance testing, such as configuring virtual machines, etc. Then install DNS stress testing tools such as dnsperf or queryperf. Finally, check the network environment and the tool by sending test instructions, etc., to ensure its normal operation.
[0089] Furthermore, step S20 includes:
[0090] Perform domain name addition operations in the network environment and generate basic resolution records;
[0091] Use the data query function to automatically simulate domain name resolution requests and generate the data to be queried according to the currently added domain name and the basic domain name record, and integrate the data to be queried into the domain name test file, where the domain name test file is stored in the blockchain
[0092] In this embodiment, when performing DNS performance testing, two open-source tools, dnsperf or queryperf, can be selected for stress testing. They encapsulate different functions for domain name resolution, and both tools rely on domain name test files. To simulate domain name resolution requests for a large number of different domain names and sub-domains, this framework defines a generate_querydata function to automatically generate corresponding query data, such as DNS server addresses, DNS server ports, and the maximum number of specified query outputs, according to the added domain names and different types of sub-records. Then, the query data is integrated into a domain name test file in the format of a regular test file, without the need for testers to prepare a single data file in advance for the stress testing tool. It should be emphasized that to further ensure the privacy and security of the above target return results, the above domain name test file can also be stored in a node of a blockchain.
[0093] Further, step S30 includes:
[0094] Generate an object score file corresponding to each combination of the sub-scenario parameters, and use a DNS stress testing tool loaded with the domain name test file to perform DNS performance testing operations on each of the object score files one by one;
[0095] When the DNS performance testing operations for all the object score files are completed, all the specified monitoring metric data collected under all the sub-scenarios is used as the DNS performance test results under all the sub-scenarios.
[0096] In this embodiment, the object score file is a JSON format file. Since in DNS performance testing, in addition to obtaining the basic configuration parameters under each sub-scenario, some other parameter information also needs to be obtained, a more complex JSON format parameter file corresponding to each combination of sub-scenario parameters is also required. Specifically, the terminal passes the parameters.json generated based on different combinations of sub-scenario parameters into the runcase module for performance testing execution. After each case (sub-scenario) is executed, the next parameters.json is passed in for continued execution until all combinations of sub-scenario parameters have been run.
[0097] Further, after step S30, it further includes:
[0098] Write the specified monitoring metric data into a preset database;
[0099] Integrate the specified monitoring data in the database and perform visual display.
[0100] In this embodiment, the preset database can be a database specified in advance by the tester or the default database. The specified monitoring metrics can specifically be QPS, CPU and memory occupancy rates, success rates, etc. on the DNS server. During the DNS performance test, the obtained specified monitoring metrics are defaultly written into the database for easy analysis and comparison. The specific visualization display method can be to convert the change trends of the same type of metrics during the test process into a chart form for display, or multiple different types of metrics can be integrated to generate corresponding multi-dimensional analysis and comparison charts, etc., which can be flexibly set according to actual needs.
[0101] The blockchain referred to in the present invention is a new application mode of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, and encryption algorithm. Blockchain, in essence, is a decentralized database, a string of data blocks generated by using cryptographic methods. Each data block contains information about a batch of network transactions, which is used to verify the validity (anti-counterfeiting) of the information and generate the next block. The blockchain can include a blockchain underlying platform, a platform product service layer, and an application service layer, etc.
[0102] Furthermore, by initializing the network environment first, the subsequent test process can proceed smoothly; by presetting a data query function to automatically simulate domain name resolution requests and automatically obtain the corresponding queried data, it is no longer necessary to prepare a large number of single, repetitive data files and file data operations in advance, further reducing the labor cost and improving the process efficiency; by performing performance tests on each sub-scenario parameter combination one by one, the problem of data collection chaos that may occur when multiple tests are executed in parallel is avoided; by writing the metric data obtained during the test into the database, it is convenient to analyze and mine the test results later, and visualize them for intuitive analysis by testers.
[0103] In addition, as Figure 4 shown, to achieve the above object, the present invention also provides a DNS automated performance testing device, and the DNS automated performance testing device includes:
[0104] A parameter combination generation module 10, configured to obtain multi-scenario information of the Domain Name System (DNS), extract a corresponding set of multi-scenario configuration parameters from the multi-scenario information, and abstract multiple sub-scenario parameter combinations according to the set of multi-scenario configuration parameters, where each scenario corresponds to a number of sub-scenarios;
[0105] A test file generation module 20, configured to automatically simulate a domain name resolution request based on a preset data query function, and obtain the queried data of the domain name resolution request, so as to generate a domain name test file for DNS performance testing based on the queried data;
[0106] The test result acquisition module 30 is configured to perform DNS performance test operations in each sub-scenario based on the domain name test file and multiple combinations of the sub-scenario parameters, so as to obtain the DNS performance test results in all sub-scenarios.
[0107] Optionally, the parameter combination generation module 10 includes:
[0108] The parameter subset summary unit is configured to obtain multi-scenario information of DNS, and use a preset processing function to process the multi-scenario information to obtain configuration parameters in each scenario, so as to summarize the configuration parameters in all scenarios into the multi-scenario configuration parameter set;
[0109] The parameter combination abstraction unit is configured to use the value of each configuration parameter in the multi-scenario configuration parameter set as a value set, and use the Cartesian product principle between the value sets to obtain multiple combinations of the sub-scenario parameters, so as to randomly abstract the sub-scenario parameter combinations corresponding to multiple sub-scenarios in each scenario, and summarize them into multiple combinations of the sub-scenario parameters.
[0110] Optionally, the DNS automated performance testing device further includes:
[0111] The environment initialization module is configured to build a network environment required for performing DNS performance tests, and install a preset DNS stress testing tool;
[0112] Check the network environment and the DNS stress testing tool to ensure the normal operation of the network environment and the DNS stress testing tool.
[0113] Optionally, the test file generation module 20 includes:
[0114] The domain name addition unit is configured to perform domain name addition operations in the network environment and generate basic resolution records;
[0115] The data integration unit is configured to automatically simulate domain name resolution requests using the data query function, and generate the queried data according to the currently added domain name and the basic domain name record, so as to integrate the queried data into the domain name test file, where the domain name test file is stored in the blockchain.
[0116] Optionally, the test result acquisition module 30 includes:
[0117] The test operation execution unit is configured to generate an object score file corresponding to each combination of the sub-scenario parameters, and use the DNS stress testing tool loaded with the domain name test file to perform DNS performance test operations on each of the object score files one by one;
[0118] An index data collection unit, configured to, when the DNS performance test operations for all the object simple score files are completed, use the specified monitoring index data collected under all sub-scenarios as the DNS performance test results under all sub-scenarios.
[0119] Optionally, the test result acquisition module 30 further includes:
[0120] A visualization display unit, configured to write the specified monitoring index data into a preset database;
[0121] Integrate the specified monitoring data in the database and perform visualization display.
[0122] Optionally, the DNS automated performance testing device further includes:
[0123] A function customization module, configured to receive custom performance discrimination functions created for each sub-scenario, and perform customized performance analysis on the DNS performance test results under all sub-scenarios based on the custom performance discrimination functions.
[0124] The present invention also provides a DNS automated performance testing device.
[0125] The DNS automated performance testing device includes a processor, a memory, and a DNS automated performance testing program stored on the memory and executable on the processor. When the DNS automated performance testing program is executed by the processor, the steps of the DNS automated performance testing method as described above are implemented.
[0126] Wherein, the method implemented when the DNS automated performance testing program is executed can refer to the various embodiments of the DNS automated performance testing method of the present invention, and will not be elaborated herein.
[0127] In addition, an embodiment of the present invention also provides a computer-readable storage medium.
[0128] A DNS automated performance testing program is stored on the computer-readable storage medium of the present invention. When the DNS automated performance testing program is executed by a processor, the steps of the DNS automated performance testing method as described above are implemented.
[0129] Wherein, the method implemented when the DNS automated performance testing program is executed can refer to the various embodiments of the DNS automated performance testing method of the present invention, and will not be elaborated herein.
[0130] It should be noted that, in this text, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements not only includes those elements but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or system. Without further limitation, an element defined by the statement "including one..." does not exclude the existence of additional identical elements in the process, method, article or system including such element.
[0131] The serial numbers of the above embodiments of the present invention are only for description and do not represent the superiority or inferiority of the embodiments.
[0132] Through the description of the above embodiments, those skilled in the art can clearly understand that the above-described embodiment methods can be implemented by means of software plus a necessary general hardware platform. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation. Based on such understanding, the technical solution of the present invention, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. The computer software product is stored in a storage medium as described above (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to enable a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in various embodiments of the present invention.
[0133] The above are only the preferred embodiments of the present invention and do not limit the patent scope of the present invention accordingly. Any equivalent structural or equivalent process transformation made by using the specification and drawings of the present invention, or directly or indirectly applied in other related technical fields, shall be equally included in the patent protection scope of the present invention.
Claims
1. A DNS automated performance testing method, characterized in that The DNS automated performance testing method includes the following steps: Obtain multi-scenario information of the Domain Name System (DNS) according to the scenario ID passed in by the user or specified in advance, extract the corresponding multi-scenario configuration parameter set from the multi-scenario information, and abstract multiple sub-scenario parameter combinations based on the multi-scenario configuration parameter set, where each scenario corresponds to several sub-scenarios; Automatically simulate domain name resolution requests based on a preset data query function, and obtain the queried data of the domain name resolution requests, so as to generate a domain name test file for DNS performance testing based on the queried data. The preset data query function is a function used to simulate domain name resolution requests for different domain names and sub-domains, and automatically generates corresponding queried data according to the added domain names and different types of sub-records. The domain name test file is stored in the blockchain; Based on the domain name test file and multiple sub-scenario parameter combinations, perform DNS performance testing operations under each sub-scenario to obtain DNS performance testing results under all sub-scenarios; The step of obtaining multi-scenario information of the Domain Name System (DNS) according to the scenario ID passed in by the user or specified in advance, extracting the corresponding multi-scenario configuration parameter set from the multi-scenario information, and abstracting multiple sub-scenario parameter combinations based on the multi-scenario configuration parameter set includes: Obtain multi-scenario information of the DNS, and use a preset processing function to process the multi-scenario information to obtain configuration parameters under each scenario, so as to summarize the configuration parameters under all scenarios into the multi-scenario configuration parameter set; Take the value of each configuration parameter in the multi-scenario configuration parameter set as a value set, and use the Cartesian product principle between each value set to obtain multiple sub-scenario parameter combinations, so as to randomly abstract the sub-scenario parameter combinations of multiple sub-scenarios corresponding to each scenario, and summarize them into multiple sub-scenario parameter combinations.
2. The DNS automated performance testing method according to claim 1, wherein Before the step of automatically simulating domain name resolution requests based on a preset data query function, obtaining the queried data of the domain name resolution requests, and generating a domain name test file for DNS performance testing based on the queried data, it further includes: Build a network environment required for performing DNS performance testing, and install a preset DNS stress testing tool; Check the network environment and the DNS stress testing tool to ensure the normal operation of the network environment and the DNS stress testing tool.
3. The DNS automated performance testing method according to claim 2, wherein The step of automatically simulating domain name resolution requests based on a preset data query function, obtaining the queried data of the domain name resolution requests, and generating a domain name test file for DNS performance testing based on the queried data includes: Perform a domain name addition operation in the network environment and generate a basic resolution record; Use the data query function to automatically simulate domain name resolution requests, and generate the queried data according to the currently added domain name and the basic domain name record, so as to integrate the queried data into the domain name test file.
4. The DNS automated performance testing method according to claim 2, characterized in that, The steps of performing DNS performance test operations under each sub-scenario based on the domain name test file and multiple combinations of the sub-scenario parameters to obtain the DNS performance test results under all sub-scenarios include: Generating an object profile file corresponding to each combination of the sub-scenario parameters, and using a DNS stress test tool loaded with the domain name test file to perform DNS performance test operations on each of the object profile files one by one; When the DNS performance test operations for all the object profile files are completed, taking the specified monitoring metric data collected under all sub-scenarios as the DNS performance test results under all sub-scenarios.
5. The DNS automated performance testing method according to claim 4, characterized in that, After the step of taking the specified monitoring metric data collected under all sub-scenarios as the DNS performance test results under all sub-scenarios when the DNS performance test operations for all the object profile files are completed, it further includes: Writing the specified monitoring metric data into a preset database; Integrating the specified monitoring data in the database and performing visual display.
6. The DNS automated performance testing method according to any one of claims 1-5, characterized in that After the steps of performing DNS performance test operations under each sub-scenario based on the domain name test file and multiple combinations of the sub-scenario parameters to obtain the DNS performance test results under all sub-scenarios, it further includes: Receiving a custom performance discrimination function created for each sub-scenario, and performing customized performance analysis on the DNS performance test results under all sub-scenarios based on the custom performance discrimination function.
7. A DNS automated performance testing device, characterized in that, The DNS automated performance test device includes: A parameter combination generation module, configured to obtain multi-scenario information of the Domain Name System (DNS) according to a scenario ID passed in by a user or specified in advance, extract a corresponding multi-scenario configuration parameter set from the multi-scenario information, and abstract multiple combinations of sub-scenario parameters according to the multi-scenario configuration parameter set, wherein each scenario corresponds to several sub-scenarios; The parameter combination generation module is further configured to obtain the multi-scenario information of the DNS, and use a preset processing function to process the multi-scenario information to obtain the configuration parameters under each scenario, so as to summarize the configuration parameters under all scenarios into the multi-scenario configuration parameter set; taking the value of each configuration parameter in the multi-scenario configuration parameter set as a value set, and using the Cartesian product principle between the value sets to obtain multiple combinations of the sub-scenario parameters, so as to randomly abstract the sub-scenario parameter combinations of multiple sub-scenarios corresponding to each scenario, and summarize them into multiple combinations of the sub-scenario parameters; A test file generation module, configured to automatically simulate a domain name resolution request based on a preset data query function, and obtain the queried data of the domain name resolution request, so as to generate a domain name test file for DNS performance test based on the queried data, wherein the preset data query function is a function used to simulate domain name resolution requests for different domain names and sub-domains, and automatically generates corresponding queried data according to the added domain names and different types of sub-records, and the domain name test file is stored in a blockchain; A test result acquisition module, configured to perform DNS performance test operations under each sub-scenario based on the domain name test file and various combinations of the sub-scenario parameters, so as to obtain DNS performance test results under all sub-scenarios.
8. A DNS automated performance testing device, characterized in that The DNS automated performance testing device includes a processor, a memory, and a DNS automated performance testing program stored on the memory and executable by the processor. When the DNS automated performance testing program is executed by the processor, the steps of the DNS automated performance testing method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium, characterized in that, A DNS automated performance testing program is stored on the computer-readable storage medium. When the DNS automated performance testing program is executed by a processor, the steps of the DNS automated performance testing method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
DNS (domain name server) traffic simulation system
CN106789360A
Implementation method and device for telecommunication charging service automatic testing
CN111240983A