CN114297083A - Agent test method, device, electronic equipment and readable medium - Google Patents

Agent test method, device, electronic equipment and readable medium Download PDF

Info

Publication number
CN114297083A
CN114297083A CN202111680920.9A CN202111680920A CN114297083A CN 114297083 A CN114297083 A CN 114297083A CN 202111680920 A CN202111680920 A CN 202111680920A CN 114297083 A CN114297083 A CN 114297083A
Authority
CN
China
Prior art keywords
test
agent service
test agent
target
request
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.)
Pending
Application number
CN202111680920.9A
Other languages
Chinese (zh)
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 Telecom Corp Ltd
Original Assignee
China Telecom Corp Ltd
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 Telecom Corp Ltd filed Critical China Telecom Corp Ltd
Priority to CN202111680920.9A priority Critical patent/CN114297083A/en
Publication of CN114297083A publication Critical patent/CN114297083A/en
Pending legal-status Critical Current

Links

Images

Abstract

The application provides an agent test method, an agent test device, electronic equipment and a readable medium. The method comprises the following steps: receiving a test request, wherein the test request is used for carrying out test operation on a target test environment; acquiring a test agent service corresponding to a target test environment from a test agent service set according to the test request; if the test agent service set does not have the test agent service corresponding to the target test environment, inquiring the terminal equipment communicated with the target test environment through the test agent service in the test agent service set; creating a target test agent service on the terminal equipment through the test agent service in the test agent service set; and sending a test request to the target test agent service so that the target test agent service tests in the target test environment according to the test request. The method reduces the maintenance cost and the maintenance difficulty in the test process and improves the test efficiency.

Description

Agent test method, device, electronic equipment and readable medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for testing an agent, an electronic device, and a readable medium.
Background
With the development of cloud technology, more and more applications are implemented on a cloud platform, and cloud testing is generated accordingly. The cloud test aims at testing basic resources bearing cloud upper-layer applications, and test objects comprise cloud platforms and correctness of cloud platform application deployment. The test method usually employed is manual test or automatic test by a test tool.
In the related art, a test tool would be deployed on a computer device that has access to the environment under test. The testing tool can automatically access the tested equipment in the tested environment according to the edited script so as to perform testing operation.
However, the devices to be tested in the cloud environment are usually in different networks, and therefore, corresponding test tools and targeted test scripts need to be deployed in each network environment, and the test efficiency is affected due to high maintenance cost and high maintenance difficulty in the test process.
Disclosure of Invention
Based on the technical problems, the application provides an agent test method, an agent test device, an electronic device and a readable medium, so that automatic test under network isolation can be realized by dynamically creating an agent service according to needs, independent maintenance is not needed for test tools and test scripts deployed at various positions, maintenance cost and maintenance difficulty in a test process are reduced, and test efficiency is improved.
Other features and advantages of the present application will be apparent from the following detailed description, or may be learned by practice of the application.
According to an aspect of an embodiment of the present application, there is provided an agent test method including:
receiving a test request, wherein the test request is used for carrying out test operation on a target test environment;
according to the test request, obtaining a test agent service corresponding to the target test environment from the test agent service set, wherein the test agent service set comprises at least one test agent service respectively corresponding to at least one test environment;
if the test agent service corresponding to the target test environment does not exist in the test agent service set, inquiring terminal equipment communicated with the target test environment through the test agent service in the test agent service set;
creating a target test agent service on the terminal equipment through a test agent service in the test agent service set;
and sending the test request to the target test agent service so that the target test agent service tests in the target test environment according to the test request.
In some embodiments of the application, based on the above technical solution, the querying, by a test agent service in the test agent service set, a terminal device that is in communication with the target test environment includes:
acquiring an access address of the target test environment according to the test request;
sending the access address to each test agent service in the test agent service set so that the test agent service confirms the connectivity with the access address according to the access address information;
and receiving the connectivity result sent by each test agent service, and taking the test agent service communicated with the access address as the associated test agent service.
In some embodiments of the application, based on the above technical solution, the sending the test request to the target test agent service includes:
calculating a network communication path with the target test agent service according to equipment communication information, wherein the network communication path comprises at least one transfer equipment, and the equipment communication information comprises connectivity information of computing equipment corresponding to each test agent service in the test agent service set;
and sending the test request to the at least one transit device according to the network communication path, so that the transit device forwards the test request to the target test agent service.
In some embodiments of the present application, based on the above technical solution, before the sending the test request to the target test agent service, the method further includes:
receiving a creation response result sent by the target test agent service, wherein the creation response result comprises communication information of terminal equipment of the target test environment, and the communication information comprises communication information of the terminal equipment and computing equipment corresponding to each test agent service in the test agent service set;
and adding the target test agent service to the test agent service set according to the creating response result, and updating the device communication information according to the communication information of the terminal device of the target test environment.
In some embodiments of the present application, based on the above technical solutions, the method further includes:
if the test agent service corresponding to the target test environment exists in the test agent service set, acquiring the test agent service as a target test agent service;
calculating a network communication path with the target test agent service according to the equipment communication information;
sending the test request to the target test agent service over the network communication path.
According to an aspect of an embodiment of the present application, there is provided an agent test apparatus, including:
the device comprises a test request receiving module, a test request processing module and a test result processing module, wherein the test request receiving module is used for receiving a test request which is used for carrying out test operation on a target test environment;
an agent service obtaining module, configured to obtain, according to the test request, a test agent service corresponding to the target test environment from the test agent service set, where the test agent service set includes at least one test agent service respectively corresponding to at least one test environment;
the relevant service query module is used for querying the relevant test agent service communicated with the terminal equipment of the target test environment if the test agent service corresponding to the target test environment does not exist in the test agent service set;
a creation request sending module, configured to send an agent service creation request to the association test agent service, so that the association test agent service creates a target test agent service on the terminal device in the target test environment;
and the test request sending module is used for sending the test request to the target test agent service so that the target test agent service tests in the target test environment according to the test request.
In some embodiments of the present application, based on the above technical solution, the association service query module includes:
an access address obtaining unit, configured to obtain an access address of the target test environment according to the test request;
the access address sending unit is used for sending the access address to each test agent service in the test agent service set so that the test agent service confirms the connectivity with the access address according to the access address information;
and the communication result receiving unit is used for receiving the communication result sent by each test agent service and taking the test agent service communicated with the access address as the associated test agent service.
In some embodiments of the present application, based on the above technical solution, the test request sending module includes:
a path calculation unit, configured to calculate a network communication path with the second testing agent service according to device connectivity information, where the network communication path includes at least one transit device, and the device connectivity information includes connectivity information of a computing device corresponding to each testing agent service in the testing agent service set;
a request sending unit, configured to send the test request to the at least one transit device according to the network communication path, so that the transit device forwards the test request to the second test agent service.
According to an aspect of an embodiment of the present application, there is provided an electronic apparatus including: a processor; and a memory for storing executable instructions for the processor; wherein the processor is configured to execute the agent testing method as in the above solution via executing the executable instructions.
According to an aspect of the embodiments of the present application, there is provided a computer-readable storage medium on which a computer program is stored, the computer program, when executed by a processor, implementing the agent testing method as in the above technical solution.
In the embodiment of the application, when the test agent service corresponding to the target environment cannot be found directly, the relay device of the terminal capable of accessing the target environment is inquired, and the test agent is installed on the terminal of the target environment through the relay device to test the server. The agent service is dynamically established according to needs, so that the automatic test under network isolation can be realized, independent maintenance of test tools and test scripts deployed at various positions is not needed, the maintenance cost and the maintenance difficulty in the test process are reduced, and the test efficiency is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application. It is obvious that the drawings in the following description are only some embodiments of the application, and that for a person skilled in the art, other drawings can be derived from them without inventive effort. In the drawings:
FIG. 1 schematically illustrates an exemplary system architecture diagram of the present application in one application scenario;
FIG. 2 is a schematic block diagram of an agent test system according to an embodiment of the present application;
FIG. 3 is a flow chart of an agent testing method according to an embodiment of the present disclosure;
FIG. 4 is a flowchart illustrating a test execution process according to an embodiment of the present application;
FIG. 5 is a block diagram schematically illustrating the components of the agent testing apparatus in the embodiment of the present application;
FIG. 6 illustrates a schematic structural diagram of a computer system suitable for use in implementing the electronic device of an embodiment of the present application.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art.
Furthermore, the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the application. One skilled in the relevant art will recognize, however, that the subject matter of the present application can be practiced without one or more of the specific details, or with other methods, components, devices, steps, and so forth. In other instances, well-known methods, devices, implementations, or operations have not been shown or described in detail to avoid obscuring aspects of the application.
The block diagrams shown in the figures are functional entities only and do not necessarily correspond to physically separate entities. I.e. these functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor means and/or microcontroller means.
The flow charts shown in the drawings are merely illustrative and do not necessarily include all of the contents and operations/steps, nor do they necessarily have to be performed in the order described. For example, some operations/steps may be decomposed, and some operations/steps may be combined or partially combined, so that the actual execution sequence may be changed according to the actual situation.
It should be understood that the solution of the present application is applied to a cloud platform environment, and is particularly applied to a scenario of cloud testing based on a cloud platform. In such a scenario, a tester edits a test script according to a test to be performed, and a test tool performs a test operation according to the test script by accessing to an environment to be tested. In the test process, the test tool does not directly access the test environment driver to perform testing, but the test agent service deployed in each tested environment is used for executing test operation instead. The test agent service is created and managed by the test agent management service, creates a test agent service communicated with the equipment and the service network as required, and is responsible for calculating a path and forwarding a test operation request.
Fig. 1 schematically shows an exemplary system architecture diagram of the present technical solution in an application scenario. As shown in fig. 1, the application scenario includes a test platform server 110, a server under test 120, and a springboard server 130. The test platform server 110 and the springboard server 130 are connected through a network, and the springboard server 130 and the server under test 120 are connected through a network. A cloud service environment is formed by a plurality of servers. It can be understood that the server may be an independent physical server, may also be a server cluster or a distributed system formed by a plurality of physical servers, and may also be a cloud server that provides basic cloud computing services such as a cloud service, a cloud database, cloud computing, a cloud function, cloud storage, a Network service, cloud communication, a middleware service, a domain name service, a security service, a CDN (Content Delivery Network), a big data and artificial intelligence platform, and the like. The test platform server 110 is installed with a test management server for managing the test process. The server under test 120 has installed thereon an agent test service that actually performs the test procedure. The testing platform server 110 accesses the server under test 120 through the springboard server 130 according to the testing script, installs the proxy testing service on the server under test 120, and then sends a testing request to the server under test 120 to execute the testing process through the proxy testing service.
Referring to fig. 2, fig. 2 is a schematic structural diagram of an agent test system according to an embodiment of the present application. As shown in fig. 2, the agent test system mainly includes an automated test platform, a test agent management module, a transfer device, a test agent module, and the like. The automatic test platform calls a corresponding automatic test script to execute the test according to a request sent by a tester from the front end. The platform can automatically complete the operations of authentication and the like of the cloud management platform. The automated test script is responsible for initiating the test operation request and is not responsible for executing the test operation. The test agent management module is mainly responsible for forwarding the test operation request, is communicated with the test script upwards and is communicated with the test agent module network downwards. The transit equipment is equipment communicated with the network part of the tested environment. The transfer equipment is provided with a test agent module. The test agent module is mainly responsible for executing test operation and is communicated with part of equipment and a service network of the tested environment.
Specifically, the test agent management module is mainly used for test agent connectivity management, test operation forwarding, test agent service life cycle management, and test security management. The test agent communication relation management mainly records the network communication relation between test agent services and between the test agent services and equipment and services in a tested environment, and the test operation forwarding can search the test agent services capable of executing the test operation based on the communication relation management and calculate the optimal path reaching the test agent services. The test agent service life cycle management is used for initiating a request for creating a new test agent service, receiving a heartbeat packet of part of the test agent service and initiating a request for recovering all the test agent services. And the test security management is used for malicious access interception, authentication information encryption storage and token unified management.
The test agent module is mainly used for test operation execution, test operation forwarding, connected equipment management, equipment connection management and local service life cycle management. The test operation execution is used for connecting the target equipment and the service, executing the test operation and feeding back an operation result. The test operation forwarding is used for forwarding the test operation request to the next hop according to the request. The connected device management is used for discovering and recording a connectable device list, and discovering an available transit device when dynamically creating a proxy service. The device connection management is used to manage long connections to the tested environmental devices, including console, ssh, etc. Typically set up according to test operation requirements and provide connection multiplexing and timeout disconnection capabilities. The local service lifecycle manages requests for performing the creation, reclamation of test agent services, and receives heartbeat packets of the test agent services created thereby.
The technical solutions provided in the present application are described in detail below with reference to specific embodiments. For convenience of introduction, please refer to fig. 3, and fig. 3 is a flowchart of an agent testing method according to an embodiment of the present application. The method may be applied to the test platform server, where the test platform server may be regarded as a computer device, and in this embodiment of the application, the proxy test method is described with the computer device as an execution subject, and the proxy test method may include the following steps S310 to S350:
step S310, receiving a test request, wherein the test request is used for carrying out test operation on the target test environment.
The test request may be triggered by the tester through an automated test script. According to the test request, the tested environment and the test content which need to execute the test can be determined.
Step S320, obtaining a test agent service corresponding to the target test environment from the test agent service set according to the test request, where the test agent service set includes at least one test agent service respectively corresponding to at least one test environment.
The test system included in the test agent service set has previously created a test agent service in each tested environment. These test agent services may access a portion of the devices of the entire cloud platform. Each test agent service corresponds to at least one test environment, which generally refers to an environment installed on the computing device for running the service, e.g., an operating system of the terminal device or an environment within a virtual machine installed on the terminal device.
Step S330, if the test agent service set does not have the test agent service corresponding to the target test environment, inquiring the terminal equipment communicated with the target test environment through the test agent service in the test agent service set.
If the test agent service corresponding to the target test environment does not exist in the test agent service set, the target test environment is the test environment newly added to the test platform, and the existing test agent service cannot access the test environment. At this time, the test agent service communicating with the terminal device of the target test environment is queried. The test agent service management module may instruct all the computing devices to which the test agent service may be connected to attempt to establish a communication connection with the target test environment, or broadcast and search the target test environment in a route forwarding manner according to the network address of the target test environment, so as to find the terminal device connected to the target test environment.
Step S340, creating a target test agent service on the terminal device through the test agent service in the test agent service set.
Specifically, the management service sends an agent service creation request to the test agent service found in the terminal device. The test agent service logs in the terminal device according to the agent service creation request, and then transmits a service installation package to the terminal device, so that the target test agent service is installed on the terminal device. For example, if the test agent management service queries the terminal device X capable of communicating with the target test environment through the test agent service a, the test agent management service sends an agent service creation request to the test agent service a, and the test agent service a logs in the terminal device X and installs the test agent service B on the terminal device X.
In an embodiment of the application, the process of querying the terminal device communicating with the target test environment through the test agent service in the test agent service set includes the following steps: acquiring an access address of the target test environment according to the test request; sending the access address to each test agent service in the test agent service set so that the test agent service confirms the connectivity with the access address according to the access address information; and receiving the connectivity result sent by each test agent service, and taking the test agent service communicated with the access address as the associated test agent service.
Step S350, sending the test request to the target test agent service, so that the target test agent service performs a test in the target test environment according to the test request.
After the target test agent service is created, the test agent management service resends the test request to the target test agent server, and the target test agent server logs in the target test environment to execute the test process.
In an embodiment of the present application, the process of sending the test request to the target test agent service includes the following steps: calculating a network communication path with the target test agent service according to equipment communication information, wherein the network communication path comprises at least one transfer equipment, and the equipment communication information comprises connectivity information of computing equipment corresponding to each test agent service in the test agent service set; and sending the test request to the at least one transit device according to the network communication path, so that the transit device forwards the test request to the target test agent service. The device connectivity information is connection information of the device where each test agent service maintained by the test agent management service is located, and may be recorded in the form of a routing table.
In one embodiment of the present application, before sending the test request to the target test agent service, the method further comprises: receiving a creation response result sent by the target test agent service, wherein the creation response result comprises communication information of terminal equipment of the target test environment, and the communication information comprises communication information of the terminal equipment and computing equipment corresponding to each test agent service in the test agent service set; and adding the target test agent service to the test agent service set according to the creating response result, and updating the device communication information according to the communication information of the terminal device of the target test environment.
In one embodiment of the present application, the method further comprises: if the test agent service corresponding to the target test environment exists in the test agent service set, acquiring the test agent service as a target test agent service; calculating a network communication path with the target test agent service according to the equipment communication information; sending the test request to the target test agent service over the network communication path.
In the embodiment of the application, when the test agent service corresponding to the target environment cannot be found directly, the relay device of the terminal capable of accessing the target environment is inquired, and the test agent is installed on the terminal of the target environment through the relay device to test the server. The agent service is dynamically established according to needs, so that the automatic test under network isolation can be realized, independent maintenance of test tools and test scripts deployed at various positions is not needed, the maintenance cost and the maintenance difficulty in the test process are reduced, and the test efficiency is improved.
The test execution process in the scheme of the present application can refer to fig. 4. Fig. 4 is a flowchart illustrating a test execution process in an embodiment of the present application. As shown in fig. 4, the process is performed as follows: firstly, a tester initiates a test execution request through the front end of the cloud test platform. And the cloud test platform calls the related automatic test scripts through the test framework. When the automated test script executes a certain operation, a test operation request is initiated to the test agent management service, and the request can be a connecting device execution command. And the test agent management service analyzes the test operation request to acquire the IP of the target equipment. The test agent management service searches the managed connectivity relation and finds the test agent service which is in network communication with the target equipment. The test agent management service calculates the optimal path to the target test agent service, and the algorithm may be based on the shortest path requirements. And after the security processing is carried out on the test agent management service, sending a test operation request to the next hop agent service. The transfer test agent service receives the test operation request, and forwards the test operation request to the next hop, namely the target test agent service after confirming the content. The target test agent service receives the test operation request, checks the content, and then searches whether the connection to the target equipment is established or not, and if not, reestablishes the connection. The target test agent service is connected to the target equipment, executes the test operation and feeds back the result to the agent management service.
The above process is described below with reference to specific examples. And the user A carries out a test request for virtual machine reconstruction through the front end of the cloud test platform. And after receiving the request, the cloud test platform calls an automatic test script for carrying out virtual machine reconstruction test. And when the automatic test script executes the step of logging in the virtual machine to confirm that the state of the virtual machine is normal, sending a test operation request to the test agent management service. The test agent management service searches the test agent connectivity management for the test agent services of the reachable target virtual machine according to the request. All existing test agent services cannot communicate with a virtual machine because the virtual machine was just created without configuring the routing table. At this time, the test agent management service broadcasts a transmission request to search for the transfer device that can reach the target virtual machine. After receiving the request, all the test agent services query the device list in the connected device management, connect to the devices to verify the connectivity of the devices and the target virtual machine, and discover the host where the virtual machine is located. Subsequently, a create new test agent service request is initiated by the test agent management service. The request is forwarded to a test agent service which is communicated with a host network where the virtual machine is located layer by layer, the test agent service logs in the found transfer equipment, and transmits an installation package through an SCP protocol to install a new test agent service. After the new test agent service is initialized, the new test agent service is managed by the transfer equipment, the communication relation with all other equipment in the environment where the new test agent service is located is confirmed, and the communication relation is fed back to the test agent management service. And the test agent management service resends the test request after updating the test agent communication relation management. And the test request is forwarded to a new test agent service layer by layer, and after the service logs in the virtual machine to execute the test operation, the service returns the test result in the original way, so that the one-time test operation is completed.
It should be noted that although the various steps of the methods in this application are depicted in the drawings in a particular order, this does not require or imply that these steps must be performed in this particular order, or that all of the shown steps must be performed, to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step execution, and/or one step broken down into multiple step executions, etc.
The following describes an implementation of the apparatus of the present application, which may be used to perform the proxy test method in the above embodiments of the present application. Fig. 5 schematically shows a block diagram of the agent test apparatus in the embodiment of the present application. As shown in fig. 5, the agent test apparatus 00 may mainly include:
a test request receiving module 510, configured to receive a test request, where the test request is used to perform a test operation on a target test environment;
an agent service obtaining module 520, configured to obtain, according to the test request, a test agent service corresponding to the target test environment from the test agent service set, where the test agent service set includes at least one test agent service respectively corresponding to at least one test environment;
an association service query module 530, configured to query an association test agent service communicated with the terminal device of the target test environment if there is no test agent service corresponding to the target test environment in the test agent service set;
a creation request sending module 540, configured to send an agent service creation request to the association test agent service, so that the association test agent service creates a target test agent service on the terminal device in the target test environment;
a test request sending module 550, configured to send the test request to the target test agent service, so that the target test agent service performs a test in the target test environment according to the test request.
In an embodiment of the present application, based on the above scheme, the association service query module includes:
an access address obtaining unit, configured to obtain an access address of the target test environment according to the test request;
the access address sending unit is used for sending the access address to each test agent service in the test agent service set so that the test agent service confirms the connectivity with the access address according to the access address information;
and the communication result receiving unit is used for receiving the communication result sent by each test agent service and taking the test agent service communicated with the access address as the associated test agent service.
In an embodiment of the application, based on the above scheme, the test request sending module includes:
a path calculation unit, configured to calculate a network communication path with the second testing agent service according to device connectivity information, where the network communication path includes at least one transit device, and the device connectivity information includes connectivity information of a computing device corresponding to each testing agent service in the testing agent service set;
a request sending unit, configured to send the test request to the at least one transit device according to the network communication path, so that the transit device forwards the test request to the second test agent service.
In an embodiment of the present application, based on the above scheme, the agent testing apparatus further includes:
a result receiving module, configured to receive a create response result sent by the target test agent service, where the create response result includes connectivity information of a terminal device in the target test environment, and the connectivity information includes connectivity information of the terminal device and a computing device corresponding to each test agent service in the test agent service set;
and the communication information updating module is used for adding the target test agent service into the test agent service set according to the creating response result and updating the equipment communication information according to the communication information of the terminal equipment of the target test environment.
In an embodiment of the present application, based on the above scheme, the agent testing apparatus further includes:
a target service acquisition module, configured to acquire a test agent service as a target test agent service if the test agent service corresponding to the target test environment exists in the test agent service set;
the path calculation module is used for calculating a network communication path with the target test agent service according to the equipment communication information;
the test request sending module is further configured to send the test request to the target test agent service through the network communication path.
It should be noted that the apparatus provided in the foregoing embodiment and the method provided in the foregoing embodiment belong to the same concept, and the specific manner in which each module performs operations has been described in detail in the method embodiment, and is not described again here.
FIG. 6 illustrates a schematic structural diagram of a computer system suitable for use in implementing the electronic device of an embodiment of the present application.
It should be noted that the computer system 600 of the electronic device shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
As shown in fig. 6, the computer system 600 includes a Central Processing Unit (CPU)601, which can perform various appropriate actions and processes according to a program stored in a Read-Only Memory (ROM) 602 or a program loaded from a storage section 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data necessary for system operation are also stored. The CPU 601, ROM 602, and RAM 603 are connected to each other via a bus 604. An Input/Output (I/O) interface 605 is also connected to bus 604.
The following components are connected to the I/O interface 605: an input portion 606 including a keyboard, a mouse, and the like; an output section 607 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, a speaker, and the like; a storage section 608 including a hard disk and the like; and a communication section 609 including a Network interface card such as a LAN (Local Area Network) card, a modem, or the like. The communication section 609 performs communication processing via a network such as the internet. The driver 610 is also connected to the I/O interface 605 as needed. A removable medium 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 610 as necessary, so that a computer program read out therefrom is mounted into the storage section 608 as necessary.
In particular, according to embodiments of the present application, the processes described in the various method flowcharts may be implemented as computer software programs. For example, embodiments of the present application include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 609, and/or installed from the removable medium 611. When the computer program is executed by a Central Processing Unit (CPU)601, various functions defined in the system of the present application are executed.
It should be noted that the computer readable medium shown in the embodiments of the present application may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a Read-Only Memory (ROM), an Erasable Programmable Read-Only Memory (EPROM), a flash Memory, an optical fiber, a portable Compact Disc Read-Only Memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present application, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In this application, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
It should be noted that although in the above detailed description several modules or units of the device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit, according to embodiments of the application. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the embodiments of the present application.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains.
It will be understood that the present application is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the application is limited only by the appended claims.

