Proxy testing method, device, electronic device and readable medium
By dynamically creating proxy services in a cloud environment, the problem of high and difficult testing and maintenance costs caused by the distribution of test devices in the cloud environment on different networks is solved, and automated testing under network isolation is realized, which reduces maintenance costs and increases Test efficiency.
Patent Information
- Application Number
- CN202111680920.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-31
- Publication Date
- 2025-02-21
- Estimated Expiration
- 2041-12-31
AI Technical Summary
In a cloud environment, the equipment under test is usually in different networks, which leads to high deployment and maintenance costs of testing tools and test scripts, and is difficult to maintain, affecting testing efficiency.
By dynamically creating proxy services on demand, automated testing under network isolation can be achieved, and separate maintenance of test tools and test scripts deployed everywhere can be avoided.
It reduces the maintenance cost and maintenance difficulty of the test process, improves the testing efficiency, and realizes automated testing under network isolation.
Smart Images

Figure CN114297083B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a proxy testing method, device, electronic device and readable medium. Background Art
[0002] With the development of cloud technology, more and more applications are implemented on cloud platforms, and cloud testing has also emerged. Cloud testing is aimed at testing the basic resources that carry cloud upper-layer applications. The test objects include the cloud platform itself and the correctness of cloud platform application deployment. The commonly used testing methods are manual testing or automatic testing through testing tools.
[0003] In the related art, the test tool is deployed on a computer device that can access the tested environment. The test tool automatically accesses the tested device in the tested environment according to the edited script to perform the test operation.
[0004] However, the devices under test in the cloud environment are usually in different networks, so corresponding test tools and targeted test scripts need to be deployed in each network environment respectively. The maintenance cost and difficulty of the test process are high, which affects the test efficiency. Summary of the invention
[0005] Based on the above technical problems, the present application provides a proxy testing method, device, electronic device and readable medium, so as to realize automated testing under network isolation by dynamically creating proxy services on demand, without the need for separate maintenance of test tools and test scripts deployed in various locations, thereby reducing the maintenance cost and difficulty of the testing process and improving testing efficiency.
[0006] Other features and advantages of the present application will become apparent from the following detailed description, or may be learned in part by the practice of the present application.
[0007] According to one aspect of an embodiment of the present application, a proxy testing method is provided, including:
[0008] receiving a test request, wherein the test request is used to perform a test operation on a target test environment;
[0009] According to the test request, acquiring a test agent service corresponding to the target test environment from the test agent service set, wherein the test agent service set includes at least one test agent service corresponding to at least one test environment respectively;
[0010] If there is no test agent service corresponding to the target test environment in the test agent service set, querying a terminal device connected to the target test environment through the test agent service in the test agent service set;
[0011] Creating a target test agent service on the terminal device through the test agent service in the test agent service set;
[0012] The test request is sent to the target test agent service, so that the target test agent service performs the test in the target test environment according to the test request.
[0013] In some embodiments of the present application, based on the above technical solution, querying the terminal device connected to the target test environment through the test agent service in the test agent service set includes:
[0014] According to the test request, obtaining an access address of the target test environment;
[0015] Sending the access address to each test agent service in the test agent service set, so that the test agent service confirms connectivity with the access address according to the access address information;
[0016] The connectivity results sent by the respective test agent services are received, and the test agent service connected to the access address is used as the associated test agent service.
[0017] In some embodiments of the present application, based on the above technical solution, sending the test request to the target test agent service includes:
[0018] Calculate a network communication path with the target test agent service according to the device connectivity information, wherein 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 test agent service in the test agent service set;
[0019] The test request is sent to the at least one transfer device according to the network communication path, so that the transfer device forwards the test request to the target test agent service.
[0020] In some embodiments of the present application, based on the above technical solution, before sending the test request to the target test agent service, the method further includes:
[0021] receiving a creation response result sent by the target test agent service, wherein the creation response result includes connectivity information of a terminal device of the target test environment, wherein the connectivity information includes connectivity information between the terminal device and a computing device corresponding to each test agent service in the test agent service set;
[0022] According to the creation response result, the target test agent service is added to the test agent service set, and the device connectivity information is updated according to the connectivity information of the terminal device of the target test environment.
[0023] In some embodiments of the present application, based on the above technical solution, the method further includes:
[0024] If there is a test agent service corresponding to the target test environment in the test agent service set, acquiring the test agent service as the target test agent service;
[0025] Calculating a network communication path with the target test agent service according to the device connectivity information;
[0026] The test request is sent to the target test agent service through the network communication path.
[0027] According to one aspect of an embodiment of the present application, a proxy testing device is provided, characterized in that it includes:
[0028] A test request receiving module, used to receive a test request, wherein the test request is used to perform a test operation on a target test environment;
[0029] An agent service acquisition module, configured to acquire, according to the test request, a test agent service corresponding to the target test environment from the test agent service set, wherein the test agent service set includes at least one test agent service corresponding to at least one test environment respectively;
[0030] an associated service query module, configured to query an associated test agent service connected to a terminal device of the target test environment if the test agent service set does not contain a test agent service corresponding to the target test environment;
[0031] A creation request sending module, used for sending an agent service creation request to the associated test agent service, so that the associated test agent service creates a target test agent service on the terminal device of the target test environment;
[0032] The test request sending module is used to send the test request to the target test agent service, so that the target test agent service performs the test in the target test environment according to the test request.
[0033] In some embodiments of the present application, based on the above technical solution, the associated service query module includes:
[0034] An access address acquisition unit, used to acquire the access address of the target test environment according to the test request;
[0035] An access address sending unit, used to send the access address to each test agent service in the test agent service set, so that the test agent service confirms connectivity with the access address according to the access address information;
[0036] The connectivity result receiving unit is used to receive the connectivity results sent by each test agent service, and take the test agent service connected to the access address as the associated test agent service.
[0037] In some embodiments of the present application, based on the above technical solution, the test request sending module includes:
[0038] a path calculation unit, configured to calculate a network communication path with the second test agent service according to device connectivity information, wherein the network communication path includes at least one transit device, and the device connectivity information includes connectivity information of computing devices corresponding to each test agent service in the test agent service set;
[0039] A request sending unit is used to send the test request to the at least one transfer device according to the network communication path, so that the transfer device forwards the test request to the second test agent service.
[0040] According to one aspect of an embodiment of the present application, an electronic device is provided, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute the proxy testing method in the above technical solution by executing the executable instructions.
[0041] According to one aspect of an embodiment of the present application, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the proxy testing method in the above technical solution is implemented.
[0042] In an embodiment of the present application, when the test agent service corresponding to the target environment cannot be directly found, a transfer device that can access the terminal of the target environment is queried, and the test agent is installed on the terminal of the target environment through the transfer device to test the server. By dynamically creating a proxy service on demand, automated testing under network isolation can be achieved without the need to separately maintain the test tools and test scripts deployed in various places, thereby reducing the maintenance cost and difficulty of the test process and improving the test efficiency.
[0043] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] The drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present application, and together with the specification, are used to explain the principles of the present application. Obviously, the drawings described below are only some embodiments of the present application, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In the drawings:
[0045] Figure 1 The following schematically shows an exemplary system architecture diagram of the technical solution of the present application in an application scenario;
[0046] Figure 2 is a schematic structural diagram of the proxy testing system in an embodiment of the present application;
[0047] Figure 3 is a flow chart of a proxy testing method provided by an embodiment of the present application;
[0048] Figure 4 A flowchart of the test execution process in the embodiment of the present application;
[0049] Figure 5 The following schematically shows a block diagram of the composition of the proxy testing device in the embodiment of the present application;
[0050] Figure 6 A schematic diagram of the structure of a computer system suitable for implementing an electronic device of an embodiment of the present application is shown. DETAILED DESCRIPTION
[0051] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this application will be more comprehensive and complete and fully convey the concept of the example embodiments to those skilled in the art.
[0052] In addition, described feature, structure or characteristic can be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present application. However, those skilled in the art will appreciate that the technical scheme of the present application can be put into practice without one or more of the specific details, or other methods, components, devices, steps, etc. can be adopted. In other cases, known methods, devices, realizations or operations are not shown or described in detail to avoid blurring the various aspects of the application.
[0053] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.
[0054] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps can be decomposed, and some operations / steps can be combined or partially combined, so the actual execution order may change according to actual conditions.
[0055] It should be understood that the solution of the present application is applied in a cloud platform environment, and is specifically applied to scenarios where cloud testing is performed based on a cloud platform. In such scenarios, testers will edit test scripts according to the tests that need to be performed, and the test tool will perform test operations on the environment being tested based on the test scripts. In the process of testing the solution of the present application, the test tool no longer directly accesses the test environment driver for testing, but the test agent service deployed in each tested environment performs the test operation on its behalf. The test agent service is created and managed by the test agent management service, which creates a test agent service connected to the device and service network on demand, and is responsible for calculating the path and forwarding the test operation request.
[0056] Figure 1 The following schematically shows an exemplary system architecture diagram of the technical solution of the present application in an application scenario. Figure 1As shown, the application scenario includes a test platform server 110, a tested server 120 and a springboard server 130. Among them, there is a network connection between the test platform server 110 and the springboard server 130, and there is a network connection between the springboard server 130 and the tested server 120. A cloud service environment is formed by multiple servers. It is understandable that the above-mentioned server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network, content distribution network), and big data and artificial intelligence platforms. A test management server for managing the test process is installed on the test platform server 110. An agent test service that actually executes the test process is installed on the tested server 120. The test platform server 110 accesses the tested server 120 through the springboard server 130 according to the test script, and installs the proxy test service on the tested server 120, and then sends a test request to the tested server 120 to execute the test process through the proxy test service.
[0057] Please refer to the overall process of this application plan Figure 2 , Figure 2 Schematic diagram of the structure of the proxy test system in the embodiment of the present application. Figure 2 As shown, the agent testing system mainly includes an automated testing platform, a test agent management module, a transfer device, and a test agent module. Among them, the automated testing platform calls the corresponding automated testing script to perform the test according to the request sent by the tester from the front end. The platform can automatically complete operations such as authentication of the cloud management platform. The automated testing script is responsible for initiating test operation requests, but not for executing test operations. The test agent management module is mainly responsible for forwarding test operation requests, connecting with the test script upward and connecting with the test agent module network downward. The transfer device is a device that is connected to the network part of the tested environment. A test agent module is deployed in the transfer device. The test agent module is mainly responsible for executing test operations, and is connected to some devices and service networks of the tested environment downward.
[0058] Specifically, the test agent management module is mainly used for test agent connectivity relationship management, test operation forwarding, test agent service lifecycle management and test security management. Among them, the test agent connectivity relationship management mainly records the network connectivity relationship between test agent services and with the devices and services in the tested environment. Test operation forwarding will find the test agent service that can execute the test operation based on the connectivity relationship management, and calculate the optimal path to reach it. The test agent service lifecycle management is used to initiate the creation of new test agent service requests, receive heartbeat packets of some test agent services, and initiate the recovery of all test agent service requests. Test security management is used for malicious access interception, encrypted storage of authentication information, and unified management of tokens.
[0059] The test proxy module is mainly used for test operation execution, test operation forwarding, connected device management, device connection management, and local service lifecycle management. Test operation execution is used to connect to the target device and service, execute test operations, and feedback the operation results. Test operation forwarding is used to forward the test operation request to the next hop according to the request. Connected device management is used to discover and record the list of connectable devices, and discover available transit devices when dynamically creating proxy services. Device connection management is used to manage long connections to the devices in the tested environment, including console, ssh, etc. It is usually established according to the test operation requirements and provides connection multiplexing and timeout disconnection capabilities. Local service lifecycle management is used to execute requests to create and recycle test proxy services, and receive heartbeat packets from the test proxy services created by them.
[0060] The following is a detailed description of the technical solution provided by this application in conjunction with the specific implementation method. For ease of introduction, please refer to Figure 3 , Figure 3 This is a flowchart of a proxy testing method provided in an embodiment of the present application. The method can be applied to the above-mentioned test platform server, which can be regarded as a computer device. In the embodiment of the present application, the computer device is used as the execution subject to introduce the proxy testing method. The proxy testing method can include the following steps S310 to S350:
[0061] Step S310: receiving a test request, where the test request is used to perform a test operation on a target test environment.
[0062] The test request can be triggered by the tester through the automated test script. According to the test request, the test environment and test content to be tested can be determined.
[0063] Step S320: acquiring, according to the test request, a test agent service corresponding to the target test environment from the test agent service set, wherein the test agent service set includes at least one test agent service corresponding to at least one test environment.
[0064] The test agent service set includes test agent services that have been created by the test system in various tested environments. These test agent services can access a portion of the devices in the entire cloud platform. Each test agent service corresponds to at least one test environment, which generally refers to an environment installed on a computing device for running services, such as an operating system of a terminal device or an environment in a virtual machine installed on a terminal device.
[0065] Step S330: If there is no test agent service corresponding to the target test environment in the test agent service set, query the terminal device connected to the target test environment through the test agent service in the test agent service set.
[0066] If there is no test agent service corresponding to the target test environment in the test agent service set, it means that the target test environment is a 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 connected to the terminal device of the target test environment will be queried. The test agent service management module can instruct all test agent services to try to establish a communication connection with the target test environment through the computing device to which they can be connected, or according to the network address of the target test environment, broadcast the search for the target test environment in a routing forwarding manner, so as to find the terminal device connected to the target test environment.
[0067] Step S340: creating a target test agent service on the terminal device through the test agent service in the test agent service set.
[0068] Specifically, the management service will send an agent service creation request to the test agent service that finds the terminal device. The test agent service will log in to the terminal device according to the agent service creation request, and then transmit the service installation package to the terminal device, thereby installing the target test agent service on the terminal device. For example, the test agent management service queries the terminal device X that can be connected to the target test environment through the test agent service A, then the test agent management service will send an agent service creation request to the test agent service A, and the test agent service A will log in to the terminal device X and install the test agent service B on the terminal device X.
[0069] In one embodiment of the present application, the process of querying the terminal device connected to the target test environment through the test agent service in the test agent service set includes the following steps: obtaining the 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; receiving the connectivity results sent by each test agent service, and using the test agent service connected to the access address as the associated test agent service.
[0070] Step S350: Send the test request to the target test agent service, so that the target test agent service performs the test in the target test environment according to the test request.
[0071] After the target test agent service is created, the test agent management service will resend the test request to the target test agent server, and the target test agent service will log in to the target test environment to execute the test process.
[0072] In one 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 device connectivity information, wherein the network communication path includes at least one transit device, and the device connectivity information includes connectivity information of computing devices corresponding to each test agent service in the test agent service set; 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. Device connectivity information is the connection information of the devices where each test agent service is located maintained by the test agent management service, which can be recorded in the form of a routing table.
[0073] In one embodiment of the present application, before sending the test request to the target test agent service, the method also includes: receiving a creation response result sent by the target test agent service, the creation response result including connectivity information of a terminal device of the target test environment, the connectivity information including connectivity information between the terminal device and a computing device corresponding to each test agent service in the test agent service set; based on the creation response result, adding the target test agent service to the test agent service set, and updating the device connectivity information based on the connectivity information of the terminal device of the target test environment.
[0074] In one embodiment of the present application, the method also includes: if there is a test agent service corresponding to the target test environment in the test agent service set, obtaining the test agent service as the target test agent service; calculating the network communication path with the target test agent service based on the device connectivity information; and sending the test request to the target test agent service through the network communication path.
[0075] In an embodiment of the present application, when the test agent service corresponding to the target environment cannot be directly found, a transfer device that can access the terminal of the target environment is queried, and the test agent is installed on the terminal of the target environment through the transfer device to test the server. By dynamically creating a proxy service on demand, automated testing under network isolation can be achieved without the need to separately maintain the test tools and test scripts deployed in various places, thereby reducing the maintenance cost and difficulty of the test process and improving the test efficiency.
[0076] The test execution process in the solution of this application can be found in Figure 4 . Figure 4 Schematic diagram of the test execution process in the embodiment of the present application. Figure 4 As shown in the figure, the execution process is as follows: First, the tester initiates a test request through the cloud test platform front end. The cloud test platform calls the relevant automated test script through the test framework. When the automated test script executes a certain operation, it initiates a test operation request to the test agent management service, and the request can execute a command for the connected device. The test agent management service parses the test operation request and obtains the IP of the target device. The test agent management service searches for the connectivity relationship it manages and finds the test agent service that is connected to the target device network. The test agent management service calculates the optimal path to the target test agent service, and the algorithm can be based on the shortest path requirement. After security processing, the test agent management service sends the test operation request to the next hop agent service. The transit test agent service receives the test operation request, confirms the content and forwards it to the next hop, that is, the target test agent service. The target test agent service receives the test operation request, confirms the content and finds whether the connection to the target device has been established. If not, it will be re-established. The target test agent service connects to the target device, executes the test operation, and feeds the result back to the agent management service in the original path.
[0077] The above process is described below with specific examples. User A makes a test request for virtual machine reconstruction through the cloud test platform front end. After receiving the request, the cloud test platform calls the automated test script for virtual machine reconstruction test. When the automated test script executes the step of logging in to the virtual machine to confirm that the virtual machine status is normal, a test operation request is sent to the test agent management service. The test agent management service will search for a test agent service that can reach the target virtual machine in the test agent connectivity management according to the request. Since the virtual machine has just been created and the routing table is not configured, all existing test agent services cannot connect to the virtual machine. At this time, the test agent management service will broadcast a request to find a transit device that can reach the target virtual machine. After receiving the request, all test agent services will query the device list in the connected device management, connect to these devices to verify their connectivity with the target virtual machine, and find the host where the virtual machine is located. Subsequently, the test agent management service initiates a request to create a new test agent service. The request is forwarded layer by layer to the test agent service that is connected to the host network where the virtual machine is located. The test agent service logs in to the transit device found before, transmits the installation package through the SCP protocol, and installs the new test agent service. After the new test agent service is initialized, it is managed by the transfer device, confirms the connectivity with all other devices in its environment and feeds back to the test agent management service. The test agent management service resends the test request after updating the test agent connectivity management. The test request is forwarded to the new test agent service layer by layer. After the service logs in to the virtual machine to perform the test operation, it returns the test result along the original path, and the test operation is completed.
[0078] It should be noted that although the steps of the method in the present application are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.
[0079] The following introduces the device implementation of the present application, which can be used to execute the proxy testing method in the above-mentioned embodiment of the present application. Figure 5 The following schematically shows a block diagram of the composition of the proxy testing device in the embodiment of the present application. Figure 5 As shown, the proxy test device 00 may mainly include:
[0080] A test request receiving module 510 is used to receive a test request, wherein the test request is used to perform a test operation on a target test environment;
[0081] An agent service acquisition module 520, configured to acquire, according to the test request, a test agent service corresponding to the target test environment from the test agent service set, wherein the test agent service set includes at least one test agent service corresponding to at least one test environment;
[0082] The associated service query module 530 is used to query the associated test agent service connected to 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;
[0083] A creation request sending module 540, configured to send an agent service creation request to the associated test agent service, so that the associated test agent service creates a target test agent service on a terminal device in the target test environment;
[0084] The test request sending module 550 is used to send the test request to the target test agent service, so that the target test agent service performs the test in the target test environment according to the test request.
[0085] In one embodiment of the present application, based on the above solution, the associated service query module includes:
[0086] An access address acquisition unit, used to acquire the access address of the target test environment according to the test request;
[0087] An access address sending unit, used to send the access address to each test agent service in the test agent service set, so that the test agent service confirms connectivity with the access address according to the access address information;
[0088] The connectivity result receiving unit is used to receive the connectivity results sent by each test agent service, and take the test agent service connected to the access address as the associated test agent service.
[0089] In one embodiment of the present application, based on the above solution, the test request sending module includes:
[0090] a path calculation unit, configured to calculate a network communication path with the second test agent service according to device connectivity information, wherein the network communication path includes at least one transit device, and the device connectivity information includes connectivity information of computing devices corresponding to each test agent service in the test agent service set;
[0091] A request sending unit is used to send the test request to the at least one transfer device according to the network communication path, so that the transfer device forwards the test request to the second test agent service.
[0092] In one embodiment of the present application, based on the above solution, the proxy testing device further includes:
[0093] A result receiving module, configured to receive a creation response result sent by the target test agent service, wherein the creation response result includes connectivity information of a terminal device of the target test environment, wherein the connectivity information includes connectivity information between the terminal device and a computing device corresponding to each test agent service in the test agent service set;
[0094] A connectivity information updating module is used to add the target test agent service to the test agent service set according to the creation response result, and update the device connectivity information according to the connectivity information of the terminal device of the target test environment.
[0095] In one embodiment of the present application, based on the above solution, the proxy testing device further includes:
[0096] A target service acquisition module, configured to acquire a test agent service corresponding to the target test environment as a target test agent service if the test agent service set contains the test agent service;
[0097] A path calculation module, used to calculate a network communication path with the target test agent service according to the device connectivity information;
[0098] The test request sending module is further used to send the test request to the target test agent service through the network communication path.
[0099] It should be noted that the apparatus provided in the above embodiment and the method provided in the above embodiment belong to the same concept, wherein the specific manner in which each module performs the operation has been described in detail in the method embodiment and will not be repeated here.
[0100] Figure 6 A schematic diagram of the structure of a computer system suitable for implementing an electronic device of an embodiment of the present application is shown.
[0101] It should be noted that Figure 6 The computer system 600 of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0102] like Figure 6As shown, the computer system 600 includes a central processing unit (CPU) 601, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 602 or the program loaded from the storage part 608 to the random access memory (RAM) 603. In the RAM 603, various programs and data required for system operation are also stored. The CPU 601, the ROM 602 and the RAM 603 are connected to each other through a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0103] The following components are connected to the I / O interface 605: an input section 606 including a keyboard, a mouse, etc.; an output section 607 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 608 including a hard disk, etc.; and a communication section 609 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 609 performs communication processing via a network such as the Internet. A drive 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, etc., is installed on the drive 610 as needed so that a computer program read therefrom is installed into the storage section 608 as needed.
[0104] In particular, according to an embodiment of the present application, the process described in each method flow chart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flow chart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication part 609, and / or installed from a 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.
[0105] It should be noted that the computer-readable medium shown in the embodiment of the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, - but not limited to - an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by an instruction execution system, device or device or used in combination with it. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, wherein a computer-readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate, or transmit programs for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0106] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the above-mentioned module, program segment or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0107] It should be noted that, although several modules or units of the equipment for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into being embodied by multiple modules or units.
[0108] Through the description of the above implementation methods, it is easy for those skilled in the art to understand that the example implementation methods described here can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to the implementation methods 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 flash drive, a mobile 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 implementation methods of the present application.
[0109] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary technical means in the art that are not disclosed in the present application.
[0110] It should be understood that the present application is not limited to the precise structures that have been 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 present application is limited only by the appended claims.
Claims
1. A proxy testing method, characterized in that: include: receiving a test request, wherein the test request is used to perform a test operation on a target test environment; According to the test request, acquiring a test agent service corresponding to the target test environment from a test agent service set, wherein the test agent service set includes at least one test agent service corresponding to at least one test environment; If there is no test agent service corresponding to the target test environment in the test agent service set, querying a terminal device connected to the target test environment through the test agent service in the test agent service set; Searching for the test agent service of the terminal device in the test agent service set, and creating a target test agent service on the terminal device; The test request is sent to the target test agent service, so that the target test agent service performs the test in the target test environment according to the test request.
2. The method according to claim 1, characterized in that The querying of the terminal device connected to the target test environment through the test agent service in the test agent service set includes: According to the test request, obtaining an access address of the target test environment; Sending the access address to each test agent service in the test agent service set, so that the test agent service confirms connectivity with the access address according to the access address information; The connectivity results sent by each test agent service are received, and the test agent service connected to the access address is used as an associated test agent service.
3. The method according to claim 1, characterized in that The sending the test request to the target test agent service includes: Calculate a network communication path with the target test agent service according to the device connectivity information, wherein 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 test agent service in the test agent service set; According to the network communication path, the test request is sent to the at least one transfer device, so that the transfer device forwards the test request to the target test agent service.
4. The method according to claim 3, characterized in that Before sending the test request to the target test proxy service, the method further includes: receiving a creation response result sent by the target test agent service, wherein the creation response result includes connectivity information of a terminal device of the target test environment, wherein the connectivity information includes connectivity information between the terminal device and a computing device corresponding to each test agent service in the test agent service set; According to the creation response result, the target test agent service is added to the test agent service set, and the device connectivity information is updated according to the connectivity information of the terminal device of the target test environment.
5. The method according to claim 3, characterized in that: The method further comprises: If there is a test agent service corresponding to the target test environment in the test agent service set, acquiring the test agent service as the target test agent service; Calculating a network communication path with the target test agent service according to the device connectivity information; The test request is sent to the target test agent service through the network communication path.
6. A proxy testing device, characterized in that: include: A test request receiving module, used to receive a test request, wherein the test request is used to perform a test operation on a target test environment; An agent service acquisition module, configured to acquire, according to the test request, a test agent service corresponding to the target test environment from a test agent service set, wherein the test agent service set includes at least one test agent service corresponding to at least one test environment; an associated service query module, configured to query an associated test agent service connected to a terminal device of the target test environment if the test agent service set does not contain a test agent service corresponding to the target test environment; A creation request sending module, used for sending an agent service creation request to the associated test agent service, so that the associated test agent service creates a target test agent service on the terminal device of the target test environment; The test request sending module is used to send the test request to the target test agent service, so that the target test agent service performs the test in the target test environment according to the test request.
7. The device according to claim 6, characterized in that The associated service query module includes: An access address acquisition unit, configured to acquire an access address of the target test environment according to the test request; An access address sending unit, used to send the access address to each test agent service in the test agent service set, so that the test agent service confirms connectivity with the access address according to the access address information; The connectivity result receiving unit is used to receive the connectivity results sent by each test agent service, and take the test agent service connected to the access address as the associated test agent service.
8. The device according to claim 6, characterized in that The test request sending module comprises: A path calculation unit, configured to calculate a network communication path with the target test agent service according to device connectivity information, wherein the network communication path includes at least one transit device, and the device connectivity information includes connectivity information of computing devices corresponding to each test agent service in the test agent service set; The request sending unit is used to send the test request to the at least one transfer device according to the network communication path, so that the transfer device forwards the test request to the target test agent service.
9. An electronic device, characterized in that: include: processor; A memory, configured to store executable instructions of the processor; The processor is configured to execute the agent testing method according to any one of claims 1 to 5 by executing the executable instructions.
10. A computer readable medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the agent testing method according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Software testing system, method and device and computer readable storage medium
CN111258917A
Distributed automatic test management method, device and apparatus and storage medium
CN112398707A