Movatterモバイル変換


[0]ホーム

URL:


CN106571981A - DNS (Domain Name System) server automated testing method and system - Google Patents

DNS (Domain Name System) server automated testing method and system
Download PDF

Info

Publication number
CN106571981A
CN106571981ACN201611005843.6ACN201611005843ACN106571981ACN 106571981 ACN106571981 ACN 106571981ACN 201611005843 ACN201611005843 ACN 201611005843ACN 106571981 ACN106571981 ACN 106571981A
Authority
CN
China
Prior art keywords
test
server
responsible
dns server
module
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201611005843.6A
Other languages
Chinese (zh)
Other versions
CN106571981B (en
Inventor
李晓东
李洪涛
刘冰
肖建芳
王骞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Internet Network Information Center
Original Assignee
China Internet Network Information Center
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Internet Network Information CenterfiledCriticalChina Internet Network Information Center
Priority to CN201611005843.6ApriorityCriticalpatent/CN106571981B/en
Publication of CN106571981ApublicationCriticalpatent/CN106571981A/en
Application grantedgrantedCritical
Publication of CN106571981BpublicationCriticalpatent/CN106571981B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Classifications

Landscapes

Abstract

Translated fromChinese

本发明涉及一种DNS服务器自动化测试方法与系统。该方法包括:1)通过总控配置文件指定待测服务器和参考服务器的IP和端口,并选择查询包配置项以及要启用的测试功能选项;2)根据选择的测试功能选项,依次执行相应测试功能的启动程序;3)根据各测试功能的测试流程执行测试用例,将执行结果与期望结果和/或参考服务器的执行结果进行比对;4)记录各测试功能的测试用例的执行情况,包括执行异常的用例总数及用例编号;5)在各测试功能的测试用例全部执行完毕后,统计测试情况并生成测试报告。本发明能够节省人工测试的成本,降低人为失误的风险,实现对DNS服务器快速可靠的自动化测试。

The invention relates to a DNS server automatic testing method and system. The method comprises: 1) specifying the IP and port of the server to be tested and the reference server through the master control configuration file, and selecting the query packet configuration item and the test function option to be enabled; 2) performing corresponding tests in sequence according to the selected test function option Function start-up procedure; 3) Execute the test case according to the test process of each test function, and compare the execution result with the expected result and/or the execution result of the reference server; 4) Record the execution status of the test case of each test function, including The total number of abnormally executed use cases and the number of use cases; 5) After all the test cases of each test function have been executed, the test situation is counted and a test report is generated. The invention can save the cost of manual testing, reduce the risk of human error, and realize fast and reliable automatic testing of the DNS server.

Description

Translated fromChinese
一种DNS服务器自动化测试方法与系统A DNS server automated testing method and system

技术领域technical field

本发明属于信息技术领域,具体涉及一种DNS服务器自动化测试方法与系统。The invention belongs to the field of information technology, and in particular relates to a DNS server automatic testing method and system.

背景技术Background technique

DNS(Domain Name System,域名系统)是整个互联网服务的基础之一。该服务将用户访问的互联网域名转换为IP地址,使用户更方便的访问互联网。DNS服务器通常分为权威服务器和递归服务器,常用功能包括区数据加载、查询解析、区传送和数据包转发等功能。DNS (Domain Name System, Domain Name System) is one of the foundations of the entire Internet service. This service converts the Internet domain names accessed by users into IP addresses, making it easier for users to access the Internet. DNS servers are generally divided into authoritative servers and recursive servers. Common functions include zone data loading, query resolution, zone transfer, and data packet forwarding.

目前,针对DNS服务器的测试方法较为单一,一般是模拟DNS客户端向递归或权威服务器发送查询请求,并逐一分析验证响应报文的内容正确性,对于查询解析以外的功能也多采取人工观察和日志分析的方式。这类测试通常存在如下缺点:At present, the testing methods for DNS servers are relatively simple, generally simulating DNS clients sending query requests to recursive or authoritative servers, and analyzing and verifying the correctness of the content of response messages one by one. For functions other than query parsing, manual observation and The way of log analysis. Such tests usually have the following disadvantages:

a、对权威服务器来说,常规查询测试无法对各种异常情况的查询反馈做全面测试;对递归服务器来说,也难以模拟递归服务向外查询结果的各类异常情况;a. For the authoritative server, the conventional query test cannot fully test the query feedback of various abnormal situations; for the recursive server, it is also difficult to simulate various abnormal situations of the recursive service's outbound query results;

