CN115840694A - Automatic testing method and device, terminal equipment and storage medium - Google Patents
Automatic testing method and device, terminal equipment and storage medium Download PDFInfo
- Publication number
- CN115840694A CN115840694A CN202211431173.XA CN202211431173A CN115840694A CN 115840694 A CN115840694 A CN 115840694A CN 202211431173 A CN202211431173 A CN 202211431173A CN 115840694 A CN115840694 A CN 115840694A
- Authority
- CN
- China
- Prior art keywords
- test
- equipment
- task
- testing
- agent
- 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
Links
Images
Landscapes
- Debugging And Monitoring (AREA)
Abstract
The invention discloses an automatic test method, an automatic test device, terminal equipment and a storage medium, the automatic test method relates to the field of test, the automatic test method is applied to a test agent tool, a test task is received from a test system, the test task is analyzed to obtain test instruction information, test equipment needing agent is operated according to the obtained test instruction information, the test equipment is tested to obtain test equipment data returned by the test equipment, and the test equipment data is uploaded to the test system. The invention solves the technical problem that the software and hardware can not be automatically tested, and also realizes the effect of one-time test configuration and reuse in the process of multiple tests.
Description
Technical Field
The invention relates to the field of software and hardware tool testing, in particular to an automatic testing method, an automatic testing device, terminal equipment and a storage medium.
Background
With the rapid development of internet technology, people's life style tends to be intelligent and convenient, and various software and hardware technologies play an indispensable role in people's daily life. As is well known, after the software and hardware technologies are invented by technicians, the software and hardware technologies need to be tested according to various scenes that may be foreseen, so as to find out possible technical bugs and situations of functional failures. However, with the development of internet technology, based on various living needs of people, software and hardware technologies are invented like bamboo shoots in spring after rain, so that testers face heavy testing tasks. In order to reduce the workload of the tester and to improve the testing efficiency of the software and hardware technologies, it is necessary to perform an automated process for the testing of the relevant software and hardware technologies.
An automatic test framework used in the conventional technology is generally based on an automatic test API interface or WEB page function, and the automatic test framework or tool can meet the test of most WEB-based application services, but when the test framework or tool faces related software and hardware test tools such as chips, firmware, buses and channels to be tested, the automatic test framework or tool cannot execute the automatic test function, and even cannot achieve the functions of running for many times, automatically starting, reporting data and the like only by configuring test software once. Therefore, it is necessary to provide an automatic testing method capable of uniformly performing automatic testing on different software and hardware.
The above is only for the purpose of assisting understanding of the technical aspects of the present invention, and does not represent an admission that the above is prior art.
Disclosure of Invention
The invention mainly aims to provide an automatic testing method, an automatic testing device, terminal equipment and a storage medium, and aims to solve the technical problem that software and hardware cannot be automatically tested.
In order to achieve the above object, the present invention provides an automatic testing method, which includes:
receiving a test task from a test system;
analyzing the test task to obtain test instruction information;
running test equipment needing agent according to the obtained test instruction information, testing the test equipment, and obtaining test equipment data returned by the test equipment;
and uploading the test equipment data to the test system.
Optionally, the step of analyzing the test task to obtain test instruction information includes:
analyzing the test task to obtain a test case associated with the test task and a test plug-in associated with the test case;
and aggregating the test case associated with the test task obtained by analyzing and the test plug-in associated with the test case to obtain test instruction information.
Optionally, the step of receiving the test task from the test system further comprises:
uploading test software information contained in the test equipment to the test system;
and acquiring the information of the test software which is not installed in the test equipment from the test system, and downloading and installing the information into the test equipment.
Optionally, the step of running a corresponding test device according to the obtained test instruction information, testing the test device, and obtaining test device data returned by the test device includes:
determining corresponding test equipment and the operating environment of the corresponding test equipment according to the test instruction information; sending an execution function instruction contained in the test instruction information to the test equipment based on the running environment of the corresponding test equipment, wherein the test equipment executes corresponding test operation according to the execution function instruction by combining corresponding test software and corresponding test plug-in units to obtain test equipment data;
and obtaining the test equipment data returned by the test equipment.
Optionally, the automated testing method is applied to a testing system, the testing system establishes duplex connection with the testing agent, and the automated testing method includes:
initiating a test task to the test agent tool so that the test agent tool receives the test task, analyzing the test task to obtain test instruction information, operating test equipment needing agent according to the obtained test instruction information, testing the test equipment to obtain test equipment data returned by the test equipment, and uploading the test equipment data to the test system;
and analyzing the test equipment data uploaded by the test agent tool to obtain a test result.
Optionally, the step of initiating a test task to the test agent for the test agent to receive the test task includes:
configuring information of test software which needs to run on the test equipment and associating corresponding test tasks so that the test agent tool can obtain the information of the test software which needs to be executed when analyzing the test tasks;
and associating the test plug-in with the preset function with the corresponding test task so that the test agent tool can analyze the test task when executing the preset starting item to obtain the test plug-in with the preset function, and starting a third-party test tool based on the test plug-in with the preset function.
In addition, to achieve the above object, the present invention provides an automated testing apparatus applied to a test agent, the automated testing apparatus including:
the receiving module is used for receiving the test task from the test system;
the analysis module is used for analyzing the test task to obtain test instruction information;
the test module is used for operating test equipment needing agent according to the obtained test instruction information, testing the test equipment and obtaining test equipment data returned by the test equipment;
and the output module is used for uploading the test equipment data to the test system.
In addition, in order to achieve the above object, the present invention provides an automated testing apparatus applied to a testing system, the automated testing apparatus including:
the configuration module is used for configuring information of the test software which needs to run on the test equipment and associating the corresponding test task so as to obtain the information of the test software which needs to be executed when the test agent tool analyzes the test task;
the association module is used for associating the test plug-in with the preset function with the corresponding test task so that the test agent tool can analyze the test task when executing the preset starting item to obtain the test plug-in with the preset function, and starting a third-party test tool based on the test plug-in with the preset function;
the initiating task module is used for initiating a test task to the test agent tool so that the test agent tool can receive the test task, analyze the test task to obtain test instruction information, run test equipment needing to be acted according to the obtained test instruction information, test the test equipment to obtain test equipment data returned by the test equipment, and upload the test equipment data to the test system;
and the analysis module is used for analyzing the test equipment data uploaded by the test agent tool to obtain a test result.
In addition, in order to achieve the above object, the present invention further provides a terminal device, where the terminal device includes a memory, a processor, and an automated test program stored in the memory and executable on the processor, and the automated test program implements the steps of the automated test method when executed by the processor.
In addition, to achieve the above object, the present invention further provides a computer readable storage medium having an automated testing program stored thereon, which, when executed by a processor, implements the steps of the automated testing method as described above.
According to the automated testing method, the automated testing device, the terminal device and the storage medium, the testing task is received from the testing system, the testing task is analyzed, the testing instruction information is obtained, the testing device needing to be proxied is operated according to the obtained testing instruction information, the testing device is tested, the testing device data returned by the testing device are obtained, and the testing device data are uploaded to the testing system. By introducing the test agent tool, the connection between the test data of the test equipment and the test system is opened, and the effect that only one test configuration is needed and the test can be reused in a plurality of test processes is realized. And providing a sample for the multi-end software and hardware unified automatic test.
Drawings
FIG. 1 is a functional block diagram of a terminal device to which an automatic test apparatus of the present invention belongs;
FIG. 2 is a schematic flow chart diagram illustrating an exemplary embodiment of an automated testing method of the present invention;
FIG. 3 is a schematic diagram illustrating the connection between a test agent and a test device according to an embodiment of the present invention;
FIG. 4 is a schematic flow chart diagram of another exemplary embodiment of an automated testing method of the present invention;
fig. 5 is a diagram illustrating a relationship between a test system, a test agent, and a test terminal corresponding to a test device according to an embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
According to the automated testing method, the automated testing device, the terminal device and the storage medium, the testing task is received from the testing system, the testing task is analyzed, the testing instruction information is obtained, the testing device needing to be proxied is operated according to the obtained testing instruction information, the testing device is tested, the testing device data returned by the testing device is obtained, and the testing device data is uploaded to the testing system. By introducing the test agent tool, the connection between the test data of the test equipment and the test system is opened, and the effect that only one test configuration is needed and the test can be reused in a plurality of test processes is realized. And providing a sample for the multi-end software and hardware unified automatic test.
The technical terms related to the embodiment of the invention are as follows:
automated testing: the concept of automated testing is to translate human-driven test behavior into a process that is machine-executed. Typically, after a test case is designed and passes review, the test is performed step by a tester according to the procedures described in the test case, resulting in a comparison of the actual results with the expected results. The automatic testing principle is that an automatic testing tool is utilized, and an automatic testing case is designed through analysis of testing requirements, so that a framework of automatic testing is built, an automatic script is designed and compiled, the correctness of the script is tested, and the set of testing script is completed.
Websocket: a protocol for full duplex communication over a single TCP connection. The WebSocket communication protocol was specified by the IETF as standard RFC 6455 in 2011 and is supplemented by RFC 7936. The WebSocket API is also standardized by W3C. WebSocket enables data exchange between the client and the server to be simpler, and allows the server to actively push data to the client. In the WebSocket API, the browser and the server only need to complete one handshake, and persistent connection can be directly established between the browser and the server, and bidirectional data transmission is carried out.
Windows: microsoft Windows, an operating system developed by Microsoft corporation based on graphical user interfaces, is one of the most widely used operating systems in the world, and has the advantages of high resource management efficiency, good support for hardware, all visualization and the like.
Linux: the general name GNU/Linux is a Unix-like operating system which is free to use and spread freely, and is a multi-user, multi-task, multi-thread and multi-CPU supporting operating system based on POSIX. The user can not only intuitively obtain the implementation mechanism of the operating system, but also modify and perfect Linux according to the self requirement, so that the Linux is maximally adapted to the requirement of the user. Linux is not only stable in system performance, but also open-source software. The core firewall component has high performance and simple configuration, and ensures the safety of the system. The Linux has the characteristics of open source codes, no copyright, more technical community users and the like, and the open source codes enable users to freely cut, so that the Linux has high flexibility, powerful functions and low cost.
Docker: docker is an open source application container engine, so that developers can pack their applications and dependence packages into a portable container, and then distribute the container to any popular Linux or Windows operating system machine, and can also realize virtualization, the container completely uses sandbox mechanism, and there is no interface between them.
Port mapping: the port mapping is one of NAT address translation, it can translate the address in public network into private address, the ADSL broadband router adopting routing mode possesses a dynamic or fixed public network IP, which is divided into dynamic and static. The port mapping function may allow a machine in the internal network to provide 3W services externally, rather than directly forwarding the true IP address to the host providing the 3W services internally. If so, there are two disadvantages, one is that the internal machine is insecure because the external network can access all functions of the machine through the address translation function except 3W; secondly, when a plurality of machines need to provide the service, the same number of IP addresses are required to be converted, so that the purpose of saving the IP addresses cannot be achieved. The port mapping function is to map the false IP address of a host to a true IP address, when a user accesses a certain port of the host providing the mapped port, the server transfers the request to the host providing the specific service inside; the port mapping function can also map a plurality of ports of a real IP address machine to different ports on different internal machines. The port mapping function may also perform some specific proxy functions such as proxy POP, SMTP, TELNET, etc. protocols. Theoretically, a mapping of 6 million multiple ports could be provided. The port mapping protocol defines an RPC network service that provides a standard method for RPC based clients to be able to find the port number of the remote RPC based program supported by the server. This protocol solves all common problems working on clients, servers and networks, because the port mapping protocol can be executed on a transport port providing equivalent ports.
At present, the automatic testing concept is deeply involved in the work of testers, among a plurality of test objects, one test object is widely known in terms of complexity and large quantity, namely, the automatic test combining software and hardware, the test has the characteristics of object-oriented complexity, each object executes different test cases according to different requirements of functions or technologies, even combines some test plug-ins with preset functions and the like, and the characteristics bring great troubles for carrying out unified automatic test on the software and hardware.
An automatic test framework used in the conventional technology is generally based on an automatic test API interface or WEB page function, and the automatic test framework or tool can meet the test of most WEB-based application services, but when the test framework or tool faces related software and hardware test tools such as chips, firmware, buses and channels to be tested, the automatic test framework or tool cannot execute the automatic test function, and even cannot achieve the functions of running for many times, automatically starting, reporting data and the like only by configuring test software once. Therefore, it is necessary to provide an automatic testing method capable of uniformly performing automatic testing on different software and hardware.
The automatic testing method provided by the invention uses the testing agent tool as a testing system and a transfer client of the testing equipment represented by the testing equipment, and is used for transferring data and instructions of the testing system and the testing equipment, getting through barriers of the testing system and the testing equipment, and simultaneously the testing agent tool can process the operation and data report of the multi-terminal testing tool, thereby improving the efficiency of software and hardware automatic testing.
Referring to fig. 1, fig. 1 is a functional module schematic diagram of a terminal device to which an automatic testing apparatus of the present invention belongs. The automatic testing device can be a device which is independent of the terminal equipment and can carry out automatic testing, and the device can be borne on the terminal equipment in a hardware or software mode. The terminal device can be an intelligent mobile terminal with a data processing function, such as a mobile phone and a tablet personal computer, and can also be a fixed terminal device or a server with a data processing function.
In this embodiment, the terminal device to which the automatic test apparatus belongs at least includes an output module 110, a processor 120, a memory 130, and a communication module 140.
The memory 130 stores therein an operating system and an automated test program, and the automated test apparatus may receive a test task from the test system, analyze the test task to obtain test instruction information, run test equipment that needs to be proxied according to the obtained test instruction information, perform a test, and store information such as obtained returned test equipment data, analyzed test instructions, and the like in the memory 130; the output module 110 may be a display screen or the like. The communication module 140 may include a WIFI module, a mobile communication module, a bluetooth module, and the like, and communicates with an external device or a server through the communication module 140.
Wherein the automated test program in the memory 130 when executed by the processor implements the steps of:
receiving a test task from a test system;
analyzing the test task to obtain test instruction information;
running test equipment needing agent according to the obtained test instruction information, testing the test equipment, and obtaining test equipment data returned by the test equipment;
and uploading the test equipment data to the test system.
Further, the automated test program in the memory 130 when executed by the processor further performs the steps of:
analyzing the test task to obtain a test case associated with the test task and a test plug-in associated with the test case;
and aggregating the test case associated with the test task obtained by analyzing and the test plug-in associated with the test case to obtain test instruction information.
Further, the automated test program in the memory 130 when executed by the processor further performs the steps of:
uploading test software information contained in the test equipment to the test system;
and acquiring the information of the test software which is not installed in the test equipment from the test system, and downloading and installing the information into the test equipment.
Further, the automated test program in the memory 130 when executed by the processor further performs the steps of:
determining corresponding test equipment and the operating environment of the corresponding test equipment according to the test instruction information;
sending an execution function instruction contained in the test instruction information to the test equipment based on the running environment of the corresponding test equipment, wherein the test equipment executes corresponding test operation according to the execution function instruction by combining corresponding test software and a corresponding test plug-in to obtain test equipment data;
and obtaining the test equipment data returned by the test equipment.
Further, the automated test program in the memory 130 when executed by the processor further performs the steps of:
initiating a test task to the test agent tool so that the test agent tool receives the test task, analyzing the test task to obtain test instruction information, operating test equipment needing agent according to the obtained test instruction information, testing the test equipment to obtain test equipment data returned by the test equipment, and uploading the test equipment data to the test system;
and analyzing the test equipment data uploaded by the test agent tool to obtain a test result.
Further, the automated test program in the memory 130 when executed by the processor further performs the steps of:
configuring information of test software which needs to run on the test equipment and associating corresponding test tasks so that the test agent tool can obtain the information of the test software which needs to be executed when analyzing the test tasks;
and associating the test plug-in with the preset function with the corresponding test task so that the test agent tool can analyze the test task when executing the preset starting item to obtain the test plug-in with the preset function, and starting a third-party test tool based on the test plug-in with the preset function.
According to the scheme, the test task is received from the test system, the test task is analyzed, the test instruction information is obtained, the test equipment needing to be proxied is operated according to the obtained test instruction information, the test equipment is tested, the test equipment data returned by the test equipment is obtained, and the test equipment data is uploaded to the test system. By introducing the test agent tool, the connection between the test data of the test equipment and the test system is opened, and the effect that only one test configuration is needed and the test can be reused in a plurality of test processes is realized. And providing a sample for the multi-end software and hardware unified automatic test.
Based on the above terminal device architecture but not limited to the above architecture, embodiments of the method of the present application are provided.
The execution subject of the method of the embodiment may be an automatic testing apparatus or a terminal device, and the automatic testing apparatus is exemplified in the embodiment.
Referring to fig. 2, fig. 2 is a flowchart illustrating an exemplary embodiment of an automated testing method according to the present invention. In this embodiment, the main body of the automatic testing apparatus is a testing agent, and the automatic testing method includes:
step S10, receiving a test task from a test system;
the test system is deployed in a server, and in the test system deployment process, four basic modules are firstly created: the system comprises a test plug-in management module, a test case management module, a test project management module and a test software management module;
the test plug-in management module is established in the server and used for managing all test plug-ins contained in the test system, and testers can develop test plug-ins with preset processing functions to upload the test plug-ins to the test plug-in management module and name the test plug-ins with preset function names, so that test tasks can be extracted and associated quickly;
the test case management module is established in the server and used for managing all test cases and associating the test plug-in with the corresponding test cases so as to achieve the effect of outputting the corresponding test plug-ins together when the test cases are extracted;
the test project management module is established in the server and used for managing all project tasks in the test process, associating the corresponding test cases with the corresponding test tasks and outputting the test tasks to the test agent tool in the test process, wherein the test tasks comprise a series of associated information contents;
the test software management module is created in the server and used for managing information of the test software required to be used in the test process, wherein the information can be a download address of a software installation package or software configuration information and the like, and managing the corresponding test software by the test plug-in.
After the test system is successfully deployed, the test agent tool of the present invention needs to be installed on the host computer of the tester, and in the process of installing the test agent tool, the following information needs to be configured:
the test agent tool creates a parameter configuration page, the page is used for configuring the service address of the test system and establishing Websocket connection with the test system, and the connection can enable the test agent tool to realize end-to-end data transmission in the test system;
the method comprises the steps that a test agent tool establishes host user configuration and host software configuration, wherein a host is a host of terminal equipment needing agent and is used for establishing terminal connection with test equipment, configuring a test equipment server needing starting and extracting basic information of test software carried by the test equipment server;
the test agent tool uploads the extracted test software carried by the test equipment server to a test system, the test system checks whether the extracted test software carried by the test equipment server is complete or not in a test software management module, test software information which is not installed in the test equipment is obtained from the test system, and the test software information is downloaded and installed in the test equipment;
after the test agent tool is connected with the test system and the test equipment and the configuration is completed, the test system issues a test task to the test agent tool through Websockt connection, and the test agent tool receives the test task and starts testing;
step S20, analyzing the test task to obtain test instruction information;
after receiving the test task, the test agent tool analyzes the test task to obtain a test case associated with the test task and test plug-in information associated with the test case, and aggregates the analyzed information into a corresponding test instruction to obtain test instruction information;
step S30, running the test equipment needing agent according to the obtained test instruction information, testing the test equipment, and obtaining test equipment data returned by the test equipment;
the test agent tool runs the test software included in the corresponding test equipment according to the test instruction information, wherein the running mode is correspondingly adjusted based on the running environment of the test equipment, and referring to fig. 3, fig. 3 is a schematic diagram of the connection between the test agent tool and the test equipment in the embodiment of the present invention:
if the test software environment of the test equipment is based on Windows/Linux in the virtual machine, the test agent tool transmits an instruction to the test equipment based on a Windows/Linux kernel in the virtual machine through local port mapping and virtual port mapping, and runs corresponding test software;
if the test software environment of the test equipment is based on Windows/Linux in a virtual machine and the test software is packaged by using a Docker container, the test agent tool is connected with the virtual host through virtual port mapping communication and connected with the Docker container through container port mapping, and corresponding equipment can be operated;
if the test software environment of the test equipment is directly connected with the test agent, the test agent can also directly access the test software and issue a test instruction;
and S40, uploading the test equipment data to the test system.
After the test equipment completes the corresponding test task, the test agent tool obtains the test data obtained by the test equipment, packages the test data and returns the test data to the test system based on the Websocket connection.
According to the scheme, after the specific configuration information is completed, the test task is received from the test system, the test task is analyzed, the test instruction information is obtained, the test equipment needing to be proxied is operated according to the obtained test instruction information, the test equipment is tested, the test equipment data returned by the test equipment is obtained, and the test equipment data is uploaded to the test system. By introducing the test agent tool, the connection between the test data of the test equipment and the test system is opened, so that the test configuration is realized only once, the complex tasks can be simplified in the process of multiple tests, and meanwhile, the aggregation operation is carried out on the execution data of the multiple test equipment, so that the single test task becomes simpler and more efficient, and the individual servers are not required to be started and the acquisition and analysis of the data are not required. And providing a sample for the multi-end software and hardware unified automatic test.
Further, referring to fig. 4, fig. 4 is a flowchart illustrating an automated testing method according to another exemplary embodiment of the present invention. Based on the embodiment shown in fig. 2, in this embodiment, the main body of the automatic testing apparatus is a testing system:
step S50: initiating a test task to the test agent tool so that the test agent tool receives the test task, analyzing the test task to obtain test instruction information, operating test equipment needing agent according to the obtained test instruction information, testing the test equipment to obtain test equipment data returned by the test equipment, and uploading the test equipment data to the test system;
the test system is deployed in a server, and in the test system deployment process, four basic modules are firstly created:
the test plug-in management module is established in the server and used for managing all test plug-ins contained in the test system, and testers can develop test plug-ins with preset processing functions to upload the test plug-ins to the test plug-in management module and name the test plug-ins with preset function names, so that test tasks can be extracted and associated quickly;
the test case management module is established in the server and used for managing all test cases and associating the test plug-in with the corresponding test cases so as to achieve the effect of outputting the corresponding test plug-ins together when the test cases are extracted;
the test project management module is established in the server and used for managing all project tasks in the test process, associating the corresponding test cases with the corresponding test tasks and outputting the test tasks to the test agent tool in the test process, wherein the test tasks comprise a series of associated information contents;
the test software management module is established in the server and used for managing information of test software required to be used in the test process, wherein the information can be a download address of a software installation package or software configuration information and the like, and managing the corresponding test software by the test plug-in;
after the deployment and the configuration of the test system are finished, the test system is debugged by testers to confirm that the test system is normal in operation, and then the test system starts to execute test items:
calling a test item management module to create a test item and distributing a test task;
one test project is composed of a plurality of test tasks, so the configuration of the test tasks is particularly important for executing the test project;
calling a test software management module to configure corresponding test software information which needs to be operated in test equipment in a test task, and associating the corresponding test software information with the test task;
if the test task has the preset requirements of starting and processing a custom or third-party test tool in the test process, a specific test plug-in is required to be supplemented in the test task to realize the corresponding function;
calling a test case management module to configure a test case to be used in the test task, and associating the test case to the corresponding test task;
calling a test plug-in management module to configure a test plug-in to be used in the test case, and associating the test plug-in to the corresponding test case;
and packaging the configured test tasks and sending the packaged test tasks to a test agent tool for subsequent test processes.
Step S60: and analyzing the test equipment data uploaded by the test agent tool to obtain a test result.
The test system reads and analyzes the test equipment data reported by the test agent based on the test case, and aggregates the analyzed information;
storing the aggregated information and sending the aggregated information to a test task page for analysis and sorting by a tester;
in this embodiment, a test system issues a test task, starts a test, and after receiving test device data uploaded by the test agent, analyzes the test device data to obtain a test result. The function that the test agent tool is used for transferring instructions and data of the test system and the test equipment is realized, and the effects of one-time test configuration and multiplexing of a plurality of test processes are synchronously realized.
In addition, an embodiment of the present invention further provides an automatic testing apparatus, where the automatic testing apparatus includes:
the receiving module is used for receiving the test task from the test system;
the analysis module is used for analyzing the test task to obtain test instruction information;
the test module is used for running test equipment needing agent according to the obtained test instruction information, testing the test equipment and obtaining test equipment data returned by the test equipment;
and the output module is used for uploading the test equipment data to the test system.
In addition, an embodiment of the present invention further provides an automatic testing apparatus, where the automatic testing apparatus includes:
the configuration module is used for configuring information of the test software which needs to run on the test equipment and associating the corresponding test task so as to obtain the information of the test software which needs to be executed when the test agent tool analyzes the test task;
the association module is used for associating the test plug-in with the preset function with the corresponding test task so that the test agent tool can analyze the test task when executing the preset starting item to obtain the test plug-in with the preset function, and starting a third-party test tool based on the test plug-in with the preset function;
the task initiating module is used for initiating a test task to the test agent tool so that the test agent tool can receive the test task, analyze the test task to obtain test instruction information, run test equipment needing agent according to the obtained test instruction information, test the test equipment to obtain test equipment data returned by the test equipment, and upload the test equipment data to the test system;
and the analysis module is used for analyzing the test equipment data uploaded by the test agent tool to obtain a test result.
Specifically, referring to fig. 5, fig. 5 is a relationship diagram between a test system, a test agent, and a test terminal corresponding to a test device in the embodiment of the present invention; the test system gradually configures the relevant information: the system comprises test software, test plug-ins, test cases and test items; in the test project, a plurality of test tasks form a complete test project test process; the test agent tool establishes Websocket connection with the test system based on the service address of the test system, establishes terminal connection with each large test terminal, and configures host users and host software information of test equipment needing test agents; the test terminal exchanges commands and test data with the test agent tool based on terminal connection;
in this embodiment, a receiving module is executed by a test agent tool and is configured to receive a test task from a test system, an analyzing module is configured to analyze the test task to obtain test instruction information, a test module is configured to run a test device to be acted according to the obtained test instruction information and test the test device to obtain test device data returned by the test device, and an output module is configured to upload the test device data to the test system. And then, a test system execution configuration module is used for configuring information of the test software which needs to run on the test equipment and associating the information with the corresponding test task, so that the test agent tool obtains the information of the test software which needs to be executed when analyzing the test task, an association module is used for associating the test plug-in with a preset function with the corresponding test task, so that the test agent tool analyzes the test task when executing preset starting, the test plug-in with the preset function is obtained, a third-party test tool is started based on the test plug-in with the preset function, a task initiating module is used for initiating the test task to the test agent tool, so that the test agent tool receives the test task, analyzes the test task, obtains test instruction information, runs the test equipment which needs to be proxied according to the obtained test instruction information, tests the test equipment, obtains test equipment data returned by the test equipment, uploads the test equipment data to the test system, and an analysis module is used for analyzing the test equipment data uploaded by the test agent tool, and obtains a test result. The test agent tool is used for communicating the test system and the test equipment, and data generated by custom or third-party test tools or software can be preset and started and processed, so that the effects of configuring information once and repeatedly utilizing the information for many times are achieved.
In addition, the invention also provides a terminal device, which comprises a memory, a processor and an automatic test program stored on the memory and capable of running on the processor, wherein the automatic test program realizes the steps of the automatic test method when being executed by the processor.
Since the automatic test program is executed by the processor, all technical solutions of all the embodiments are adopted, so that at least all the advantages brought by all the technical solutions of all the embodiments are achieved, and detailed description is omitted here.
Furthermore, the present invention also provides a computer readable storage medium, on which an automated test program is stored, which, when executed by a processor, implements the steps of the automated test method as described above.
Since the automatic test program is executed by the processor, all technical solutions of all the embodiments are adopted, so that at least all the advantages brought by all the technical solutions of all the embodiments are achieved, and detailed description is omitted here.
Compared with the prior art, the automatic testing method, the automatic testing device, the terminal device and the storage medium provided by the embodiment of the invention receive the testing task from the testing system, analyze the testing task to obtain the testing instruction information, run the testing device needing to be proxied according to the obtained testing instruction information, test the testing device, obtain the returned testing device data and upload the testing device data to the testing system. By introducing the test agent tool, the connection between the test data of the test equipment and the test system is communicated, the effect of starting and processing data generated by a user-defined or third-party test tool or software which can be preset is realized, meanwhile, the test configuration only needs to be carried out once, the effect of multiplexing in the test process for many times is realized, complicated tasks are simplified, meanwhile, the aggregation operation is carried out on the execution data of a plurality of test equipment, the single test task is simpler and more efficient, and the starting and the acquisition and analysis of the data are not needed by one server.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising a … …" does not exclude the presence of another identical element in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, a controlled terminal, or a network device) to execute the method of each embodiment of the present application.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.
Claims (10)
1. An automated testing method, wherein the automated testing method is applied to a testing agent, and the testing agent establishes duplex connection with a testing system, and the automated testing method comprises:
receiving a test task from a test system;
analyzing the test task to obtain test instruction information;
running test equipment needing agent according to the obtained test instruction information, testing the test equipment, and obtaining test equipment data returned by the test equipment;
and uploading the test equipment data to the test system.
2. The automated testing method of claim 1, wherein the step of parsing the test task to obtain test instruction information comprises:
analyzing the test task to obtain a test case associated with the test task and a test plug-in associated with the test case;
and aggregating the test case associated with the test task obtained by analyzing and the test plug-in associated with the test case to obtain test instruction information.
3. The automated testing method of claim 1, wherein the step of receiving a test task from a test system is preceded by:
uploading test software information contained in the test equipment to the test system;
and acquiring the information of the test software which is not installed in the test equipment from the test system, and downloading and installing the information to the test equipment.
4. The automated testing method of claim 1, wherein the step of running corresponding testing equipment according to the obtained testing instruction information, testing the testing equipment, and obtaining testing equipment data returned by the testing equipment comprises:
determining corresponding test equipment and the operating environment of the corresponding test equipment according to the test instruction information;
sending an execution function instruction contained in the test instruction information to the test equipment based on the running environment of the corresponding test equipment, wherein the test equipment executes corresponding test operation according to the execution function instruction by combining corresponding test software and a corresponding test plug-in to obtain test equipment data;
and obtaining the test equipment data returned by the test equipment.
5. An automated testing method, wherein the automated testing method is applied to a testing system, and the testing system establishes duplex connection with the testing agent, and the automated testing method comprises:
initiating a test task to the test agent tool so that the test agent tool receives the test task, analyzing the test task to obtain test instruction information, operating test equipment needing agent according to the obtained test instruction information, testing the test equipment to obtain test equipment data returned by the test equipment, and uploading the test equipment data to the test system;
and analyzing the test equipment data uploaded by the test agent tool to obtain a test result.
6. The automated testing method of claim 5, wherein the step of initiating a test task to the test agent for the test agent to receive the test task comprises, prior to:
configuring information of test software which needs to run on the test equipment and associating corresponding test tasks so that the test agent tool can obtain the information of the test software which needs to be executed when analyzing the test tasks;
and associating the test plug-in with the preset function with the corresponding test task so that the test agent tool can analyze the test task when executing the preset starting item to obtain the test plug-in with the preset function, and starting a third-party test tool based on the test plug-in with the preset function.
7. An automated testing apparatus, wherein the automated testing apparatus is applied to a test agent, the automated testing apparatus comprising:
the receiving module is used for receiving the test task from the test system;
the analysis module is used for analyzing the test task to obtain test instruction information;
the test module is used for operating test equipment needing agent according to the obtained test instruction information, testing the test equipment and obtaining test equipment data returned by the test equipment;
and the output module is used for uploading the test equipment data to the test system.
8. An automated testing device, wherein the automated testing device is applied to a testing system, the automated testing device comprising:
the configuration module is used for configuring information of the test software which needs to run on the test equipment and associating the corresponding test task so as to obtain the information of the test software which needs to be executed when the test agent tool analyzes the test task;
the association module is used for associating the test plug-in with the preset function with the corresponding test task so that the test agent tool can analyze the test task when executing the preset starting item to obtain the test plug-in with the preset function, and starting a third-party test tool based on the test plug-in with the preset function;
the task initiating module is used for initiating a test task to the test agent tool so that the test agent tool can receive the test task, analyze the test task to obtain test instruction information, run test equipment needing agent according to the obtained test instruction information, test the test equipment to obtain test equipment data returned by the test equipment, and upload the test equipment data to the test system;
and the analysis module is used for analyzing the test equipment data uploaded by the test agent tool to obtain a test result.
9. A terminal device comprising a memory, a processor, and an automated test program stored on the memory and executable on the processor, the automated test program when executed by the processor implementing the steps of the automated test method of any one of claims 1-4 or 5-6.
10. A computer-readable storage medium, having stored thereon an automated test program which, when executed by a processor, performs the steps of the automated testing method of any of claims 1-4 or 5-6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211431173.XA CN115840694A (en) | 2022-11-15 | 2022-11-15 | Automatic testing method and device, terminal equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211431173.XA CN115840694A (en) | 2022-11-15 | 2022-11-15 | Automatic testing method and device, terminal equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115840694A true CN115840694A (en) | 2023-03-24 |
Family
ID=85575667
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211431173.XA Pending CN115840694A (en) | 2022-11-15 | 2022-11-15 | Automatic testing method and device, terminal equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115840694A (en) |
-
2022
- 2022-11-15 CN CN202211431173.XA patent/CN115840694A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106776313B (en) | Method and device for simulating service and centralized management platform | |
CN109933522B (en) | Test method, test system and storage medium for automatic case | |
CN111796858A (en) | Method, system and related equipment for access detection of application programs in Kubernetes cluster | |
CN111542064A (en) | Container arrangement management system and arrangement method for wireless access network | |
CN106484611B (en) | Fuzzy test method and device based on automatic protocol adaptation | |
CN101227343B (en) | Method and device for testing TCPv6 and UDPv6 | |
WO2023103727A1 (en) | Routing method for service debugging, electronic device, medium and program product | |
CN108881425B (en) | Data packet processing method and system | |
CN111367685B (en) | Interface calling method and device, computer equipment and storage medium | |
CN112231209A (en) | Parameter acquisition method and device, computer equipment and storage medium | |
CN103368783B (en) | Method, system and equipment for network communication process monitoring | |
Veltri et al. | NEMO: A flexible and highly scalable network EMulatOr | |
Lee | Implementation of TLS and DTLS on Zephyr OS for IoT devices | |
CN113468045A (en) | Test system, method and assembly for server batch configuration software | |
CN110572394B (en) | Access control method and device | |
CN105808425A (en) | Method, device and system for realizing application test of mobile terminal | |
CN116016295B (en) | Ethernet performance monitoring method, system, industrial control equipment and storage medium | |
CN115840694A (en) | Automatic testing method and device, terminal equipment and storage medium | |
CN114629830B (en) | Method and system for automatically controlling test center instrument test | |
CN105577453A (en) | System and method for realizing application test of mobile terminals | |
CN111177717A (en) | Malicious process identification method and device, electronic device and storage medium | |
CN104852832A (en) | Method and system for testing performance of stun server in socket cluster | |
US20130028262A1 (en) | Method and arrangement for message analysis | |
CN113489848B (en) | Terminal equipment testing method and device, electronic equipment and storage medium | |
CN215186817U (en) | Application debugging device of cross-mechanism internal network |
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 |