Claims (10)

1. An agent test method, comprising:
receiving a test request, wherein the test request is used for carrying out test operation on a target test environment;
according to the test request, obtaining a test agent service corresponding to the target test environment from the test agent service set, wherein the test agent service set comprises at least one test agent service respectively corresponding to at least one test environment;
if the test agent service corresponding to the target test environment does not exist in the test agent service set, inquiring terminal equipment communicated with the target test environment through the test agent service in the test agent service set;
creating a target test agent service on the terminal equipment through a test agent service in the test agent service set;
and sending the test request to the target test agent service so that the target test agent service tests in the target test environment according to the test request.
2. The method of claim 1, wherein querying, by a test agent service of the set of test agent services, a terminal device in communication with the target test environment comprises:
acquiring an access address of the target test environment according to the test request;
sending the access address to each test agent service in the test agent service set so that the test agent service confirms the connectivity with the access address according to the access address information;
and receiving the connectivity result sent by each test agent service, and taking the test agent service communicated with the access address as the associated test agent service.
3. The method of claim 1, wherein sending the test request to the target test agent service comprises:
calculating a network communication path with the target test agent service according to equipment communication information, wherein the network communication path comprises at least one transfer equipment, and the equipment communication information comprises connectivity information of computing equipment corresponding to each test agent service in the test agent service set;
and sending the test request to the at least one transit device according to the network communication path, so that the transit device forwards the test request to the target test agent service.
4. The method of claim 3, wherein prior to sending the test request to the target test agent service, the method further comprises:
receiving a creation response result sent by the target test agent service, wherein the creation response result comprises communication information of terminal equipment of the target test environment, and the communication information comprises communication information of the terminal equipment and computing equipment corresponding to each test agent service in the test agent service set;
and adding the target test agent service to the test agent service set according to the creating response result, and updating the device communication information according to the communication information of the terminal device of the target test environment.
5. The method of claim 3, further comprising:
if the test agent service corresponding to the target test environment exists in the test agent service set, acquiring the test agent service as a target test agent service;
calculating a network communication path with the target test agent service according to the equipment communication information;
sending the test request to the target test agent service over the network communication path.
6. An agent test apparatus, comprising:
the device comprises a test request receiving module, a test request processing module and a test result processing module, wherein the test request receiving module is used for receiving a test request which is used for carrying out test operation on a target test environment;
an agent service obtaining module, configured to obtain, according to the test request, a test agent service corresponding to the target test environment from the test agent service set, where the test agent service set includes at least one test agent service respectively corresponding to at least one test environment;
the relevant service query module is used for querying the relevant test agent service communicated with the terminal equipment of the target test environment if the test agent service corresponding to the target test environment does not exist in the test agent service set;
a creation request sending module, configured to send an agent service creation request to the association test agent service, so that the association test agent service creates a target test agent service on the terminal device in the target test environment;
and the test request sending module is used for sending the test request to the target test agent service so that the target test agent service tests in the target test environment according to the test request.
7. The apparatus of claim 6, wherein the correlation service query module comprises:
an access address obtaining unit, configured to obtain an access address of the target test environment according to the test request;
the access address sending unit is used for sending the access address to each test agent service in the test agent service set so that the test agent service confirms the connectivity with the access address according to the access address information;
and the communication result receiving unit is used for receiving the communication result sent by each test agent service and taking the test agent service communicated with the access address as the associated test agent service.
8. The apparatus of claim 6, wherein the test request sending module comprises:
a path calculation unit, configured to calculate a network communication path with the second testing agent service according to device connectivity information, where the network communication path includes at least one transit device, and the device connectivity information includes connectivity information of a computing device corresponding to each testing agent service in the testing agent service set;
a request sending unit, configured to send the test request to the at least one transit device according to the network communication path, so that the transit device forwards the test request to the second test agent service.
9. An electronic device, comprising:
a processor;
a memory for storing executable instructions of the processor;
wherein the processor is configured to perform the agent testing method of any one of claims 1 to 5 via execution of the executable instructions.
10. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the agent testing method according to any one of claims 1 to 5.
CN202111680920.9A 2021-12-31 2021-12-31 Agent test method, device, electronic equipment and readable medium Pending CN114297083A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111680920.9A CN114297083A (en) 2021-12-31 2021-12-31 Agent test method, device, electronic equipment and readable medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111680920.9A CN114297083A (en) 2021-12-31 2021-12-31 Agent test method, device, electronic equipment and readable medium

Publications (1)

Publication Number Publication Date
CN114297083A true CN114297083A (en) 2022-04-08

Family

ID=80976229

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111680920.9A Pending CN114297083A (en) 2021-12-31 2021-12-31 Agent test method, device, electronic equipment and readable medium

Country Status (1)

Country Link
CN (1) CN114297083A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117240913A (en) * 2023-11-13 2023-12-15 深圳市鲸视科技有限公司 Proxy communication method, test system, terminal device and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117240913A (en) * 2023-11-13 2023-12-15 深圳市鲸视科技有限公司 Proxy communication method, test system, terminal device and storage medium
CN117240913B (en) * 2023-11-13 2024-02-13 深圳市鲸视科技有限公司 Proxy communication method, test system, terminal device and storage medium

Similar Documents

Publication Publication Date Title
US10545750B2 (en) Distributed upgrade in virtualized computing environments
CN109150978B (en) Method and device for debugging micro service
CN103229478B (en) A kind of method and apparatus determining virtual-machine drift
US8230414B1 (en) Software distribution and cache management across client machines on a network
CN110677383B (en) Firewall wall opening method and device, storage medium and computer equipment
US11625280B2 (en) Cloud-native proxy gateway to cloud resources
CN109039788B (en) Port configuration method and device of network equipment and storage medium
CN104040964B (en) Method, device and data center network across service area communication
CN110401641B (en) User authentication method and device and electronic equipment
CN111404628B (en) Time synchronization method and device
CN110781083B (en) H5 client code setting multi-environment testing method and system
CN114205342B (en) Service debugging routing method, electronic equipment and medium
CN109104368B (en) Connection request method, device, server and computer readable storage medium
CN104639497A (en) Remote access configuration method, remote access method, remote access configuration device, remote access device and remote access system
CN109491887A (en) Test environment dispositions method, device, computer equipment and storage medium
CN104639555A (en) Request processing method, system and device
CN113726834A (en) Method, device, system, equipment and medium for message routing
CN114297083A (en) Agent test method, device, electronic equipment and readable medium
CN107911496A (en) A kind of VPN service terminal acts on behalf of the method and device of DNS
CN112748962B (en) Application loading method, device, electronic equipment and computer readable medium
CN110798358B (en) Distributed service identification method and device, computer readable medium and electronic equipment
KR20220006605A (en) Cloud communication method and device, user device, network device
CN114615285B (en) Physical machine deployment method and device, electronic equipment and storage medium
CN112702441B (en) Container-based access data processing method, device, system and storage medium
CN115883512A (en) DNS domain name processing method, device, system, equipment and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination