WO2021189852A1 - 私有域名自动化测试方法、装置、设备及存储介质 - Google Patents

私有域名自动化测试方法、装置、设备及存储介质 Download PDF

Info

Publication number
WO2021189852A1
WO2021189852A1 PCT/CN2020/125012 CN2020125012W WO2021189852A1 WO 2021189852 A1 WO2021189852 A1 WO 2021189852A1 CN 2020125012 W CN2020125012 W CN 2020125012W WO 2021189852 A1 WO2021189852 A1 WO 2021189852A1
Authority
WO
WIPO (PCT)
Prior art keywords
domain name
private
cloud servers
test
private domain
Prior art date
Application number
PCT/CN2020/125012
Other languages
English (en)
French (fr)
Inventor
冯嘉美
Original Assignee
平安科技(深圳)有限公司
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 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2021189852A1 publication Critical patent/WO2021189852A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/12Network monitoring probes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/45Network directories; Name-to-address mapping
    • H04L61/4505Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols
    • H04L61/4511Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols using domain name system [DNS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes

Definitions

  • This application relates to the field of testing technology, and in particular to a method, device, equipment and computer-readable storage medium for automated testing of private domain names.
  • PrivateZone is a private domain name system service based on a private network (VPC, VirtualPrivateCloud) environment.
  • VPC VirtualPrivateCloud
  • SLB host name and server load balance
  • OSS OperationSupportSystems
  • other cloud resources but these private domain names will not be accessible outside the VPC.
  • SLB server load balance
  • OSS OperationSupportSystems
  • the open source tool needs to provide a domain name test file to be resolved.
  • VPC network creates a cloud server and add private domain names and records, bind VPC, configure test files, and manually log in to different cloud servers for testing. It takes a lot of manpower, is inefficient and error-prone.
  • the existing test methods are no longer possible. It satisfies the performance test and the functional regression test in the rapid iteration of the product. Therefore, there is currently a technical problem of low efficiency of the existing domain name test methods.
  • This application provides an automated testing method for private domain names, and the automated testing method for private domain names includes the following steps:
  • This application also provides an automated testing device for private domain names, the automated testing device for private domain names includes:
  • the domain name record creation module is used to deploy multiple cloud servers in a preset private network based on a preset specific image, and create a private domain name associated with the private network and a private domain name corresponding to the private domain name record;
  • the test file generation module is used to batch edit the private domain name records, and automatically generate multiple domain name test files corresponding to the batch edited private domain name records;
  • the domain name test parallel module is used to upload multiple domain name test files to multiple cloud servers in a multi-threaded manner when logging in to multiple cloud servers, so as to compare multiple cloud servers on multiple cloud servers.
  • the domain name test files mentioned above are tested in parallel.
  • the automated test equipment for private domain names includes a processor, a memory, and a private domain name automated test program stored on the memory and executable by the processor, wherein the When the private domain name automated test program is executed by the processor, the steps of the private domain name automated test method described below are implemented:
  • the present application also provides a computer-readable storage medium with a private domain name automated test program stored on the computer-readable storage medium, where the private domain name automated test program is executed by a processor to realize the following private domain name automation Steps of the test method:
  • FIG. 1 is a schematic diagram of the hardware structure of a private domain name automated test device involved in the solution of the embodiment of the application;
  • FIG. 2 is a schematic flowchart of a first embodiment of an automated test method for applying for a private domain name
  • Figure 3 is a schematic diagram of the functional modules of the automated testing device for private domain names of this application.
  • the private domain name automated test method involved in the embodiments of the present application is mainly applied to private domain name automated test equipment.
  • the private domain name automated test equipment may be a PC, a portable computer, a mobile terminal, or other equipment with display and processing functions.
  • FIG. 1 is a schematic diagram of the hardware structure of the private domain name automated test equipment involved in the solution of the embodiment of the application.
  • the private domain name automated test equipment may include a processor 1001 (for example, a CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005.
  • 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), an input unit such as a keyboard (Keyboard);
  • the network interface 1004 may optionally include a standard wired interface, a wireless interface (Such as a WI-FI interface);
  • the memory 1005 may be a high-speed RAM memory or a non-volatile memory (non-volatile memory), such as a disk memory.
  • the memory 1005 may optionally be a storage device independent of the aforementioned processor 1001.
  • FIG. 1 does not constitute a limitation on the automated test equipment for private domain names, and may include more or less components than shown in the figure, or a combination of certain components, or different components Layout.
  • the memory 1005 as a computer-readable storage medium in FIG. 1 may include an operating system, a network communication module, and a private domain name automated test program.
  • the network communication module is mainly used to connect to the server and perform data communication with the server; and the processor 1001 can call the private domain name automated test program stored in the memory 1005, and execute the private domain name automated test method provided in the embodiment of this application .
  • PrivateZone is a private DNS service based on the VPC (VirtualPrivateCloud) environment. Through PrivateZone, users can use private domain name records to manage cloud resources such as the host name, SLB, and OSS of the cloud server in the VPC. But these private domain names will not be accessible outside the VPC. At present, there is no good automatic verification method for function and performance stress testing of PrivateZone. It is necessary to manually log in to the corresponding ECS to verify the private domain name and use the dnsperf open source tool for performance testing and stress testing.
  • this application provides an automated test method for private domain names, that is, deploying multiple cloud servers based on specific images, so there is no need to log in to multiple cloud servers and repeatedly install domain name resolution tools, which improves the efficiency of server deployment in the early stage;
  • By automatically editing private domain name records in batches, and automatically generating corresponding domain name test files it avoids manually editing private domain name records one by one, and there is no need to waste manpower to configure domain name test files, which greatly improves the efficiency of obtaining domain name test files;
  • By uploading files to the cloud server in a multi-threaded manner and performing domain name testing in parallel on the cloud server the efficiency of domain name testing is further improved, thereby solving the technical problem of low efficiency of the existing domain name testing methods.
  • FIG. 2 is a schematic flowchart of a first embodiment of a method for automated testing of private domain names in this application.
  • the first embodiment of the present application provides an automated testing method for private domain names.
  • the automated testing method for private domain names includes the following steps:
  • Step S10 deploy multiple cloud servers in a preset private network based on a preset specific image, and create a private domain name associated with the private network and a private domain name record corresponding to the private domain name;
  • the method is applied to a system equipped with an automated test program for private domain names (hereinafter referred to as the system).
  • the preset private network is a virtual private cloud network (VPC, VirtualPrivateCloud), which can be an isolated virtual network environment built on a cloud platform where users can manage configurations and policies.
  • VPC is a dynamic configuration pool of public cloud computing resources, which requires the use of encryption protocols, tunneling protocols, and other security procedures to transfer data between private enterprises and cloud service providers.
  • Cloud server is an IT infrastructure capacity leasing service that integrates computing, storage and network resources, and can provide server leasing services based on the cloud computing model for on-demand use and on-demand payment capabilities. Customers can deploy the required server environment through the self-service platform of the web interface.
  • the system first initializes the network environment, first creates the VPC network, and deploys the cloud server using the pre-packaged image of the domain name resolution tool set, so that the cloud server has a domain name resolution test function.
  • the system then creates a private domain name zone in the current virtual cloud network, and realizes the association with the current virtual cloud network by calling related functions for binding the VPC.
  • a private domain name can be associated with one or more VPCs.
  • the cloud server can access the zone.
  • the system adds a resolution record for the currently created zone, which is the aforementioned private domain name record, to map the private domain name to an IP address.
  • the private domain name can be a real domain name on the public network, or a non-real domain name on the public network.
  • Step S20 Perform batch editing on the private domain name records, and automatically generate multiple domain name test files corresponding to the batch-edited private domain name records;
  • the editing mode can be add, update, delete, and so on. Since it is necessary to generate thousands of resolution record records (that is, the above-mentioned private domain name records) during performance testing, this system can add, update or delete records in batches through automation technology. In the actual application process, mainly It is to add records in batches. After the batch editing of the record is completed, the system can automatically generate multiple domain name resolution files corresponding to the edited record through a preset script.
  • the above-mentioned multiple domain name resolution files may be partially the same domain name resolution files, or may be different domain name resolution files for each, or may also be the same domain name resolution files for each.
  • the generation time of each file can be the same or different. For example, add a new zone at the first moment, add or modify a record, automatically generate several domain name test files according to the script, and then add a new zone at the second moment, add or modify the record again, and generate several new domain name test files .
  • the above-mentioned multiple domain name test files may refer to multiple domain name test files automatically generated at a certain moment, or may refer to the sum of domain name test files automatically generated at multiple moments.
  • Step S30 When logging in to multiple cloud servers, upload multiple domain name test files to multiple cloud servers in a multi-threaded manner, so as to test multiple domain name test files on multiple cloud servers Perform domain name tests in parallel.
  • the system when multiple cloud servers have been logged in at the same time, the system obtains the current performance resource usage information, and determines the maximum number of concurrent threads according to the current performance resource usage information, and then creates a corresponding number of threads according to the maximum number of concurrent threads, and Multiple domain name test files are concurrently uploaded to multiple cloud servers in a corresponding number of threads.
  • the cloud server passes the installed domain name test tool such as dnsperf, and performs domain name performance test based on the received domain name test file.
  • the system at the beginning of the performance test, enable monitor to monitor and collect DNS (Domain Name System Protocol) server performance indicators, such as CPU occupancy data, and close the monitor at the end of the performance test, and use the collected performance indicator data as performance Reference standard for test results.
  • DNS Domain Name System Protocol
  • the operation of the system to log in to the cloud server can also be in a multi-threaded manner, through the pre-stored quick connection handle to send login requests and log in to multiple cloud servers at the same time.
  • the type of domain name test may specifically be performance test, function test, etc.
  • the method is executed according to the following steps.
  • the first step is to create a vpc1 (private network), create a subnet under the private network, and use a custom image to create ECS1 (cloud host) under this subnet.
  • the custom image is already installed.
  • dns testing tools such as dig, dnsperf, queryperf, etc. Check whether the network and tools are working normally. You can log in to ECS to check whether the public domain name can be resolved, and whether you can use dig, dnsperf, queryperf tools, etc. (If you want to perform multi-host concurrent domain name resolution, you can use this subnet to create multiple ECSs).
  • the second step is to record the information corresponding to the created ECS: user name and password, IP address (if you need to log in, you also need to provide the IP, user name and password of the springboard) into the configuration file of the automated test system.
  • the third step is to create a zone: test.dns, create a corresponding record in the zone, such as *, www, a and other records, bind vpc1 to the zone of "test.dns", and automatically generate a domain name test file through the script, For example, generate 2000 A records with zone "test.dns"*5: "pythongenerate_querydns_txt.py -z "test.dns" -n2000".
  • the fourth step is to upload the test file querydnx.txt generated in the third step to ECS1, and perform a domain name resolution test on ECS1: dnsperf -dquerydns.txt -s28.0.132.230–t300.
  • the fifth step after the test is completed, collect and record the test results, performance indicators, and clean up the environment. First unbind the zones to vpc1 respectively, delete the corresponding zone, release ecs1, and then release the corresponding subnet, delete vpc1.
  • this application deploys multiple cloud servers in a preset private network based on a preset specific image, and creates a private domain name associated with the private network, and a private domain name corresponding to the private domain name.
  • Private domain name records batch edit the private domain name records, and automatically generate multiple domain name test files corresponding to the batch-edited private domain name records; when logging in to multiple cloud servers, multiple The domain name test file is uploaded to a plurality of cloud servers, so as to perform a domain name test on the plurality of domain name test files in parallel on the plurality of cloud servers.
  • this application deploys multiple cloud servers based on specific images, so there is no need to log in to multiple cloud servers to repeatedly install domain name resolution tools, which improves the efficiency of server deployment in the early stage; by automatically editing private domain names in batches, Corresponding domain name test files are automatically generated, avoiding manual editing of private domain name records one by one, and no need to waste manpower to configure domain name test files, thus greatly improving the efficiency of obtaining domain name test files; uploading files to cloud servers through multi-threading Performing domain name testing in parallel on the cloud server further improves the efficiency of domain name testing, thereby solving the technical problem of low efficiency of existing domain name testing methods.
  • step S10 includes:
  • the private network and the domain name resolution tool are normal, create a private domain name, associate the private domain name with the private network, and create a private domain name record corresponding to the private domain name.
  • the system first initializes the network environment.
  • the system first creates a VPC network, and deploys the cloud server with a pre-packaged image with a domain name resolution tool set (such as dnsperf), so that the cloud server has a domain name resolution test function.
  • a domain name resolution tool set such as dnsperf
  • the system will cache the original information of the cloud server.
  • the original information may include IP address, user name, password, etc.
  • the system generates a quick connection handle for quickly logging in to the cloud server based on the original information of these cloud servers, so that it can be released when the cloud server needs to be logged in later.
  • the system After creating the VPC and deploying the cloud server, the system also needs to check the current network environment and analytical test tools, for example, check whether the current VPC network can connect to the external network, the test tools can be used normally, etc., the specific inspection methods It is usually used to issue a basic instruction and obtain information in response to the basic instruction to determine whether the response information matches the preset standard response information. If it does not match, the system needs to debug the current network environment until the network environment and tools can be used normally; if they match, the system can determine that the network environment and tools are normal at this time. After the system checks the current network environment, it can enter the business logic test part.
  • the system creates a private domain name zone in the current virtual cloud network, and realizes the association with the current virtual cloud network by calling related functions for binding the VPC.
  • a private domain name can be associated with one or more VPCs.
  • the cloud server can access the zone.
  • the system adds a resolution record for the currently created private domain name, which is the private domain name record mentioned above, to map the private domain name to the IP address.
  • the private domain name can be a real domain name on the public network or a non-real existence on the public network. Domain name.
  • the resolution record can be a record used to specify the IP address corresponding to the private domain name, and it can include multiple types, for example, the A record (A (Address) record is used to specify the IP address record corresponding to the host name (or domain name).
  • a (Address) record is used to specify the IP address record corresponding to the host name (or domain name).
  • the user can Point the web server under the domain name to your own web server (webserver).
  • CNAME record alias record
  • pointer PTR, PointerRecord
  • AAAA record used to transfer DNS records that resolve domain names to IPv6 addresses, users can resolve a domain name to IPv6 addresses, or subdomains to IPv6 addresses
  • TXT records generally refer to instructions for a host name or domain name settings
  • email Exchange MX, MailExchanger
  • step S10 it further includes:
  • the quick connection handle generated according to the original information when the cloud server is deployed is released, and the system can directly log in to the corresponding cloud server through the quick connection handle, without the need to create multiple cloud servers.
  • a secure shell protocol (ssh, SecureShell) connection release the ssh connection after the test is completed.
  • step S30 includes:
  • the current performance resource usage information may include the current CPU occupancy rate, memory occupancy rate, and so on.
  • the system determines the real-time maximum number of concurrent threads according to the current supportable resource situation, so as to upload as many domain name test files concurrently as possible at the same time. Different cloud servers can perform domain name performance tests on the incoming domain name test files at the same time.
  • the cloud server is created based on a specific image, so there is no need to log in to the cloud server and repeat the installation of dnsperf, and it can Create multiple cloud servers flexibly and save the corresponding login information for automatic login.
  • testers you do not need to pay attention to details, but only need to pay attention to the business logic itself; you can log in to the corresponding cloud server directly through the quick connection handle, without the need to establish Multiple ssh connections, release the ssh connection after the test is completed to avoid occupying memory space.
  • step S30 the method includes:
  • Unbind the private network and the abnormal private domain name and delete the abnormal private domain name and the abnormal cloud server to perform fault tolerance processing.
  • the system detects in real time whether there is an abnormality or an error. If there is, it determines the private domain name and the cloud server that are currently abnormal, unbinds the private domain name from the private network, and deletes the abnormal private domain name and The cloud server performs fault-tolerant processing on this exception to prevent this exception from affecting the performance test process on other cloud servers.
  • step S20 includes:
  • a preset test file generation script is used to automatically generate multiple domain name test files corresponding to the batch-added and/or deleted private domain name records, wherein the multiple domain name test files are stored in the blockchain.
  • the tester needs to load a test file generation script for automatically generating a domain name test file on the system in advance.
  • the system receives this batch adding instruction and / Or delete instructions in batches, and automatically add and/or delete resolution records in batches (that is, the aforementioned private domain name records) according to the instructions.
  • the system uses a preset script to automatically generate multiple domain name test files corresponding to the batch-added and/or deleted private domain name records.
  • the above-mentioned domain name test file can also be stored in a node of a blockchain.
  • step S30 it further includes:
  • the system automatically collects the performance test results on each cloud server, aggregates all the performance test results, and writes them into the database to perform persistent management on the performance test result data.
  • the system needs to perform environmental recovery operations. It is necessary to unbind the private domain name associated with the VPC, then delete the private domain name and each cloud server, and finally delete the VPC to complete the restoration of the network environment.
  • the blockchain referred to in this application is a new application mode of computer technology such as distributed data storage, point-to-point transmission, consensus mechanism, and encryption algorithm.
  • Blockchain essentially a decentralized database, is a series of data blocks associated with cryptographic methods. Each data block contains a batch of network transaction information for verification. The validity of the information (anti-counterfeiting) and the generation of the next block.
  • the blockchain can include the underlying platform of the blockchain, the platform product service layer, and the application service layer.
  • fault-tolerant processing of exceptions that occur during the test is performed to prevent the exception from affecting the performance test process on other cloud servers; the private domain name records are automatically edited in batches, and corresponding domain name test files are automatically generated , It avoids manually editing private domain name records one by one, and does not need to waste manpower to configure domain name test files, which greatly improves the efficiency of obtaining domain name test files; it can automatically collect the test results on each cloud server during the test, and the performance During the test, it can automatically monitor and collect the performance indicators of the server to facilitate unified collection and persistent management of the results; by restoring the network environment after the test is completed, to prevent the parameters from affecting the environment during the execution process, and to avoid data residue , Occupying resources.
  • the present application also provides an automated testing device for private domain names, and the automated testing device for private domain names includes:
  • the domain name record creation module 10 is used to deploy multiple cloud servers in a preset private network based on a preset specific image, and create a private domain name associated with the private network, and a private domain name corresponding to the private domain name.
  • the test file generating module 20 is used for batch editing the private domain name records, and automatically generating multiple domain name test files corresponding to the batch edited private domain name records;
  • the domain name test parallel module 30 is used to upload multiple domain name test files to multiple cloud servers in a multi-threaded manner when logging in to multiple cloud servers, so as to compare multiple The domain name test file performs a domain name test in parallel.
  • the domain name record creation module 10 includes:
  • An image deployment unit configured to use an image equipped with a preset domain name resolution tool set as the specific image to deploy multiple cloud servers;
  • a handle generating unit configured to retain the original information of the multiple cloud servers, and generate a quick connection handle for quickly logging in to the multiple cloud servers according to the original information
  • a state judgment unit configured to judge whether the private network and the domain name resolution tools deployed on the plurality of cloud servers are normal
  • a record creation unit configured to create a private domain name if the private network and the domain name resolution tool are normal, associate the private domain name with the private network, and create a private domain name record corresponding to the private domain name .
  • the automatic testing device for private domain names further includes:
  • the handle registration module is configured to use the quick connection handle to log in to multiple cloud servers at the same time to upload multiple test files of the domain name.
  • the domain name test parallel module 30 includes:
  • the thread determination unit is configured to obtain current performance resource usage information when logging in to multiple cloud servers, and determine the maximum number of concurrent threads according to the current performance resource usage information;
  • the concurrent uploading unit is configured to create a corresponding number of threads according to the maximum number of concurrent threads, and upload multiple of the domain name test files to multiple cloud servers concurrently in the corresponding number of threads, so as to upload data to multiple cloud servers.
  • the server performs a domain name test on a plurality of said domain name test files in parallel.
  • the automatic testing device for private domain names further includes:
  • the abnormality detection module is used to determine the abnormal private domain name and abnormal cloud server where the abnormality is located when an abnormality is detected in the current domain name performance test process, and interrupt the domain name test operation on the abnormal cloud server;
  • the fault-tolerant processing module is used to unbind the private network from the abnormal private domain name, and delete the abnormal private domain name and the abnormal cloud server to perform fault-tolerant processing.
  • test file generating module 20 includes:
  • the batch editing unit is configured to batch add and/or delete the private domain name records based on the batch add instruction and/or batch delete instruction when receiving the batch add instruction and/or bulk delete instruction;
  • the script using unit is used to generate a script using a preset test file, and automatically generate multiple domain name test files corresponding to the batch added and/or deleted private domain name records, wherein the multiple domain name test files are stored in the district Block chain.
  • the automatic testing device for private domain names further includes:
  • the result collection module is used to collect and summarize the test results of the multiple domain name test files on the multiple cloud servers;
  • the environment restoration module is used to unbind the private network and delete the private domain name to restore the network environment.
  • This application also provides an automated test equipment for private domain names.
  • the private domain name automated test equipment includes a processor, a memory, and a private domain name automated test program that is stored on the memory and can run on the processor, where the private domain name automated test program is executed by the processor , To achieve the steps of the private domain name automated test method as described above.
  • the method implemented when the private domain name automated test program is executed can refer to the various embodiments of the private domain name automated test method of this application, which will not be repeated here.
  • the embodiment of the present application also provides a computer-readable storage medium.
  • the computer-readable storage medium may be non-volatile or volatile.
  • the computer-readable storage medium of the present application stores a private domain name automated test program, wherein when the private domain name automated test program is executed by a processor, the steps of the above-mentioned private domain name automated test method are realized.
  • the method implemented when the private domain name automated test program is executed can refer to the various embodiments of the private domain name automated test method of this application, which will not be repeated here.
  • the technical solution of this application essentially or the part that contributes to the existing technology can be embodied in the form of a software product, and the computer software product is stored in a storage medium (such as ROM/RAM) as described above. , Magnetic disks, optical disks), including several instructions to make a terminal device (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) execute the method described in each embodiment of the present application.
  • a terminal device which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Debugging And Monitoring (AREA)

Abstract

一种私有域名自动化测试方法、装置、设备及计算机可读存储介质。通过基于特定镜像部署多个云服务器,因此不需要分别登录多个云服务器重复安装域名解析工具,提升了前期服务器的部署效率;通过自动化地对私有域名记录进行批量编辑,并自动生成对应的域名测试文件,避免了手动对私有域名记录逐个编辑,也无需耗费人力配置域名测试文件,从而大大提升了域名测试文件的获取效率;通过采用多线程方式上传文件至云服务器并在云服务器上并行执行域名测试,进一步提升了域名测试的效率。此外,还涉及区块链技术,上述域名测试文件可存储于区块链中。

Description

私有域名自动化测试方法、装置、设备及存储介质
本申请要求于2020年09月07日提交中国专利局、申请号为202010933635.2,发明名称为“私有域名自动化测试方法、装置、设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及测试技术领域,尤其涉及一种私有域名自动化测试方法、装置、设备及计算机可读存储介质。
背景技术
PrivateZone(私有域名),是基于专有网络(VPC,VirtualPrivateCloud)环境的私有域名系统服务,通过PrivateZone,用户可以使用私有域名记录来管理VPC中的云服务器的主机名、服务器负载均衡(SLB,ServerLoadBalancer)、操作支持系统(OSS,OperationSupportSystems)等云资源。但是这些私有域名在VPC之外将无法访问。目前,针对PrivateZone进行功能、性能压力测试没有很好的自动化验证方法,需要人工登录到对应云服务器对私有域名进行验证和采用域名测试工具进行性能测试和压测。
发明人意识到,在对PrivateZone进行性能测试时,需要多台云服务器安装域名测试工具进行测试,此外该开源工具需要提供要解析的域名测试文件,随着测试数据量的增大,通过手动创建VPC网络,创建云服务器并添加私有域名和记录,绑定VPC,配置测试文件,分别手工登录到不同的云服务器进行测试需要耗费大量的人力,效率低下且容易出错,现有的测试方法已经不能满足性能测试和产品快速迭代过程中的功能回归测试,因此,当前存在着现有的域名测试方式的效率低下的技术问题。
技术解决方案
本申请提供一种私有域名自动化测试方法,所述私有域名自动化测试方法包括以下步骤:
基于预设的特定镜像部署预设的专有网络中的多个云服务器,并创建与所述专有网络关联的私有域名,以及与所述私有域名对应的私有域名记录;
对所述私有域名记录进行批量编辑,并自动生成与批量编辑后的私有域名记录对应的多个域名测试文件;
在登录多个所述云服务器时,按照多线程方式将多个所述域名测试文件上传至多个所述云服务器,以在多个所述云服务器上对多个所述域名测试文件并行进行域名测试。
本申请还提供一种私有域名自动化测试装置,所述私有域名自动化测试装置包括:
域名记录创建模块,用于基于预设的特定镜像部署预设的专有网络中的多个云服务器,并创建与所述专有网络关联的私有域名,以及与所述私有域名对应的私有域名记录;
测试文件生成模块,用于对所述私有域名记录进行批量编辑,并自动生成与批量编辑后的私有域名记录对应的多个域名测试文件;
域名测试并行模块,用于在登录多个所述云服务器时,按照多线程方式将多个所述域名测试文件上传至多个所述云服务器,以在多个所述云服务器上对多个所述域名测试文件并行进行域名测试。
本申请还提供一种私有域名自动化测试设备,所述私有域名自动化测试设备包括处理器、存储器、以及存储在所述存储器上并可被所述处理器执行的私有域名自动化测试程序,其中所述私有域名自动化测试程序被所述处理器执行时,实现如下所述的私有域名自动化测试方法的步骤:
基于预设的特定镜像部署预设的专有网络中的多个云服务器,并创建与所述专有网络关联的私有域名,以及与所述私有域名对应的私有域名记录;
对所述私有域名记录进行批量编辑,并自动生成与批量编辑后的私有域名记录对应的多个域名测试文件;
在登录多个所述云服务器时,按照多线程方式将多个所述域名测试文件上传至多个所述云服务器,以在多个所述云服务器上对多个所述域名测试文件并行进行域名测试。
本申请还提供一种计算机可读存储介质,所述计算机可读存储介质上存储有私有域名自动化测试程序,其中所述私有域名自动化测试程序被处理器执行时,实现如下所述的私有域名自动化测试方法的步骤:
基于预设的特定镜像部署预设的专有网络中的多个云服务器,并创建与所述专有网络关联的私有域名,以及与所述私有域名对应的私有域名记录;
对所述私有域名记录进行批量编辑,并自动生成与批量编辑后的私有域名记录对应的多个域名测试文件;
在登录多个所述云服务器时,按照多线程方式将多个所述域名测试文件上传至多个所述云服务器,以在多个所述云服务器上对多个所述域名测试文件并行进行域名测试。
附图说明
图1为本申请实施例方案中涉及的私有域名自动化测试设备的硬件结构示意图;
图2为本申请私有域名自动化测试方法第一实施例的流程示意图;
图3为本申请私有域名自动化测试装置的功能模块示意图。
本申请目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。
本发明的实施方式
应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
本申请实施例涉及的私有域名自动化测试方法主要应用于私有域名自动化测试设备,该私有域名自动化测试设备可以是PC、便携计算机、移动终端等具有显示和处理功能的设备。
参照图1,图1为本申请实施例方案中涉及的私有域名自动化测试设备的硬件结构示意图。本申请实施例中,私有域名自动化测试设备可以包括处理器1001(例如CPU),通信总线1002,用户接口1003,网络接口1004,存储器1005。其中,通信总线1002用于实现这些组件之间的连接通信;用户接口1003可以包括显示屏(Display)、输入单元比如键盘(Keyboard);网络接口1004可选的可以包括标准的有线接口、无线接口(如WI-FI接口);存储器1005可以是高速RAM存储器,也可以是稳定的存储器(non-volatilememory),例如磁盘存储器,存储器1005可选的还可以是独立于前述处理器1001的存储装置。
本领域技术人员可以理解,图1中示出的硬件结构并不构成对私有域名自动化测试设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。
继续参照图1,图1中作为一种计算机可读存储介质的存储器1005可以包括操作系统、网络通信模块以及私有域名自动化测试程序。
在图1中,网络通信模块主要用于连接服务器,与服务器进行数据通信;而处理器1001可以调用存储器1005中存储的私有域名自动化测试程序,并执行本申请实施例提供的私有域名自动化测试方法。
基于上述硬件结构,提出本申请私有域名自动化测试方法的各个实施例。
PrivateZone,是基于专有网络VPC(VirtualPrivateCloud)环境的私有DNS服务,通过PrivateZone,用户可以使用私有域名记录来管理VPC中的云服务器的主机名、SLB、OSS等云资源。但是这些私有域名在VPC之外将无法访问。目前,针对PrivateZone进行功能、性能压力测试没有很好的自动化验证方法,需要人工登录到对应ECS对私有域名进行验证和采用dnsperf开源工具进行性能测试和压测。
在对PrivateZone进行性能测试时,需要多台云服务器安装dnsperf工具进行测试,此外该开源工具需要提供要解析的域名测试文件,随着测试数据量的增大,通过手动创建VPC网络,创建云服务器并添加Zone和Record,绑定VPC,配置测试文件,分别手工登录到不同的云服务器进行测试需要耗费大量的人力,效率低下且容易出错,现有的测试方法已经不能满足性能测试和产品快速迭代过程中的功能回归测试,因此,当前存在着现有的域名测试方式的效率低下的技术问题。
为解决上述问题,本申请提供一种私有域名自动化测试方法,即通过基于特定镜像部署多个云服务器,因此不需要分别登录多个云服务器重复安装域名解析工具,提升了前期服务器的部署效率;通过自动化地对私有域名记录进行批量编辑,并自动生成对应的域名测试文件,避免了手动对私有域名记录逐个编辑,也无需耗费人力配置域名测试文件,从而大大提升了域名测试文件的获取效率;通过采用多线程方式上传文件至云服务器并在云服务器上并行执行域名测试,进一步提升了域名测试的效率,从而解决了现有的域名测试方式的效率低下的技术问题。
参照图2,图2为本申请私有域名自动化测试方法第一实施例的流程示意图。
本申请第一实施例提供一种私有域名自动化测试方法,所述私有域名自动化测试方法包括以下步骤:
步骤S10,基于预设的特定镜像部署预设的专有网络中的多个云服务器,并创建与所述专有网络关联的私有域名,以及与所述私有域名对应的私有域名记录;
在本实施例中,本方法应用于装有私有域名自动化测试程序的系统(以下简称系统)。预设专有网络为虚拟私有云网络(VPC,VirtualPrivateCloud),可以是在云平台上构建的隔离的、用户能够管理配置和策略的虚拟网络环境。VPC是一个公共云计算资源的动态配置池,需要使用加密协议、隧道协议和其他安全程序,在民营企业和云服务提供商之间传输数据。云服务器为整合了计算、存储与网络资源的IT基础设施能力租用服务,能提供基于云计算模式的按需使用和按需付费能力的服务器租用服务。客户可以通过web界面的自助服务平台,部署所需的服务器环境。
系统先对网络环境进行初始化,先创建VPC网络,在使用预先已打包有域名解析工具集的镜像来部署云服务器,以使得云服务器具有域名解析测试功能。系统再在当前的虚拟云网络中创建私有域名zone,并通过调用用于绑定VPC的相关函数实现对当前的虚拟云网络的关联。一个私有域名可以关联到一个或多个VPC。在关联之后,云服务器才可对zone进行访问。系统为当前创建的zone添加解析记录,也即是上述的私有域名记录,以将私有域名映射到IP地址上。其中,私有域名可以是公网真实存在的域名,也可以是公网中非真实存在的域名。
步骤S20,对所述私有域名记录进行批量编辑,并自动生成与批量编辑后的私有域名记录对应的多个域名测试文件;
在本实施例中,编辑方式可为添加、更新与删除等。由于在进行性能测试时,需要生成成千上万条解析记录record(也即是上述私有域名记录),本系统可通过自动化技术对record进行批量添加、更新或删除,在实际应用过程中,主要是对record进行批量添加。在对record批量编辑完成后,系统可通过预设的脚本自动生成与编辑后的record相对应的多个域名解析文件。
需要说明的是,上述多个域名解析文件可以是部分相同的域名解析文件,也可以是每个都不同的域名解析文件,还可以是每一个都相同的域名解析文件。且每个文件的生成时间可以相同也可以不同。例如,在第一时刻添加新的zone,添加或修改record,根据脚本自动生成若干域名测试文件,而后在第二时刻再添加新的zone,再度添加或修改record,又生成新的若干域名测试文件。上述多个域名测试文件既可以指在某一时刻所自动生成的多个域名测试文件,也可以指多个时刻所自动生成的域名测试文件的总和。
步骤S30,在登录多个所述云服务器时,按照多线程方式将多个所述域名测试文件上传至多个所述云服务器,以在多个所述云服务器上对多个所述域名测试文件并行进行域名测试。
在本实施例中,在已同时登录多个云服务器时系统获取当前性能资源使用信息,并根据当前性能资源使用信息确定最大并发线程数,然后再按照最大并发线程数创建对应数量线程,并在对应数量线程中将多个域名测试文件并发上传至多个云服务器。云服务器通过已安装的域名测试工具如dnsperf,并基于接收到的域名测试文件进行域名性能测试。另外,在开始进行性能测试时,启用monitor监控并收集DNS(域名系统协议)服务器的性能指标,例如CPU占用率等数据,并在性能测试结束时关闭monitor,将收集到的性能指标数据作为性能测试结果的参考标准。另外,系统登录云服务器的操作也可以采用多线程的方式,通过预存的快速连接句柄同时向多个云服务器发出登录请求并登录。另外,域名测试的类型具体可为性能测试、功能测试等。
作为一具体实施例,本方法按以下步骤执行。
第一步,创建一个vpc1(专有网络),并在该专有网络下创建子网,在该子网下使用自定义镜像创建ECS1(云主机),该自定义镜像是已经安装好对应的dns测试工具,如dig, dnsperf, queryperf等。检查网络和工具是否可正常运行,可登录ECS查看是否能进行公共域名解析,能否使用dig,dnsperf,queryperf工具等。(若要进行多主机并发进行域名解析,可以用该子网创建多个ECS)。
第二步,将创建好的ECS对应的信息:用户名和密码,IP地址(若需要跳板机登录则还需要提供跳板机的IP,用户名和密码)记录到自动化测试系统的配置文件中。
第三步,创建一个zone:test.dns,在该zone下创建对应的record,如*,www, a等record,对“test.dns”的zone绑定vpc1,通过脚本自动生成域名测试文件,如生成zone为“test.dns”的A记录2000条*5:“ pythongenerate_querydns_txt.py -z "test.dns" -n2000”。
第四步,将第三步生成的测试文件querydnx.txt上传到ECS1,在ECS1上进行域名解析测试:dnsperf -dquerydns.txt  -s28.0.132.230–t300。登录dns服务器,进入vpc1对应的dns容器中查看cpu和内存占用率。根据以上步骤3、4来添加新的zone,添加或修改record,生成新的测试数据文件,进行不同zone的域名解析测试。
第五步,测试完毕后,收集记录测试结果,性能指标,清理环境。首先先将zone分别解绑vpc1,删除对应的zone, 释放ecs1,接着再释放对应子网,删除vpc1。
以上五个步骤都通过系统自动化实现,无需人工操作,只要提供对应的环境设备资源,测试数据即可。
在本实施例中,本申请通过基于预设的特定镜像部署预设的专有网络中的多个云服务器,并创建与所述专有网络关联的私有域名,以及与所述私有域名对应的私有域名记录;对所述私有域名记录进行批量编辑,并自动生成与批量编辑后的私有域名记录对应的多个域名测试文件;在登录多个所述云服务器时,按照多线程方式将多个所述域名测试文件上传至多个所述云服务器,以在多个所述云服务器上对多个所述域名测试文件并行进行域名测试。通过上述方式,本申请通过基于特定镜像部署多个云服务器,因此不需要分别登录多个云服务器重复安装域名解析工具,提升了前期服务器的部署效率;通过自动化地对私有域名记录进行批量编辑,并自动生成对应的域名测试文件,避免了手动对私有域名记录逐个编辑,也无需耗费人力配置域名测试文件,从而大大提升了域名测试文件的获取效率;通过采用多线程方式上传文件至云服务器并在云服务器上并行执行域名测试,进一步提升了域名测试的效率,从而解决了现有的域名测试方式的效率低下的技术问题。
进一步地,基于上述图2所示的第一实施例,提出本申请私有域名自动化测试方法的第二实施例。本实施例中,步骤S10包括:
将装有预设域名解析工具集的镜像作为所述特定镜像,以部署多个所述云服务器;
保留多个所述云服务器的原有信息,并根据所述原有信息生成用于快速登录多个所述云服务器的快速连接句柄;
判断所述专有网络与部署在多个所述云服务器上的域名解析工具是否正常;
若所述专有网络与所述域名解析工具正常,则创建私有域名,将所述私有域名与所述专有网络关联,并创建与所述私有域名对应的私有域名记录。
在本实施例中,系统先对网络环境进行初始化。系统先创建VPC网络,使用预先已打包有域名解析工具集(如dnsperf)的镜像来部署云服务器,以使得云服务器具有域名解析测试功能。在部署云服务器的过程中,系统会对云服务器的原有信息进行缓存,原有信息可包括IP地址、用户名、密码等。系统根据这些云服务器的原有信息生成用于快速登录云服务器的快速连接句柄,以供后续需要登录云服务器时释放。
在创建VPC并对云服务器进行部署后,系统还需对当前的网络环境以及解析测试工具进行检查,例如,检查当前的VPC网络是否能连通外网,测试工具能够正常使用等,具体的检查方式通常采用发出基本指令,并获取响应该基本指令的信息,判断响应信息是否与预设标准响应信息相匹配。若不匹配,则系统需对当前的网络环境进行调试,直至网络环境与工具能够正常使用;若匹配,则系统可判定此时的网络环境和工具正常。系统在检查完当前的网络环境后,即可进入业务逻辑测试部分。系统在当前的虚拟云网络中创建私有域名zone,并通过调用用于绑定VPC的相关函数实现对当前的虚拟云网络的关联。一个私有域名可以关联到一个或多个VPC。在关联之后,云服务器才可对zone进行访问。
系统为当前创建的私有域名添加解析记录,也即是上述的私有域名记录,以将私有域名映射到IP地址其中,私有域名可以是公网真实存在的域名,也可以是公网中非真实存在的域名。解析记录可以是用来指定私有域名对应的IP地址的记录,可以包括多种类型,例如,A记录(A (Address)记录是用来指定主机名(或域名)对应的IP地址记录。用户可以将该域名下的网站服务器指向到自己的网页服务器(webserver)上。同时也可以设置域名的子域名)、CNAME记录(别名记录)、指针(PTR,PointerRecord)记录,AAAA记录(是用来将域名解析到IPv6地址的DNS记录,用户可以将一个域名解析到IPv6地址上,也可以将子域名解析到IPv6地址上),TXT记录(一般指为某个主机名或域名设置的说明),邮件交换(MX,MailExchanger)记录等。
进一步地,步骤S10之前,还包括:
使用所述快速连接句柄同时登录多个所述云服务器,以上传多个所述域名测试文件。
在本实施例中,在需要同时登陆多个云服务器时,释放部署云服务器时根据原有信息生成的快速连接句柄,系统即可通过快速连接句柄直接登陆到相应的云服务器,而无须建立多个安全外壳协议(ssh,SecureShell)连接,测试完成后释放ssh连接。
进一步地,步骤S30包括:
在登录多个所述云服务器时,获取当前性能资源使用信息,并根据所述当前性能资源使用信息确定最大并发线程数;
按照所述最大并发线程数创建对应数量线程,并在所述对应数量线程中将多个所述域名测试文件并发上传至多个所述云服务器,以在多个所述云服务器上对多个所述域名测试文件并行进行域名测试。
在本实施例中,当前性能资源使用信息可包括当前CPU占用率、内存占用率等。系统根据当下的可支持的资源情况确定实时的最大并发线程数,以在同一时刻尽可能多地并发上传域名测试文件。不同的云服务器即可同时对传入的域名测试文件进行域名性能测试。
进一步地,通过采用多线程技术,可以极大减少对PrivateZone产品进行功能、性能测试所需的时间和人力成本;通过基于特定镜像创建云服务器,因此不需要分别登录云服务器重复安装dnsperf,而且可以灵活创建多个云服务器并保存对应的登录信息进行自动登录,对于测试人员来说不需要关注细节,只需要关注业务逻辑本身即可;通过快速连接句柄直接登陆到相应的云服务器,而无须建立多个ssh连接,测试完成后释放ssh连接,避免占用内存空间。
进一步地,基于上述图2所示的第一实施例,提出本申请私有域名自动化测试方法的第三实施例。本实施例中,步骤S30之后包括:
在检测到当前的域名性能测试过程存在异常时,确定异常所在的异常私有域名与异常云服务器,并中断所述异常云服务器上的域名测试操作;
将所述专有网络与所述异常私有域名解绑,并删除所述异常私有域名与所述异常云服务器,以进行容错处理。
在本实施例中,系统实时检测当前是否存在异常或出错,若存在,则确定当前发生异常的私有域名以及云服务器,将此私有域名与专有网络解绑,并删除存在异常的私有域名以及云服务器,以对此异常进行容错处理,避免此异常对其他云服务器上的性能测试过程造成影响。
进一步地,步骤S20包括:
在接收到批量添加指令和/或批量删除指令时,基于所述批量添加指令和/或批量删除指令,对所述私有域名记录进行批量添加和/或删除;
使用预设的测试文件生成脚本,自动生成与批量添加和/或删除后的私有域名记录所对应的多个域名测试文件,其中,多个所述域名测试文件存储于区块链中。
在本实施例中,测试人员需要预先在系统上加载用于自动生成域名测试文件的测试文件生成脚本。在测试人员当前进行域名测试操作,在当前的专有网络上添加新的zone,并点击页面上预设的批量添加解析记录和/或删除解析记录的按键时,系统接收到此批量添加指令和/或批量删除指令,并根据指令自动批量添加和/或删除解析记录(也即是上述私有域名记录)。系统再使用预置的脚本,自动生成与批量添加和/或删除后的私有域名记录所对应的多个域名测试文件。
需要强调的是,为进一步保证上述目标返回结果的私密和安全性,上述域名测试文件还可以存储于一区块链的节点中。
进一步地,步骤S30之后,还包括:
收集多个所述云服务器上关于多个所述域名测试文件的测试结果并汇总;
解绑所述专有网络并删除所述私有域名,以恢复网络环境。
在本实施例中,在性能测试结束时,系统自动收集各个云服务器上的性能测试结果,将所有的性能测试结果进行汇总,并写入数据库中,以对性能测试结果数据进行持久化管理。在性能测试完成后,系统还需进行环境恢复操作。需要将与专有网络关联的私有域名进行解绑,然后再删除私有域名以及各个云服务器,最后对专有网络进行删除,以完成网络环境恢复。
本申请所指区块链是分布式数据存储、点对点传输、共识机制、加密算法等计算机技术的新型应用模式。区块链(Blockchain),本质上是一个去中心化的数据库,是一串使用密码学方法相关联产生的数据块,每一个数据块中包含了一批次网络交易的信息,用于验证其信息的有效性(防伪)和生成下一个区块。区块链可以包括区块链底层平台、平台产品服务层以及应用服务层等。
进一步地,通过对测试过程中所发生的异常进行容错处理,避免此异常对其他云服务器上的性能测试过程造成影响;通过自动化地对私有域名记录进行批量编辑,并自动生成对应的域名测试文件,避免了手动对私有域名记录逐个编辑,也无需耗费人力配置域名测试文件,从而大大提升了域名测试文件的获取效率;通过在测试过程中能自动收集每个云服务器上的测试结果,而且性能测试过程中能自动监测和收集服务器的性能指标,方便对结果进行统一收集和持久化管理;通过在测试完成后恢复网络环境,以防止执行过程中参数会对环境产生影响,也避免有数据残留,占用资源。
此外,如图3所示,为实现上述目的,本申请还提供一种私有域名自动化测试装置,所述私有域名自动化测试装置包括:
域名记录创建模块10,用于基于预设的特定镜像部署预设的专有网络中的多个云服务器,并创建与所述专有网络关联的私有域名,以及与所述私有域名对应的私有域名记录;
测试文件生成模块20,用于对所述私有域名记录进行批量编辑,并自动生成与批量编辑后的私有域名记录对应的多个域名测试文件;
域名测试并行模块30,用于在登录多个所述云服务器时,按照多线程方式将多个所述域名测试文件上传至多个所述云服务器,以在多个所述云服务器上对多个所述域名测试文件并行进行域名测试。
可选地,所述域名记录创建模块10包括:
镜像部署单元,用于将装有预设域名解析工具集的镜像作为所述特定镜像,以部署多个所述云服务器;
句柄生成单元,用于保留多个所述云服务器的原有信息,并根据所述原有信息生成用于快速登录多个所述云服务器的快速连接句柄;
状态判断单元,用于判断所述专有网络与部署在多个所述云服务器上的域名解析工具是否正常;
记录创建单元,用于若所述专有网络与所述域名解析工具正常,则创建私有域名,将所述私有域名与所述专有网络关联,并创建与所述私有域名对应的私有域名记录。
可选地,所述私有域名自动化测试装置还包括:
句柄登录模块,用于使用所述快速连接句柄同时登录多个所述云服务器,以上传多个所述域名测试文件。
可选地,所述域名测试并行模块30包括:
线程确定单元,用于在登录多个所述云服务器时,获取当前性能资源使用信息,并根据所述当前性能资源使用信息确定最大并发线程数;
并发上传单元,用于按照所述最大并发线程数创建对应数量线程,并在所述对应数量线程中将多个所述域名测试文件并发上传至多个所述云服务器,以在多个所述云服务器上对多个所述域名测试文件并行进行域名测试。
可选地,所述私有域名自动化测试装置还包括:
异常检测模块,用于在检测到当前的域名性能测试过程存在异常时,确定异常所在的异常私有域名与异常云服务器,并中断所述异常云服务器上的域名测试操作;
容错处理模块,用于将所述专有网络与所述异常私有域名解绑,并删除所述异常私有域名与所述异常云服务器,以进行容错处理。
可选地,所述测试文件生成模块20包括:
批量编辑单元,用于在接收到批量添加指令和/或批量删除指令时,基于所述批量添加指令和/或批量删除指令,对所述私有域名记录进行批量添加和/或删除;
脚本使用单元,用于使用预设的测试文件生成脚本,自动生成与批量添加和/或删除后的私有域名记录所对应的多个域名测试文件,其中,多个所述域名测试文件存储于区块链中。
可选地,所述私有域名自动化测试装置还包括:
结果收集模块,用于收集多个所述云服务器上关于多个所述域名测试文件的测试结果并汇总;
环境恢复模块,用于解绑所述专有网络并删除所述私有域名,以恢复网络环境。
本申请还提供一种私有域名自动化测试设备。
所述私有域名自动化测试设备包括处理器、存储器及存储在所述存储器上并可在所述处理器上运行的私有域名自动化测试程序,其中所述私有域名自动化测试程序被所述处理器执行时,实现如上所述的私有域名自动化测试方法的步骤。
其中,所述私有域名自动化测试程序被执行时所实现的方法可参照本申请私有域名自动化测试方法的各个实施例,此处不再赘述。
此外,本申请实施例还提供一种计算机可读存储介质。所述计算机可读存储介质可以是非易失性,也可以是易失性。
本申请计算机可读存储介质上存储有私有域名自动化测试程序,其中所述私有域名自动化测试程序被处理器执行时,实现如上述的私有域名自动化测试方法的步骤。
其中,私有域名自动化测试程序被执行时所实现的方法可参照本申请私有域名自动化测试方法的各个实施例,此处不再赘述。
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者系统不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者系统所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者系统中还存在另外的相同要素。
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在如上所述的一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本申请各个实施例所述的方法。
以上仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。

Claims (20)

  1. 一种私有域名自动化测试方法,其中,所述私有域名自动化测试方法包括以下步骤:
    基于预设的特定镜像部署预设的专有网络中的多个云服务器,并创建与所述专有网络关联的私有域名,以及与所述私有域名对应的私有域名记录;
    对所述私有域名记录进行批量编辑,并自动生成与批量编辑后的私有域名记录对应的多个域名测试文件;
    在登录多个所述云服务器时,按照多线程方式将多个所述域名测试文件上传至多个所述云服务器,以在多个所述云服务器上对多个所述域名测试文件并行进行域名测试。
  2. 如权利要求1所述的私有域名自动化测试方法,其中,所述基于预设的特定镜像部署预设的专有网络中的多个云服务器,并创建与所述专有网络关联的私有域名,以及与所述私有域名对应的私有域名记录的步骤包括:
    将装有预设域名解析工具集的镜像作为所述特定镜像,以部署多个所述云服务器;
    保留多个所述云服务器的原有信息,并根据所述原有信息生成用于快速登录多个所述云服务器的快速连接句柄;
    判断所述专有网络与部署在多个所述云服务器上的域名解析工具是否正常;
    若所述专有网络与所述域名解析工具正常,则创建私有域名,将所述私有域名与所述专有网络关联,并创建与所述私有域名对应的私有域名记录。
  3. 如权利要求2所述的私有域名自动化测试方法,其中,所述在登录多个所述云服务器时,按照多线程方式将多个所述域名测试文件上传至多个所述云服务器的步骤之前,还包括:
    使用所述快速连接句柄同时登录多个所述云服务器,以上传多个所述域名测试文件。
  4. 如权利要求1所述的私有域名自动化测试方法,其中,所述在登录多个所述云服务器时,按照多线程方式将多个所述域名测试文件上传至多个所述云服务器,以在多个所述云服务器上对多个所述域名测试文件并行进行域名测试的步骤包括:
    在登录多个所述云服务器时,获取当前性能资源使用信息,并根据所述当前性能资源使用信息确定最大并发线程数;
    按照所述最大并发线程数创建对应数量线程,并在所述对应数量线程中将多个所述域名测试文件并发上传至多个所述云服务器,以在多个所述云服务器上对多个所述域名测试文件并行进行域名测试。
  5. 如权利要求1所述的私有域名自动化测试方法,其中,所述在登录多个所述云服务器时,按照多线程方式将多个所述域名测试文件上传至多个所述云服务器,以在多个所述云服务器上对多个所述域名测试文件并行进行域名测试的步骤之后:
    在检测到当前的域名性能测试过程存在异常时,确定异常所在的异常私有域名与异常云服务器,并中断所述异常云服务器上的域名测试操作;
    将所述专有网络与所述异常私有域名解绑,并删除所述异常私有域名与所述异常云服务器,以进行容错处理。
  6. 如权利要求1所述的私有域名自动化测试方法,其中,所述对所述私有域名记录进行批量编辑,并自动生成与批量编辑后的私有域名记录对应的多个域名测试文件的步骤包括:
    在接收到批量添加指令和/或批量删除指令时,基于所述批量添加指令和/或批量删除指令,对所述私有域名记录进行批量添加和/或删除;
    使用预设的测试文件生成脚本,自动生成与批量添加和/或删除后的私有域名记录所对应的多个域名测试文件,其中,多个所述域名测试文件存储于区块链中。
  7. 如权利要求1-6中任一项所述的私有域名自动化测试方法,其中,所述在登录多个所述云服务器时,按照多线程方式将多个所述域名测试文件上传至多个所述云服务器,以在多个所述云服务器上对多个所述域名测试文件并行进行域名测试的步骤之后,还包括:
    收集多个所述云服务器上关于多个所述域名测试文件的测试结果并汇总;
    解绑所述专有网络并删除所述私有域名,以恢复网络环境。
  8. 一种私有域名自动化测试装置,其中,所述私有域名自动化测试装置包括:
    域名记录创建模块,用于基于预设的特定镜像部署预设的专有网络中的多个云服务器,并创建与所述专有网络关联的私有域名,以及与所述私有域名对应的私有域名记录;
    测试文件生成模块,用于对所述私有域名记录进行批量编辑,并自动生成与批量编辑后的私有域名记录对应的多个域名测试文件;
    域名测试并行模块,用于在登录多个所述云服务器时,按照多线程方式将多个所述域名测试文件上传至多个所述云服务器,以在多个所述云服务器上对多个所述域名测试文件并行进行域名测试。
  9. 一种私有域名自动化测试设备,其中,所述私有域名自动化测试设备包括处理器、存储器、以及存储在所述存储器上并可被所述处理器执行的私有域名自动化测试程序,其中所述私有域名自动化测试程序被所述处理器执行时,实现如下所述的私有域名自动化测试方法的步骤:
    基于预设的特定镜像部署预设的专有网络中的多个云服务器,并创建与所述专有网络关联的私有域名,以及与所述私有域名对应的私有域名记录;
    对所述私有域名记录进行批量编辑,并自动生成与批量编辑后的私有域名记录对应的多个域名测试文件;
    在登录多个所述云服务器时,按照多线程方式将多个所述域名测试文件上传至多个所述云服务器,以在多个所述云服务器上对多个所述域名测试文件并行进行域名测试。
  10. 如权利要求9所述的私有域名自动化测试设备,其中,所述基于预设的特定镜像部署预设的专有网络中的多个云服务器,并创建与所述专有网络关联的私有域名,以及与所述私有域名对应的私有域名记录的步骤包括:
    将装有预设域名解析工具集的镜像作为所述特定镜像,以部署多个所述云服务器;
    保留多个所述云服务器的原有信息,并根据所述原有信息生成用于快速登录多个所述云服务器的快速连接句柄;
    判断所述专有网络与部署在多个所述云服务器上的域名解析工具是否正常;
    若所述专有网络与所述域名解析工具正常,则创建私有域名,将所述私有域名与所述专有网络关联,并创建与所述私有域名对应的私有域名记录。
  11. 如权利要求10所述的私有域名自动化测试设备,其中,所述在登录多个所述云服务器时,按照多线程方式将多个所述域名测试文件上传至多个所述云服务器的步骤之前,还包括:
    使用所述快速连接句柄同时登录多个所述云服务器,以上传多个所述域名测试文件。
  12. 如权利要求9所述的私有域名自动化测试设备,其中,所述在登录多个所述云服务器时,按照多线程方式将多个所述域名测试文件上传至多个所述云服务器,以在多个所述云服务器上对多个所述域名测试文件并行进行域名测试的步骤包括:
    在登录多个所述云服务器时,获取当前性能资源使用信息,并根据所述当前性能资源使用信息确定最大并发线程数;
    按照所述最大并发线程数创建对应数量线程,并在所述对应数量线程中将多个所述域名测试文件并发上传至多个所述云服务器,以在多个所述云服务器上对多个所述域名测试文件并行进行域名测试。
  13. 如权利要求9所述的私有域名自动化测试设备,其中,所述在登录多个所述云服务器时,按照多线程方式将多个所述域名测试文件上传至多个所述云服务器,以在多个所述云服务器上对多个所述域名测试文件并行进行域名测试的步骤之后:
    在检测到当前的域名性能测试过程存在异常时,确定异常所在的异常私有域名与异常云服务器,并中断所述异常云服务器上的域名测试操作;
    将所述专有网络与所述异常私有域名解绑,并删除所述异常私有域名与所述异常云服务器,以进行容错处理。
  14. 如权利要求9所述的私有域名自动化测试设备,其中,所述对所述私有域名记录进行批量编辑,并自动生成与批量编辑后的私有域名记录对应的多个域名测试文件的步骤包括:
    在接收到批量添加指令和/或批量删除指令时,基于所述批量添加指令和/或批量删除指令,对所述私有域名记录进行批量添加和/或删除;
    使用预设的测试文件生成脚本,自动生成与批量添加和/或删除后的私有域名记录所对应的多个域名测试文件,其中,多个所述域名测试文件存储于区块链中。
  15. 一种计算机可读存储介质,其中,所述计算机可读存储介质上存储有私有域名自动化测试程序,其中所述私有域名自动化测试程序被处理器执行时,实现如下所述的私有域名自动化测试方法的步骤:
    基于预设的特定镜像部署预设的专有网络中的多个云服务器,并创建与所述专有网络关联的私有域名,以及与所述私有域名对应的私有域名记录;
    对所述私有域名记录进行批量编辑,并自动生成与批量编辑后的私有域名记录对应的多个域名测试文件;
    在登录多个所述云服务器时,按照多线程方式将多个所述域名测试文件上传至多个所述云服务器,以在多个所述云服务器上对多个所述域名测试文件并行进行域名测试。
  16. 如权利要求9所述的计算机可读存储介质,其中,所述基于预设的特定镜像部署预设的专有网络中的多个云服务器,并创建与所述专有网络关联的私有域名,以及与所述私有域名对应的私有域名记录的步骤包括:
    将装有预设域名解析工具集的镜像作为所述特定镜像,以部署多个所述云服务器;
    保留多个所述云服务器的原有信息,并根据所述原有信息生成用于快速登录多个所述云服务器的快速连接句柄;
    判断所述专有网络与部署在多个所述云服务器上的域名解析工具是否正常;
    若所述专有网络与所述域名解析工具正常,则创建私有域名,将所述私有域名与所述专有网络关联,并创建与所述私有域名对应的私有域名记录。
  17. 如权利要求10所述的计算机可读存储介质,其中,所述在登录多个所述云服务器时,按照多线程方式将多个所述域名测试文件上传至多个所述云服务器的步骤之前,还包括:
    使用所述快速连接句柄同时登录多个所述云服务器,以上传多个所述域名测试文件。
  18. 如权利要求9所述的计算机可读存储介质,其中,所述在登录多个所述云服务器时,按照多线程方式将多个所述域名测试文件上传至多个所述云服务器,以在多个所述云服务器上对多个所述域名测试文件并行进行域名测试的步骤包括:
    在登录多个所述云服务器时,获取当前性能资源使用信息,并根据所述当前性能资源使用信息确定最大并发线程数;
    按照所述最大并发线程数创建对应数量线程,并在所述对应数量线程中将多个所述域名测试文件并发上传至多个所述云服务器,以在多个所述云服务器上对多个所述域名测试文件并行进行域名测试。
  19. 如权利要求9所述的计算机可读存储介质,其中,所述在登录多个所述云服务器时,按照多线程方式将多个所述域名测试文件上传至多个所述云服务器,以在多个所述云服务器上对多个所述域名测试文件并行进行域名测试的步骤之后:
    在检测到当前的域名性能测试过程存在异常时,确定异常所在的异常私有域名与异常云服务器,并中断所述异常云服务器上的域名测试操作;
    将所述专有网络与所述异常私有域名解绑,并删除所述异常私有域名与所述异常云服务器,以进行容错处理。
  20. 如权利要求9所述的计算机可读存储介质,其中,所述对所述私有域名记录进行批量编辑,并自动生成与批量编辑后的私有域名记录对应的多个域名测试文件的步骤包括:
    在接收到批量添加指令和/或批量删除指令时,基于所述批量添加指令和/或批量删除指令,对所述私有域名记录进行批量添加和/或删除;
    使用预设的测试文件生成脚本,自动生成与批量添加和/或删除后的私有域名记录所对应的多个域名测试文件,其中,多个所述域名测试文件存储于区块链中。
PCT/CN2020/125012 2020-09-07 2020-10-30 私有域名自动化测试方法、装置、设备及存储介质 WO2021189852A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010933635.2 2020-09-07
CN202010933635.2A CN112054941B (zh) 2020-09-07 2020-09-07 私有域名自动化测试方法、装置、设备及存储介质

Publications (1)

Publication Number Publication Date
WO2021189852A1 true WO2021189852A1 (zh) 2021-09-30

Family

ID=73611026

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/125012 WO2021189852A1 (zh) 2020-09-07 2020-10-30 私有域名自动化测试方法、装置、设备及存储介质

Country Status (2)

Country Link
CN (1) CN112054941B (zh)
WO (1) WO2021189852A1 (zh)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113992494A (zh) * 2021-12-23 2022-01-28 武汉迈异信息科技有限公司 一种云平台创建堡垒机并自动纳管云主机的方法
CN114297009A (zh) * 2021-12-28 2022-04-08 苏州浪潮智能科技有限公司 一种服务器测试的方法及装置、电子设备
CN115277638A (zh) * 2022-09-30 2022-11-01 中国信息通信研究院 区块链域名解析系统的性能测试方法和装置、设备和介质
CN115426255A (zh) * 2022-08-26 2022-12-02 济南浪潮数据技术有限公司 一种自动化配置云主机域名的方法、系统、装置及介质
CN115842803A (zh) * 2022-10-27 2023-03-24 新浪技术(中国)有限公司 文件处理方法、装置及系统
CN115842804A (zh) * 2022-11-02 2023-03-24 中国工商银行股份有限公司 域名检测方法、装置、计算机设备和存储介质
CN116032887A (zh) * 2023-03-30 2023-04-28 中国工商银行股份有限公司 区块链域名系统的风险行为分析方法及装置

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112671943B (zh) * 2020-12-17 2022-07-15 苏州极光无限信息技术有限公司 一种真实域名的探测装置
CN113010422A (zh) * 2021-03-17 2021-06-22 北京金山云网络技术有限公司 一种镜像文件测试方法、装置、电子设备及可读存储介质
CN113438126B (zh) * 2021-06-17 2022-05-10 中国科学院计算机网络信息中心 一种应用于区块链域名系统的分布式在线测试系统
CN115604223B (zh) * 2022-08-25 2024-10-11 紫光云技术有限公司 一种实现dns支持vpc私有域名解析的方法

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140189435A1 (en) * 2012-12-31 2014-07-03 Johnson Manuel-Devadoss System and method to extend the capabilities of a web browser of a web application issue root cause determination techniques
CN106101300A (zh) * 2016-06-22 2016-11-09 东方有线网络有限公司 通过私有域名系统控制访问自建服务器的方法
CN109729189A (zh) * 2019-03-14 2019-05-07 北京百度网讯科技有限公司 用于配置域名的方法和装置
CN110830458A (zh) * 2019-10-25 2020-02-21 云深互联(北京)科技有限公司 域名访问方法、系统和设备
CN111049943A (zh) * 2019-12-05 2020-04-21 北京小米移动软件有限公司 解析域名的方法、装置、设备及介质
CN111314502A (zh) * 2020-03-09 2020-06-19 网宿科技股份有限公司 一种基于域名解析系统的域名部署方法及装置

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104852912B (zh) * 2015-04-29 2018-07-06 中国互联网络信息中心 域名注册服务器性能测试系统和方法
US9992086B1 (en) * 2016-08-23 2018-06-05 Amazon Technologies, Inc. External health checking of virtual private cloud network environments
US10033691B1 (en) * 2016-08-24 2018-07-24 Amazon Technologies, Inc. Adaptive resolution of domain name requests in virtual private cloud network environments
CN111124850A (zh) * 2019-11-12 2020-05-08 上海移远通信科技有限公司 Mqtt服务器性能测试方法、系统、计算机设备及存储介质

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140189435A1 (en) * 2012-12-31 2014-07-03 Johnson Manuel-Devadoss System and method to extend the capabilities of a web browser of a web application issue root cause determination techniques
CN106101300A (zh) * 2016-06-22 2016-11-09 东方有线网络有限公司 通过私有域名系统控制访问自建服务器的方法
CN109729189A (zh) * 2019-03-14 2019-05-07 北京百度网讯科技有限公司 用于配置域名的方法和装置
CN110830458A (zh) * 2019-10-25 2020-02-21 云深互联(北京)科技有限公司 域名访问方法、系统和设备
CN111049943A (zh) * 2019-12-05 2020-04-21 北京小米移动软件有限公司 解析域名的方法、装置、设备及介质
CN111314502A (zh) * 2020-03-09 2020-06-19 网宿科技股份有限公司 一种基于域名解析系统的域名部署方法及装置

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113992494A (zh) * 2021-12-23 2022-01-28 武汉迈异信息科技有限公司 一种云平台创建堡垒机并自动纳管云主机的方法
CN114297009A (zh) * 2021-12-28 2022-04-08 苏州浪潮智能科技有限公司 一种服务器测试的方法及装置、电子设备
CN114297009B (zh) * 2021-12-28 2024-01-16 苏州浪潮智能科技有限公司 一种服务器测试的方法及装置、电子设备
CN115426255A (zh) * 2022-08-26 2022-12-02 济南浪潮数据技术有限公司 一种自动化配置云主机域名的方法、系统、装置及介质
CN115277638A (zh) * 2022-09-30 2022-11-01 中国信息通信研究院 区块链域名解析系统的性能测试方法和装置、设备和介质
CN115277638B (zh) * 2022-09-30 2022-12-16 中国信息通信研究院 区块链域名解析系统的性能测试方法和装置、设备和介质
CN115842803A (zh) * 2022-10-27 2023-03-24 新浪技术(中国)有限公司 文件处理方法、装置及系统
CN115842804A (zh) * 2022-11-02 2023-03-24 中国工商银行股份有限公司 域名检测方法、装置、计算机设备和存储介质
CN116032887A (zh) * 2023-03-30 2023-04-28 中国工商银行股份有限公司 区块链域名系统的风险行为分析方法及装置
CN116032887B (zh) * 2023-03-30 2024-05-14 中国工商银行股份有限公司 区块链域名系统的风险行为分析方法及装置

Also Published As

Publication number Publication date
CN112054941A (zh) 2020-12-08
CN112054941B (zh) 2023-03-24

Similar Documents

Publication Publication Date Title
WO2021189852A1 (zh) 私有域名自动化测试方法、装置、设备及存储介质
JP3595783B2 (ja) 負荷テスト実行装置及びシステム、及びその方法、及びそのプログラム
JP6280155B2 (ja) ネットワーク複製のための技法
US9054965B2 (en) Managing captured network traffic data
US9703682B2 (en) Generating production server load activity for a test server
CN105912389B (zh) 基于数据虚拟化实现混合云环境下的虚拟机迁移系统
US20110047541A1 (en) Security management device and method
US20090307763A1 (en) Automated Test Management System and Method
CN104954189A (zh) 一种服务器集群的自动检测方法和系统
US6968370B2 (en) Method of transferring resources between different operation systems
CN105471675A (zh) 一种多节点批量测试的方法及系统
KR20080048517A (ko) 컴퓨터 네트워크 컴포넌트(들)의 평가 및/또는 설치
US7487239B2 (en) Composite resource models
US20210326196A1 (en) A remediation system to prevent incompatible program module installation in an information processing system
US11921826B2 (en) Automatically detecting misuse of licensed software
JP4381861B2 (ja) 端末エミュレーションプログラム、記録媒体、負荷試験方法、負荷試験装置
CN112162927A (zh) 云计算平台的测试方法、介质、装置和计算设备
WO2015029464A1 (ja) 模擬装置、情報生成装置、模擬方法、模擬プログラム、環境提供システム、環境提供方法及びプログラム
WO2021151314A1 (zh) Dns自动化性能测试方法、装置、设备及可读存储介质
US9866466B2 (en) Simulating real user issues in support environments
US7711812B2 (en) Definition system and method for web services that monitor other web services
JP5592303B2 (ja) 実行環境構築装置および実行環境構築システム
CN117785068A (zh) 一种分布式存储部署方法、装置、设备及可读存储介质
US20080127168A1 (en) Setup of workloads across nodes
CN115686921A (zh) 一种多路径异常检测修复方法、装置、设备及介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20927902

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20927902

Country of ref document: EP

Kind code of ref document: A1