b、对区加载功能的测试来说,常规测试只能抽样少量区数据通过DNS查询工具来验证该数据是否加载成功,造成测试样本不完整,用例覆盖率低,测试结果权威性较差,说服力不足;b. For the test of the zone loading function, the conventional test can only sample a small amount of zone data and use the DNS query tool to verify whether the data is loaded successfully, resulting in incomplete test samples, low use case coverage, and poor test results. Convincing Insufficient strength;

c、DNS解析功能逻辑复杂,包含TCP/UDP查询、DNSSEC/非DNSSEC查询、各种资源记录类型的处理逻辑等等,要覆盖所有业务流程,常规测试方法需逐条执行,大大降低了测试效率,增加了测试成本;c. The logic of the DNS resolution function is complex, including TCP/UDP query, DNSSEC/non-DNSSEC query, processing logic of various resource record types, etc. To cover all business processes, conventional test methods need to be executed one by one, which greatly reduces test efficiency. Increased testing costs;

d、对待测DNS服务器的各种响应报文的核验涉及内容较多,人工检查出错率高,测试质量不能保证。d. The verification of various response messages of the DNS server to be tested involves a lot of content, and the error rate of manual inspection is high, so the test quality cannot be guaranteed.

发明内容Contents of the invention

本发明针对上述问题,提供一种DNS服务器自动化测试方法与系统,能够自动化地进行DNS服务器的测试,有效提高测试效率。具体来说,本发明的主要目的是:Aiming at the above problems, the present invention provides a DNS server automatic testing method and system, which can automatically test the DNS server and effectively improve the testing efficiency. Specifically, the main purpose of the present invention is:

1)通过一种自动化测试方法与系统的设计,自动化地模拟DNS服务器测试的全流程,包括对DNS权威服务器的启停、区加载、查询解析、主辅区传送和异常查询等功能的自动化测试,以及对DNS递归服务器的数据包模拟测试,有效提高测试效率;1) Through the design of an automated testing method and system, the entire process of DNS server testing is automatically simulated, including automatic testing of DNS authoritative server start and stop, zone loading, query analysis, primary and secondary zone transmission, and abnormal query. , and the data packet simulation test of the DNS recursive server, which effectively improves the test efficiency;

2)通过自动部署的方式远程配置待测服务,实现分布式批量下发区数据,并远程控制服务启停,避免配置差错;2) Remotely configure the service to be tested through automatic deployment, realize distributed batch distribution of area data, and remotely control the start and stop of the service to avoid configuration errors;

3)设置业界权威DNS服务(例如BIND)作为参考服务器,分别发送同样的查询请求,将待测DNS服务器的解析结果与参考服务器的结果做比对,同时,通过预期结果比对功能提供针对定制化需求(与参考服务不同的处理逻辑)的测试方法,将待测DNS服务器的预期响应结果和实际结果进行自动化比对,提高测试控制精度与准确性;3) Set the industry's authoritative DNS service (such as BIND) as a reference server, send the same query request respectively, and compare the resolution results of the DNS server to be tested with the results of the reference server. According to the testing method of personalized requirements (processing logic different from the reference service), the expected response result of the DNS server to be tested is automatically compared with the actual result to improve the precision and accuracy of test control;

4)支持尽可能多功能的测试自动化,覆盖绝大多数测试用例。4) Support test automation with as many functions as possible, covering most test cases.

5)通过此方法与系统的使用,使测试者只需要维护配置文件和测试数据,不需要维护脚本或代码,降低测试成本,降低自动化测试技能要求。5) Through the use of this method and system, testers only need to maintain configuration files and test data, and do not need to maintain scripts or codes, thereby reducing test costs and skill requirements for automated testing.

为实现上述目的,本发明采用的技术方案如下:To achieve the above object, the technical scheme adopted in the present invention is as follows:

一种DNS服务器自动化测试方法,包括以下步骤:A DNS server automated testing method, comprising the following steps:

1)通过总控配置文件指定待测服务器和参考服务器的IP和端口,并选择查询包配置项以及要启用的测试功能选项;1) Specify the IP and port of the server to be tested and the reference server through the master control configuration file, and select the query packet configuration item and the test function option to be enabled;

2)根据选择的测试功能选项,依次执行相应测试功能的启动程序;2) According to the selected test function option, execute the start-up procedure of the corresponding test function in sequence;

3)根据各测试功能的测试流程执行测试用例,将执行结果与期望结果和/或参考服务器的执行结果进行比对;3) Execute the test case according to the test process of each test function, and compare the execution result with the expected result and/or the execution result of the reference server;

4)记录各测试功能的测试用例的执行情况,包括执行异常的用例总数及用例编号;4) Record the execution of test cases of each test function, including the total number of abnormal execution cases and the number of use cases;

5)在各测试功能的测试用例全部执行完毕后,统计测试情况并生成测试报告。5) After all the test cases of each test function are executed, the test situation is counted and a test report is generated.

进一步地,所述测试功能选项包括下列中的一种或多种:Further, the test function options include one or more of the following:

a)服务启停,负责远程控制相关服务器的区数据下发、启动和停止;a) Service start and stop, responsible for remote control of the area data distribution, start and stop of related servers;

b)区加载,负责测试DNS服务器加载区文件的功能;b) Zone loading, responsible for testing the function of DNS server loading zone files;

c)查询解析,负责测试DNS服务器的各查询逻辑是否正确,根据总控配置文件中配置的查询方式发送查询报文,并验证响应结果是否正确;c) query analysis, responsible for testing whether each query logic of the DNS server is correct, sending query messages according to the query mode configured in the master control configuration file, and verifying whether the response result is correct;

d)区传送,负责测试主辅DNS服务器的数据同步功能;d) Zone transmission, responsible for testing the data synchronization function of the primary and secondary DNS servers;

e)异常测试,负责向DNS服务器发送各种异常包查询请求,并测试DNS服务器响应情况,以监测DNS服务器是否会出现异常情况。e) Abnormality test, responsible for sending various abnormal packet query requests to the DNS server, and testing the response of the DNS server to monitor whether the DNS server has abnormal conditions.

进一步地,所述测试功能选项还包括流量劫持,其只在测试对象为递归服务器时启用,负责将待测递归服务器发往权威服务器的查询包拦截并转发给下游权威服务器,并接收下游权威服务器的响应报文,按测试目的进行修改和定制,然后转发给待测递归服务器,验证待测递归服务器的响应是否正确。Further, the test function option also includes traffic hijacking, which is only enabled when the test object is a recursive server, and is responsible for intercepting and forwarding the query packet sent to the authoritative server by the recursive server to be tested to the downstream authoritative server, and receiving the downstream authoritative server The response message is modified and customized according to the test purpose, and then forwarded to the recursive server to be tested to verify whether the response of the recursive server to be tested is correct.

一种DNS服务器自动化测试系统,其包括:A DNS server automated testing system, which includes:

配置管理模块,负责读取和解析总控配置文件,以获取进行DNS服务器测试的配置信息;The configuration management module is responsible for reading and parsing the master control configuration file to obtain configuration information for DNS server testing;

服务启停模块,负责远程控制相关服务器的区数据下发、启动和停止;The service start and stop module is responsible for remote control of the area data distribution, start and stop of related servers;

区加载模块,负责测试DNS服务器加载区文件的功能;The zone loading module is responsible for testing the function of the DNS server to load zone files;

查询解析模块,负责测试DNS服务器的各查询逻辑是否正确,根据总控配置文件中配置的查询方式发送查询报文,并验证响应结果是否正确;The query analysis module is responsible for testing whether the query logic of the DNS server is correct, sending query messages according to the query methods configured in the master control configuration file, and verifying whether the response results are correct;

区传送模块,负责测试主辅DNS服务器的数据同步功能;The zone transfer module is responsible for testing the data synchronization function of the primary and secondary DNS servers;

异常测试模块,负责向DNS服务器发送各种异常包查询请求,并测试DNS服务器响应情况,以监测DNS服务器是否会出现异常情况;The abnormal test module is responsible for sending various abnormal packet query requests to the DNS server, and testing the response of the DNS server to monitor whether the DNS server has abnormal conditions;

测试报告生成模块,负责对各模块的执行情况进行汇总,生成测试结果报告。The test report generation module is responsible for summarizing the execution of each module and generating a test result report.

进一步地,上述系统还包括流量劫持模块,其只在测试对象为递归服务器时启用,负责将待测递归服务器发往权威服务器的查询包拦截并转发给下游权威服务器,并接收下游权威服务器的响应报文,按测试目的进行修改和定制,然后转发给待测递归服务器,验证待测递归服务器的响应是否正确。Further, the above system also includes a traffic hijacking module, which is only enabled when the test object is a recursive server, and is responsible for intercepting and forwarding the query packet sent by the recursive server to be tested to the authoritative server to the downstream authoritative server, and receiving the response from the downstream authoritative server The message is modified and customized according to the test purpose, and then forwarded to the recursive server to be tested to verify whether the response of the recursive server to be tested is correct.

本发明的关键点包括以下内容:Key points of the present invention include the following:

1)配置、数据、代码分离的自动化测试设计。测试系统通过配置文件控制各模块的调用,测试数据与代码分离,用户只需维护少量配置与用例文件,即可实现对业务全流程的自动化测试。1) Automated test design for separation of configuration, data, and code. The test system controls the calling of each module through configuration files, and the test data and code are separated. Users only need to maintain a small number of configuration and use case files to realize automated testing of the entire business process.

2)模块化自动化测试方式的设计与实现。将各功能进行模块划分,各模块独立维护和运作,同时结合总控配置的模块启用方式,多模块可以协同配合执行。2) Design and implementation of modular automated testing methods. Each function is divided into modules, and each module is independently maintained and operated. At the same time, combined with the module activation method of the master control configuration, multiple modules can be coordinated and executed.

3)任意定制DNS查询流量的设计。测试系统根据用例描述组装符合用户需求的查询流量。3) Arbitrarily customize the design of DNS query traffic. The test system assembles query traffic that meets user needs according to the use case description.

4)流量截获和定制修改的设计。对递归DNS服务器通过流量拦截、定制修改和转发:在递归与权威服务器间建立通信流量的劫持器,对二者的DNS交互报文进行劫持,并记录中间过程,同时根据用户定制,修改权威服务返回给递归的响应报文(实现了edns-client-subnet协议),为递归构造满足相关测试需求和协议的权威流量。4) Design of traffic interception and custom modification. Traffic interception, custom modification and forwarding of the recursive DNS server: a hijacker that establishes communication traffic between the recursive and authoritative server, hijacks the DNS interaction messages between the two, records the intermediate process, and modifies the authoritative service according to user customization The response message returned to the recursion (implementing the edns-client-subnet protocol) is to recursively construct authoritative traffic that meets the relevant test requirements and protocols.

5)预设响应结果和自动比对的设计。解析待测服务器的响应报文,将其与参考服务器的响应结果或预设期望结果进行自动化对比。5) Design of preset response results and automatic comparison. Parse the response message of the server under test, and automatically compare it with the response result of the reference server or the preset expected result.

本发明的有益效果如下:The beneficial effects of the present invention are as follows:

1)测试自动化率高,且可覆盖绝大部分业务逻辑的功能测试用例,能够显著提高测试效率。1) The test automation rate is high, and the functional test cases that can cover most of the business logic can significantly improve the test efficiency.

2)采用数据驱动的方式,将测试数据和测试脚本分离,用文本文件控制case数据的管理和描述,便于测试人员执行测试,自动化监控测试执行情况。2) Adopt a data-driven approach to separate test data from test scripts, use text files to control the management and description of case data, facilitate testers to execute tests, and automatically monitor test execution.

3)采用模块化管理方式,各功能模块可以协同进行,也可以独立执行,便于测试程序的扩展和维护。3) Modular management is adopted, and each functional module can be carried out collaboratively or independently, which facilitates the expansion and maintenance of the test program.

4)测试对象灵活可配,兼容对权威服务器和递归服务器的测试,参考服务的设置使功能测试有了参照,保障了测试的正确性。4) The test object is flexible and configurable, compatible with the test of the authoritative server and the recursive server. The setting of the reference service makes the function test have a reference and ensures the correctness of the test.

5)针对测试结果的比对方式,节省了人工测试的成本,降低了人为失误的风险,从而实现了对DNS服务器快速可靠的自动化测试。5) The comparison method for test results saves the cost of manual testing and reduces the risk of human error, thereby realizing fast and reliable automated testing of DNS servers.

附图说明Description of drawings

图1是实施例中DNS服务器自动化测试系统的示意图。Fig. 1 is a schematic diagram of a DNS server automated testing system in an embodiment.

图2是实施例中DNS服务器自动化测试方法的步骤流程图。Fig. 2 is a flow chart of the steps of the DNS server automated testing method in the embodiment.

具体实施方式detailed description

为使本发明的上述目的、特征和优点能够更加明显易懂,下面通过具体实施例和附图,对本发明做进一步说明。In order to make the above objects, features and advantages of the present invention more obvious and understandable, the present invention will be further described below through specific embodiments and accompanying drawings.

本发明提出的可以对DNS服务器进行自动化测试的系统,如图1所示,包括以下模块或子系统。The system proposed by the present invention that can automatically test the DNS server, as shown in FIG. 1 , includes the following modules or subsystems.

1)配置管理模块,负责读取和解析总控配置文件内容,通过总控配置文件获取待测DNS服务器的IP及端口、参考DNS服务器的IP及端口、辅服务器列表、测试的功能选择项(包括服务启停、区加载、查询、区传送、异常测试等功能)、查询方式选项(包括TCP\UDP、DNSSEC\非DNSSEC、EDNS0\非EDNS0等查询配置)等配置信息。其中,参考服务器用于为待测DNS服务器的反馈结果提供参考;待测DNS服务器和参考DNS服务器作为主服务器(DNS主服务所在的服务器);辅服务器是指DNS辅助服务所在的服务器,用于与主服务通信,作为备份服务。1) The configuration management module is responsible for reading and analyzing the content of the master control configuration file, and obtains the IP and port of the DNS server to be tested, the IP and port of the reference DNS server, the list of auxiliary servers, and the function options of the test through the master control configuration file ( Including service start and stop, area loading, query, area transfer, exception test, etc.), query mode options (including TCP\UDP, DNSSEC\non-DNSSEC, EDNS0\non-EDNS0 and other query configurations) and other configuration information. Wherein, the reference server is used to provide reference for the feedback result of the DNS server to be tested; the DNS server to be tested and the reference DNS server are used as the main server (the server where the DNS main service is located); the secondary server refers to the server where the DNS auxiliary service is located, for Communicate with the main service, acting as a backup service.

2)服务启停模块,负责远程控制相关服务器的区数据下发、启动和停止。2) The service start-stop module is responsible for remote control of the area data distribution, start and stop of related servers.

3)区加载模块,负责测试DNS服务器加载区文件的功能,该模块程序监测到指定的区数据加载完成后,会将区文件的每条数据逐行查询并判断数据是否加载成功。3) The area loading module is responsible for testing the function of the DNS server to load the area file. After the module program detects that the specified area data is loaded, it will query each piece of data in the area file line by line and determine whether the data is loaded successfully.

4)查询解析模块,负责测试DNS服务器的各查询逻辑是否正确,根据总控配置文件中配置的查询方式发送查询报文,并验证响应结果是否正确。4) The query analysis module is responsible for testing whether each query logic of the DNS server is correct, sends the query message according to the query mode configured in the master control configuration file, and verifies whether the response result is correct.

5)区传送模块,负责测试主辅DNS服务器的数据同步功能,包括全量更新(AXFR)和增量更新(IXFR)。5) The zone transfer module is responsible for testing the data synchronization function of the primary and secondary DNS servers, including full update (AXFR) and incremental update (IXFR).

6)异常测试模块,向DNS服务器发送各种异常包查询请求,测试服务器响应情况,监测服务器是否会出现系统崩溃等异常情况。6) Abnormal test module, which sends various abnormal packet query requests to the DNS server, tests the response of the server, and monitors whether there will be abnormal conditions such as system crashes in the server.

7)流量劫持模块,该模块只在测试对象为递归服务器时启用。负责将待测递归服务器发往权威服务器的查询包拦截并转发给下游权威服务器,并接收下游权威服务器的响应报文,按测试目的进行修改和定制(支持edns-client-subnet扩展协议),然后转发给待测递归服务器,以验证待测递归服务器的响应是否正确。7) Traffic hijacking module, which is only enabled when the test object is a recursive server. Responsible for intercepting and forwarding the query packets sent by the recursive server to be tested to the authoritative server to the downstream authoritative server, and receiving the response message from the downstream authoritative server, modifying and customizing according to the test purpose (supporting the edns-client-subnet extension protocol), and then Forward it to the recursive server to be tested to verify whether the response of the recursive server to be tested is correct.

8)测试报告生成模块,负责对各模块的执行情况汇总,生成测试结果报告。8) The test report generation module is responsible for summarizing the execution of each module and generating a test result report.

其中,各模块需要的配置方式及用例撰写格式做如下说明:Among them, the configuration method and use case writing format required by each module are described as follows:

a)总控配置文件a) Master control configuration file

指定待测服务器IP及端口,指定工作模式(权威主、权威辅或递归),指定发包方式(TCP查询或UDP查询,DNSSEC或非DNSSEC查询,EDNS0或非EDNS0查询,是否启用edns-client-subnet扩展协议),指定执行的模块(启停、区加载、功能查询、错包查询(异常测试)、区传送、缓存、递归流量外发(递归流量中转)等)。Specify the IP and port of the server to be tested, specify the working mode (authoritative primary, authoritative secondary or recursive), specify the packet sending method (TCP query or UDP query, DNSSEC or non-DNSSEC query, EDNS0 or non-EDNS0 query, whether to enable edns-client-subnet Extended protocol), specify the modules to be executed (start and stop, zone loading, function query, error packet query (abnormal test), zone transfer, cache, recursive traffic outgoing (recursive traffic transfer), etc.).

b)服务启停模块b) Service start and stop module

指定要推送到远程服务器的区数据,包括该区数据的区名和存储于本地的区文件路径,格式如下:Specify the zone data to be pushed to the remote server, including the zone name of the zone data and the path of the zone file stored locally. The format is as follows:

Zonename ZonefileZonename Zonefile

Cn /home/zone/cn.txtCn /home/zone/cn.txt

c)区加载模块c) Zone loading module

可根据用户需求,通过配置区加载列表,指定区路径,执行时会按照指定区数据逐行查询并反馈,以此验证该区是否加载成功,格式如下:According to user needs, you can configure the area loading list and specify the path of the area. When executing, it will query and feedback line by line according to the data in the specified area, so as to verify whether the area is loaded successfully. The format is as follows:

ZonepathZonepath

/home/zone/a.cn.txt/home/zone/a.cn.txt

d)查询解析模块d) query analysis module

测试用例文件的设计包括验证方式设置、组包数据和期望文件路径三部分。通过设置标识区分查询结果是与参考服务器的响应结果比对,还是与期望结果文件比对;通过查询包各位设置(如AA、QR、QNAME、QTYPE、QCLASS等位)组装查询包数据;通过期望结果文件路径找到对应期望结果,进行逐字段值比对,且支持对edns-client-subnet协议报文的比对。The design of the test case file includes three parts: verification method setting, package data and expected file path. By setting the flag to distinguish whether the query result is compared with the response result of the reference server or with the expected result file; assemble the query packet data by setting each bit of the query packet (such as AA, QR, QNAME, QTYPE, QCLASS, etc.); The result file path finds the corresponding expected result, performs field-by-field value comparison, and supports the comparison of edns-client-subnet protocol packets.

比较结果一致时,测试系统返回响应报文各字段内容;不一致时,将差异字段信息分别列出,该用例执行结果为False,同时针对每个用例文件生成一个errlist列表(用例错误列表),供快速定位比对结果不一致的用例编号。其中,根据查询方式分别列出tcp和udp方式下的用例错误列表,每行中显示用例编号及查询的域名和类型。When the comparison results are consistent, the test system returns the contents of each field of the response message; when they are inconsistent, the difference field information is listed separately, the execution result of the use case is False, and an errlist list (use case error list) is generated for each use case file at the same time. Quickly locate use case IDs with inconsistent comparison results. Among them, according to the query mode, the list of use case errors in tcp and udp mode is listed respectively, and each line displays the use case number, domain name and type of query.

e)异常测试模块e) Abnormal test module

设置格式错误和协议错误的异常查询包,并为用户提供可根据自身需求构造DNS数据包的接口,包格式为十六进制码。Set abnormal query packets with format errors and protocol errors, and provide users with an interface to construct DNS data packets according to their own needs. The packet format is hexadecimal code.

f)区传送模块f) Area transfer module

指定触发区传送的模式类型,可设置为逐条添加记录、逐条删除记录、逐条添加并删除、批量添加和批量删除记录5种模式。Specify the mode type of the trigger area transmission, which can be set to add records one by one, delete records one by one, add and delete one by one, add records in batches, and delete records in batches.

g)流量劫持模块g) Traffic hijacking module

测试递归服务器时,通过流量劫持模块拦截并定制修改权威响应数据包,然后转发到递归服务器,以全面测试递归服务器对权威响应的处理逻辑。When testing the recursive server, the traffic hijacking module intercepts and customizes and modifies the authoritative response data packet, and then forwards it to the recursive server to fully test the processing logic of the recursive server for the authoritative response.

h)测试报告生成模块h) Test report generation module

所有模块自动化执行完毕后,统计各模块执行情况,生成测试报告。After the automatic execution of all modules is completed, the execution status of each module is counted and a test report is generated.

根据上述系统,本实施例的自动化测试流程如图2所示。其步骤描述如下:According to the above system, the automated testing process of this embodiment is shown in FIG. 2 . Its steps are described as follows:

1)配置总控配置文件,指定待测服务器和参考服务器的IP和端口,选择查询包配置项以及要启用的模块选项;要启动的模块为上述服务启停模块、区加载模块、查询解析模块、区传送模块、异常测试模块、流量劫持模块中的一种或多种;1) Configure the general control configuration file, specify the IP and port of the server to be tested and the reference server, select the query package configuration item and the module option to be enabled; the modules to be started are the above-mentioned service start-stop module, area loading module, and query analysis module , one or more of the area transfer module, the abnormal test module, and the flow hijacking module;

2)根据模块选择情况,依次执行相应模块的启动程序(按照总控配置文件中的顺序执行);2) According to the module selection, execute the start-up program of the corresponding modules in sequence (executed in the order in the master control configuration file);

3)根据各模块的测试流程执行测试用例,将执行结果与期望结果或参考服务器执行结果比对(可以没有参考服务器,而只与期望结果进行比对;或者没有期望结果文件,而只与参考服务器进行比对);3) Execute the test case according to the test process of each module, and compare the execution result with the expected result or the execution result of the reference server (there may be no reference server, but only compare with the expected result; or there is no expected result file, but only with the reference server for comparison);

4)记录各模块用例执行情况,即模块内执行异常的用例总数及用例编号;4) Record the execution status of the use cases of each module, that is, the total number of abnormal use cases and the number of use cases in the module;

5)全部启用模块的用例执行完毕,统计总测试情况,生成测试报告。5) After the use cases of all enabled modules are executed, the total test situation is counted and a test report is generated.

以上实施例仅用以说明本发明的技术方案而非对其进行限制,本领域的普通技术人员可以对本发明的技术方案进行修改或者等同替换,而不脱离本发明的精神和范围,本发明的保护范围应以权利要求书所述为准。The above embodiments are only used to illustrate the technical solution of the present invention and not to limit it. Those of ordinary skill in the art can modify or equivalently replace the technical solution of the present invention without departing from the spirit and scope of the present invention. The scope of protection should be determined by the claims.

Claims (10)

CN201611005843.6A2016-11-152016-11-15 A method and system for automatic testing of DNS serverActiveCN106571981B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201611005843.6ACN106571981B (en)2016-11-152016-11-15 A method and system for automatic testing of DNS server

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201611005843.6ACN106571981B (en)2016-11-152016-11-15 A method and system for automatic testing of DNS server

Publications (2)

Publication NumberPublication Date
CN106571981Atrue CN106571981A (en)2017-04-19
CN106571981B CN106571981B (en)2019-07-19

Family

ID=58542329

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201611005843.6AActiveCN106571981B (en)2016-11-152016-11-15 A method and system for automatic testing of DNS server

Country Status (1)

CountryLink
CN (1)CN106571981B (en)

Cited By (13)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN107635024A (en)*2017-09-152018-01-26郑州云海信息技术有限公司 An automatic test method for automatic identification of server IP
CN107769957A (en)*2017-08-302018-03-06贵州白山云科技有限公司A kind of domain name system failure cause analysis method and device
CN108768960A (en)*2018-05-102018-11-06腾讯科技(深圳)有限公司Method for detecting virus, device, storage medium and computer equipment
CN108933693A (en)*2017-05-262018-12-04贵州白山云科技有限公司A kind of Domain Name Service System fault handling method and system
CN109067938A (en)*2018-10-152018-12-21网宿科技股份有限公司A kind of method and device for testing dns server
CN110098978A (en)*2019-04-122019-08-06网宿科技股份有限公司A kind of test method, device and the network equipment of DNS scheduling
CN110321287A (en)*2019-06-202019-10-11北京奇艺世纪科技有限公司A kind of detection method of server capability, device and electronic equipment
CN110389897A (en)*2019-06-182019-10-29深圳壹账通智能科技有限公司 SDK logic test method, device, storage medium and server
CN110661677A (en)*2018-06-292020-01-07贵州白山云科技股份有限公司DNS (Domain name System) testing method, device and system
CN110659202A (en)*2019-08-122020-01-07网宿科技股份有限公司Client automatic testing method and device
CN110769076A (en)*2018-07-262020-02-07贵州白山云科技股份有限公司DNS (Domain name System) testing method and system
CN111064638A (en)*2019-12-132020-04-24腾讯科技(深圳)有限公司Method, device, equipment and storage medium for testing e-mail protocol service
CN113079070A (en)*2021-06-072021-07-06中国电子信息产业集团有限公司第六研究所Method and device for monitoring response performance of domain name system

Citations (5)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN101217425A (en)*2008-01-042008-07-09中兴通讯股份有限公司Web testing method and device
CN104899134A (en)*2015-04-292015-09-09中国互联网络信息中心Automatic domain name registration server testing system and method
CN104901845A (en)*2015-05-182015-09-09中国互联网络信息中心Automation test system and method of domain name WHOIS service
CN104954196A (en)*2015-04-242015-09-30中国互联网络信息中心Automatic test method and system for DNS incremental data update service
US20160150004A1 (en)*2014-11-202016-05-26F-Secure CorporationIntegrity Check of DNS Server Setting

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN101217425A (en)*2008-01-042008-07-09中兴通讯股份有限公司Web testing method and device
US20160150004A1 (en)*2014-11-202016-05-26F-Secure CorporationIntegrity Check of DNS Server Setting
CN104954196A (en)*2015-04-242015-09-30中国互联网络信息中心Automatic test method and system for DNS incremental data update service
CN104899134A (en)*2015-04-292015-09-09中国互联网络信息中心Automatic domain name registration server testing system and method
CN104901845A (en)*2015-05-182015-09-09中国互联网络信息中心Automation test system and method of domain name WHOIS service

Cited By (18)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN108933693A (en)*2017-05-262018-12-04贵州白山云科技有限公司A kind of Domain Name Service System fault handling method and system
CN108933693B (en)*2017-05-262021-06-22贵州白山云科技股份有限公司Domain name service system fault processing method and system
CN107769957A (en)*2017-08-302018-03-06贵州白山云科技有限公司A kind of domain name system failure cause analysis method and device
CN107635024A (en)*2017-09-152018-01-26郑州云海信息技术有限公司 An automatic test method for automatic identification of server IP
CN108768960A (en)*2018-05-102018-11-06腾讯科技(深圳)有限公司Method for detecting virus, device, storage medium and computer equipment
CN110661677A (en)*2018-06-292020-01-07贵州白山云科技股份有限公司DNS (Domain name System) testing method, device and system
CN110769076B (en)*2018-07-262022-06-03贵州白山云科技股份有限公司DNS (Domain name System) testing method and system
CN110769076A (en)*2018-07-262020-02-07贵州白山云科技股份有限公司DNS (Domain name System) testing method and system
CN109067938A (en)*2018-10-152018-12-21网宿科技股份有限公司A kind of method and device for testing dns server
CN110098978B (en)*2019-04-122021-02-26网宿科技股份有限公司DNS scheduling test method and device, network equipment and storage medium
CN110098978A (en)*2019-04-122019-08-06网宿科技股份有限公司A kind of test method, device and the network equipment of DNS scheduling
CN110389897A (en)*2019-06-182019-10-29深圳壹账通智能科技有限公司 SDK logic test method, device, storage medium and server
CN110321287A (en)*2019-06-202019-10-11北京奇艺世纪科技有限公司A kind of detection method of server capability, device and electronic equipment
CN110659202A (en)*2019-08-122020-01-07网宿科技股份有限公司Client automatic testing method and device
CN111064638A (en)*2019-12-132020-04-24腾讯科技(深圳)有限公司Method, device, equipment and storage medium for testing e-mail protocol service
CN111064638B (en)*2019-12-132022-09-30腾讯科技(深圳)有限公司Method, device, equipment and storage medium for testing e-mail protocol service
CN113079070A (en)*2021-06-072021-07-06中国电子信息产业集团有限公司第六研究所Method and device for monitoring response performance of domain name system
CN113079070B (en)*2021-06-072021-08-27中国电子信息产业集团有限公司第六研究所Method and device for monitoring response performance of domain name system

Also Published As

Publication numberPublication date
CN106571981B (en)2019-07-19

Similar Documents

PublicationPublication DateTitle
CN106571981B (en) A method and system for automatic testing of DNS server
CN110647469B (en)Micro-service testing method and device, computer equipment and storage medium
CN109361562B (en)Automatic testing method based on associated network equipment access
US8959000B2 (en)Integrated testing systems and methods
CN113206763A (en)Simulation test system and method suitable for Internet of things management platform
US20100125667A1 (en)Dynamic configuration of virtual machines
US11811844B2 (en)Product validation based on simulated enhanced calling or messaging communications services in telecommunications network
CN111930625B (en)Log acquisition method, device and system based on cloud service platform
CN109995614B (en)Alpha testing method and device
US20230081333A1 (en)Unified interface and tracing tool for network function virtualization architecture
CN113312064B (en)Method and device for installing and configuring physical machine and computer readable medium
CN112463572B (en)Cross-border multi-service dial testing software testing system and method thereof
CN111064638B (en)Method, device, equipment and storage medium for testing e-mail protocol service
CN104899134B (en)Domain name registration service device automatization test system and method
CN111538606A (en)Method, device and equipment for testing and simulating Dubbo interface
CN101765129A (en)Network access test system and method for data value-added service
CN106649099A (en)Automatic testing method and system for DNS monitoring service
US11275674B1 (en)Operations support system (OSS) test tool
CN119201669A (en) Business service status detection method and device, electronic device, and storage medium
WO2023032115A1 (en)Network management device, network management method, and network management system
CN100389627C (en)Testing equipment of short message interface
CN105988932B (en)A kind of test method and system of ESB
CN113923134B (en)Interface testing method and device
CN117155890B (en)Method and device for processing applet message and electronic equipment
CN116668347B (en) A detection processing method, device, system, storage medium and electronic device

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp