CN117687926A - Test method, test device, electronic equipment and computer storage medium - Google Patents

Test method, test device, electronic equipment and computer storage medium Download PDF

Info

Publication number
CN117687926A
CN117687926A CN202311756380.7A CN202311756380A CN117687926A CN 117687926 A CN117687926 A CN 117687926A CN 202311756380 A CN202311756380 A CN 202311756380A CN 117687926 A CN117687926 A CN 117687926A
Authority
CN
China
Prior art keywords
test
tool
tested
test tool
preset interface
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311756380.7A
Other languages
Chinese (zh)
Inventor
张卉
李晨
张丹
李星辰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Aisino Corp
Original Assignee
Aisino Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Aisino Corp filed Critical Aisino Corp
Priority to CN202311756380.7A priority Critical patent/CN117687926A/en
Publication of CN117687926A publication Critical patent/CN117687926A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The embodiment of the application provides a testing method, a testing device, electronic equipment and a computer storage medium. The method comprises the following steps: receiving test parameters sent by the first test tool, wherein the test parameters are generated by the first test tool according to a configured test case scene; generating a test script according to the test parameters and the called first preset interface, wherein the first preset interface is pre-packaged for the second test tool and is determined according to the test case scene; receiving a test instruction sent by the first test tool, executing the test script according to the test instruction, and generating a first test result; and sending the first test result to the first test tool. The test script can be automatically generated, the writing difficulty of the test case scene is reduced, and the test efficiency is improved.

Description

Test method, test device, electronic equipment and computer storage medium
Technical Field
The embodiment of the application relates to the technical field of computers, in particular to a testing method, a testing device, electronic equipment and a computer storage medium.
Background
Along with the popularization of software modularized architecture design, software testing faces the problems of frequent iteration, complex and changeable functions, multiparty butt joint and the like, meanwhile, the demand of automatic testing is increased, and the writing and maintenance workload of automatic test cases is also increased.
In order to write, maintain and execute automatic test cases in the test process, a tester needs to have certain programming capability, a tester needs to have certain business capability, and automatic environment maintenance is required to be carried out on test equipment regularly, so that the test process of software faces higher test cost.
Disclosure of Invention
In view of this, the embodiments of the present application provide a test method, apparatus, electronic device, and computer storage medium, which automatically generate a test script, reduce the difficulty of writing a test case scenario, and improve the test efficiency.
According to a first aspect of an embodiment of the present application, there is provided a testing method applied to a second testing tool in an automated testing tool, where the automated testing tool includes a first testing tool and the second testing tool, the first testing tool is deployed at a server side, and the second testing tool is deployed at a client to be tested when testing the client to be tested, and the method includes:
Receiving test parameters sent by the first test tool, wherein the test parameters are generated by the first test tool according to a configured test case scene;
generating a test script according to the test parameters and the called first preset interface, wherein the first preset interface is pre-packaged for the second test tool and is determined according to the test case scene;
receiving a test instruction sent by the first test tool, executing the test script according to the test instruction, and generating a first test result;
and sending the first test result to the first test tool.
In some embodiments, the test parameters include test data;
the generating a test script according to the test parameters and the called first preset interface includes:
acquiring a script data packet of the called first preset interface;
and generating the test script according to the script data packet and the test data.
In some embodiments, before the generating the test script according to the test parameters and the invoked preset interface, the method further includes:
under the condition that the called first preset interface is not started, sending test error information to the first test tool;
And if the first preset interface is detected to be started, executing the step of generating a test script according to the test parameters and the called preset interface.
In some embodiments, the method further comprises:
transmitting test error information to the first test tool under the condition that the called preset first interface lacks a script data packet;
and if the fact that the called first preset interface has the script data packet is detected, executing the step of generating the test script according to the test parameters and the called preset interface.
According to a second aspect of embodiments of the present application, there is provided a testing method applied to a client to be tested, the method including:
receiving test parameters sent by a first test tool, wherein the test parameters are generated by the first test tool according to a configured test case scene;
executing a script data packet of a called second preset interface based on the test parameters to generate a second test result, wherein a plurality of second preset interfaces are pre-packaged in the client to be tested, and the called second preset interfaces are determined by the first test tool according to the test case scene;
And sending the second test result to the first test tool.
According to a third aspect of the embodiments of the present application, a testing method is provided, which is applied to a first testing tool in an automated testing tool, where the automated testing tool includes the first testing tool and a second testing tool, where the first testing tool is disposed at a server side, and the second testing tool is deployed at a client to be tested when the client to be tested is tested, and the method includes:
determining a called preset interface according to a configured test case scene, and generating test parameters, wherein the preset interface comprises a first preset interface and a second preset interface;
sending the test parameters to the second test tool and/or the client to be tested;
sending a test instruction to the second test tool and/or the client to be tested;
and receiving a first test result sent by the second test tool and/or a second test result sent by the client to be tested.
According to a fourth aspect of the embodiments of the present application, there is provided a testing apparatus applied to a second testing tool in an automated testing tool, where the automated testing tool includes a first testing tool and the second testing tool, the first testing tool is deployed at a server, and the second testing tool is deployed at a client to be tested when testing the client to be tested, and the apparatus includes:
The receiving module is used for receiving the test parameters sent by the first test tool, wherein the test parameters are generated by the first test tool according to the configured test case scene;
the generation module is used for generating a test script according to the test parameters and the called first preset interface, wherein the first preset interface is packaged in advance for the second test tool and is determined according to the test case scene;
the execution module is used for receiving the test instruction sent by the first test tool, executing the test script according to the test instruction and generating a first test result;
a transmitting module for transmitting the first test result to the first test tool
According to a fifth aspect of the embodiments of the present application, there is provided a testing apparatus applied to a first testing tool in an automated testing tool, where the automated testing tool includes the first testing tool and a second testing tool, the first testing tool is disposed at a server, and the second testing tool is disposed at a client to be tested when the client to be tested is tested, and the apparatus includes:
The determining module is used for determining a called preset interface according to the configured test case scene and generating test parameters, wherein the preset interface comprises a first preset interface and a second preset interface;
the first sending module is used for sending the test parameters to the second test tool and/or the client to be tested;
the second sending module is used for sending a test instruction to the second test tool and/or the client to be tested;
and the receiving module is used for receiving the first test result sent by the second test tool and/or the second test result sent by the client to be tested.
According to a sixth aspect of embodiments of the present application, there is provided an electronic device, including: the device comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete communication with each other through the communication bus; the memory is configured to store at least one executable instruction, where the executable instruction causes the processor to execute an operation corresponding to the test generation method according to the embodiment of the present application.
According to a seventh aspect of embodiments of the present application, there is provided a computer storage medium having stored thereon a computer program which, when executed by a processor, implements a test method as described in embodiments of the present application.
According to the test scheme provided by the embodiment of the application, when the second test tool receives the test parameters sent by the first test tool, the second test tool generates the test script according to the test parameters and the first preset interface determined by the first test tool according to the test case scene, so that the test script can be automatically generated, the efficiency and the accuracy of the generation of the test script are improved, and further, when the second test tool receives the test instruction, the second test tool executes the test script to generate a test result and sends the test result to the first test tool to finish the test. By the test method, the programming difficulty of the automatic test case can be reduced, the script capability requirement on a tester in the test case scene programming process is reduced, and the test efficiency is improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following description will briefly introduce the drawings that are required to be used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are only some embodiments described in the embodiments of the present application, and other drawings may also be obtained according to these drawings for a person having ordinary skill in the art.
FIG. 1 is a flow chart of steps of a test method according to an embodiment of the present application;
FIG. 2 is a flow chart of steps of a test method according to an embodiment of the present application;
FIG. 3 is a flow chart of steps of a test method according to an embodiment of the present application;
FIG. 4 is a flow chart of steps of a testing method according to another embodiment of the present application;
FIG. 5 is a block diagram of a testing device according to an embodiment of the present application;
FIG. 6 is a block diagram of a testing device according to an embodiment of the present application;
FIG. 7 is a block diagram of a test system according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to better understand the technical solutions in the embodiments of the present application, the following descriptions will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only some embodiments of the present application, but not all embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the embodiments of the present application shall fall within the scope of protection of the embodiments of the present application.
Embodiments of the present application are further described below with reference to the accompanying drawings of embodiments of the present application.
The embodiment of the application provides a testing method, which is applied to a second testing tool in an automatic testing tool, wherein the automatic testing tool comprises a first testing tool and a second testing tool, the first testing tool is deployed at a server, the second testing tool is deployed at a client to be tested when the client to be tested is tested, and specific steps are shown in fig. 1, and the method comprises the following steps:
s101, receiving test parameters sent by a first test tool.
In the embodiment of the application, when testing software, the second test tool receives the test parameters sent by the first test tool, specifically, the test parameters are generated by the first test according to the configured test case scenario, and the test case scenario is a series of operation steps configured on the configuration interface. Specifically, the test case scenario may include steps of overlaying a C disc file, clearing a cache, and the like, and the test parameters may include data required in the test process. For example, in an overlay C-disk file, the test parameters may include target data to overlay the C-disk file with the target data.
S102, generating a test script according to the test parameters and the called first preset interface.
In this embodiment of the present application, after the second testing tool receives the testing parameters, the second testing tool generates the corresponding testing script according to the testing parameters and the invoked first preset interface. Specifically, a plurality of first preset interfaces are pre-packaged in the second testing tool in the embodiment of the present application, and the called first preset interfaces are determined by the first testing tool according to the test case scenario.
In one example, the first preset interface is pre-packaged by the second test tool for code that performs a particular function. Specifically, the first preset interface may be used to perform an operation of overwriting the C disc file, and may also be used to perform an operation of deleting D disc data.
In one example, for example, the test case scenario includes overlaying a C-disc file and clearing a cache, and the first test tool determines that the invoked first preset interface includes an overlay interface and a delete interface, generates a test script using test data of the overlay C-disc file in the overlay interface and the test parameters, and generates a test script using the test data explicitly cached in the delete interface and the test parameters.
Specifically, for example, the first preset interface called in the second test tool is an overlay interface, the overlay interface executes an operation of overlaying the C disc file, the test parameter is the client information, and the generated script is to use the client information data to overlay the C disc file.
S103, receiving a test instruction sent by a first test tool, executing a test script according to the test instruction, and generating a first test result.
In the embodiment of the application, after the second testing tool generates the testing script, when the second testing tool receives the testing instruction sent by the first testing tool, the second testing tool executes the generated testing script, so as to determine the first testing result.
In one example, when the second test tool generates a test script that is data of "customer information" and overlays the C disk file, and when the second test tool receives a test instruction sent by the first test tool, the second test tool executes the test script, and the second test tool determines whether the data of "customer information" is successfully used and overlays the C disk file, thereby determining a test result.
In one example, when the test script generated by the second test tool is to delete the files of the cache a, the cache B and the cache C, and when the second test tool receives the test instruction sent by the first test tool, the second test tool executes the test script, and the second test tool determines whether to delete the files of the cache a, the cache B and the cache C successfully, thereby determining the test result.
S104, sending the first test result to the first test tool.
In this embodiment, when the second testing tool determines the test result, the second testing tool sends the first test result to the first testing tool, so as to complete the test of the second testing tool on the software.
In one example, when the second test tool sends the first test result to the first test tool, the first test tool may send the test result of each test step in the test case scenario to the first test tool respectively, or may aggregate the test result of each test step in the test case scenario, and send a total test result to the first test tool.
For example, the test case scenario includes three test steps, the second test tool generates the test script 1, the test script 2 and the test script 3 according to the three test steps, the second test tool executes the test script 1 to generate the first test result 1, executes the test script 2 to generate the first test result 2, executes the test script 3 to generate the first test result 3, and when the second test tool sends the first test result to the first test tool, the second test tool may send the first test result 1, the first test result 2 and the first test result 3 to the first test tool respectively, or may send the first test result 1, the first test result 2 and the first test result 3 to the first test tool after summarizing the first test result 1, the first test result 2 and the first test result 3 into one total first test result.
According to the test method provided by the embodiment of the application, when the second test tool receives the test parameters sent by the first test tool, the second test tool generates the test script according to the test parameters and the first preset interface determined by the first test tool according to the test case scene, so that the test script can be automatically generated, the efficiency and the accuracy of the generation of the test script are improved, and further, when the second test tool receives the test instructions, the test script is executed, a test result is generated, and the test result is sent to the first test tool to finish the test. By the test method, the programming difficulty of the automatic test case can be reduced, the script capability requirement on a tester in the test case scene programming process is reduced, and the test efficiency is improved.
Further, the test parameters of the embodiments of the present application include test data;
according to the embodiment of the application, the test script is generated according to the test parameters and the called first preset interface, and the method can comprise the following steps:
s1021, acquiring a script data packet of the called first preset interface.
In this embodiment of the present application, when a test script is generated by a second test tool, a script data packet in a called first preset interface determined by the first test tool is first acquired, specifically, a plurality of first preset interfaces are pre-packaged in the second test tool, specifically, a script data packet for implementing a specific function is packaged as a first preset interface, for example, the script data packet may modify a software address, may empty a cache of software, and may delete data in a computer.
S1022, generating a test script according to the script data packet and the test data.
In this embodiment of the present application, after obtaining a script data packet in a first preset interface, a second test tool assembles test data required for testing with the script data packet, so as to generate a test script, where the test data second test tool reads the test data in test parameters. For example, when the determined function of the first preset interface script data packet is to cover the C disc file, the second test reads test data required for covering the C disc file in the test parameters during assembling the test script, and then assembles the read test data with the script data packet, thereby generating the test script.
According to the embodiment of the application, the test script is automatically assembled through the second test tool, so that the test script can be automatically assembled, the reusability of the automatic script is improved, the script capability requirement of a test person in the test process is reduced, and meanwhile, the multiplexing rate of test data and test cases is improved. Further, after the service of the operation auxiliary interface is started in different test environments through the second test tool, the steps of environment automatic preparation, data preparation, test step execution and test result generation can be realized only by calling the interface when the test is performed, the compatibility test efficiency is improved, and the test cost of the compatibility environment preparation and the compatibility test process in the test process is reduced.
Further, the test method according to the embodiment of the present application further includes the following steps before generating the test script according to the test parameters and the invoked preset interface:
s105, under the condition that the called first preset interface is not started, sending test error information to a first test tool;
and S106, if the starting of the called first preset interface is detected, executing the step of generating the test script according to the test parameters and the called preset interface.
According to the method and the device, before the second testing tool generates the testing script, the second testing tool detects the state of the called first preset interface determined by the first testing tool, then the second testing tool can determine whether the called first preset interface is started or not, when the second testing tool detects that the called first preset interface is started, the second testing tool determines that the testing script can be generated according to the testing data and the script data packet of the first preset interface, then the testing script is generated according to the testing parameters and the called preset interface, and the step of generating the testing script is executed.
According to the method and the device for automatically generating the test script, the second test tool can accurately determine whether the corresponding test script can be generated or not by detecting the starting state of the called first preset interface, so that the test script can be accurately and automatically generated, the accuracy of automatically generating the test script is improved, and the test efficiency is improved.
Further, the embodiment of the application may further include the following steps:
and S107, sending test error information to the first test tool under the condition that the called default first interface lacks a script data packet.
S108, if the fact that the script data packet exists in the called first preset interface is detected, executing the step of generating the test script according to the test parameters and the called preset interface.
In the embodiment of the application, under the condition that the second testing tool determines that the called first preset interface is started, the second testing tool detects whether a script data packet exists in the called first preset interface, further, the second testing tool determines whether the first preset interface can execute a corresponding action, when the second testing tool determines that the script data packet exists in the called first preset interface, the second testing tool determines that the called first preset interface can execute the corresponding action, further, the second testing tool determines that the script data packet in the called first preset interface can be generated according to the testing parameters, and the test script can be executed, and meanwhile, the testing script can be determined, so that the step of generating the test script according to the testing parameters and the called preset interface is executed.
According to the method and the device for generating the test script, the second test tool detects whether the script data packet exists in the called first preset interface or not, and whether the test script can be generated according to the test parameters and the script data packet of the called first preset interface or not, so that the test script can be accurately and automatically generated, the accuracy of automatically generating the test script is improved, and the test efficiency is improved.
Further, the embodiment of the application provides a testing method applied to a client to be tested, wherein the client to be tested is in communication connection with a first testing tool, and when the client to be tested is tested, the first testing tool deploys a second testing tool on the client to be tested, and specific steps are as shown in fig. 2, including:
s201, receiving test parameters sent by a first test tool.
In the embodiment of the application, when a first testing tool determines that a second preset interface of a client to be tested needs to be called according to a test case scene during testing of the client to be tested, the first testing tool sends testing parameters to the client to be tested, wherein the testing parameters of the embodiment of the application are generated by the first testing tool according to the configured test case scene, a plurality of second preset interfaces are packaged in the client to be tested in advance, and the called second preset interfaces are determined by the first testing tool according to the test case scene.
Specifically, the second preset interface in the embodiment of the present application is a reserved interface of the client to be tested, and a script data packet is encapsulated in the second preset interface, where the script data packet is used to implement a specific function, for example, the script data packet of the second preset interface may implement a query function.
S202, executing a script data packet of a called second preset interface based on the test parameters, and generating a second test result.
In this embodiment of the present application, after receiving the test parameter, the client to be tested executes the data of the test parameter by using the second preset interface, so as to test the client to be tested. For example, the test parameter may be data of query sequence numbers 1-100 in the client to be tested, and when the client to be tested is tested, the client to be tested invokes the second preset interface to execute the operation of querying the data of sequence numbers 1-100, thereby generating the second test interface.
S203, sending a second test result to the first test tool.
In the embodiment of the application, after the second test result is determined by executing the corresponding second preset interface on the client to be tested, the client to be tested sends the second test result to the first test tool, so that the test on the client to be tested is completed.
In one example, when the client to be tested sends the second test result to the first test tool, after one test step is finished, one test interface may be sent to the first test tool, or after all test steps are performed, the summarized second test interface may be sent to the first test tool.
According to the embodiment of the application, the client to be tested can be tested by calling the second preset interface through the client to be tested to execute the test operation, so that the performance of the client to be tested is accurately determined, and the test accuracy is provided.
Further, an embodiment of the present application provides a testing method, which is applied to a first testing tool in an automated testing tool, where the automated testing tool includes the first testing tool and a second testing tool, the first testing tool is disposed at a server, and the second testing tool is disposed at a client to be tested when the client to be tested is tested, and specific steps are shown in fig. 3, including:
s301, determining a called preset interface according to the configured test case scene, and generating test parameters.
In the embodiment of the application, when the first test tool tests the client to be tested, the first test tool obtains the configured test case scene, determines the preset interface to be called according to the test case scene, and meanwhile obtains the configured test data to generate the test parameters. Specifically, the preset interfaces in the embodiment of the application include a first preset interface and a second preset interface.
Specifically, the test case scenario in the embodiment of the present application is configured by a plurality of test steps, for example, the test case scenario may include only the overlay C disc file and the test data of the overlay C disc file, or may include a plurality of test steps, where when the first test tool determines that the preset interface needs to be invoked, the first test tool matches, according to the content and the nature of the test step in the test case scenario, the interface that can implement the test step in the client to be tested and/or the second test tool, so as to determine the preset interface that needs to be invoked.
S302, sending test parameters to a second test tool and/or a client to be tested.
In this embodiment, after the first test tool determines the invoked preset interface according to the test case scenario, the first test tool sends test parameters to the second test tool when the invoked preset interface includes the first preset interface, the first test tool sends test parameters to the client to be tested when the invoked preset interface includes the second preset interface, and the first test tool sends test parameters to the second test tool and the client to be tested when the invoked preset interface includes the first preset interface and the second preset interface.
S303, sending a test instruction to the second test tool and/or the client to be tested.
In this embodiment, after a first test tool sends test parameters to a second test tool, when the first test tool performs a test, the first test tool sends test instructions to the second test tool, after receiving the test instructions, the second test tool sequentially executes generated test scripts, after the first test tool sends test parameters to a client to be tested, when the first test tool performs a test, the first test tool sends test instructions to the client to be tested, after receiving the test instructions, the client to be tested performs a test, after the first test tool sends test parameters to the second test tool and the client to be tested, when the first test tool performs a test, the first test tool sends test instructions to the second test tool and the client to be tested.
S304, receiving a first test result sent by the second test tool and/or a second test result sent by the client to be tested.
In this embodiment, after a second test tool receives a test instruction, the second test tool sequentially executes the generated test script to generate a first test result, and sends the first test result to the first test tool, when a client to be tested receives the test instruction, the client to be tested sequentially executes the test and sends the second test result to the first test tool, when both the second test tool and the client to be tested receive the test instruction, the second test tool first executes the generated test script to generate the first test result, and sends the first test result to the first test tool, and after the second test tool completes execution, the client to be tested sequentially executes the test to generate the second test result, and sends the second test result to the first test tool, thereby completing the test of the client to be tested.
According to the method and the device for testing the test script, the first testing tool is used for determining the preset interface to be called, the second testing tool can be used for automatically generating the test script, the efficiency and the accuracy of generating the test script are improved, meanwhile, the difficulty in writing the automatic test case can be reduced, the script capability requirement on a tester in the scene writing process of the test case is reduced, and the testing efficiency is improved.
Further, another test method is provided in the embodiments of the present application, and specific steps are shown in fig. 4, including:
when the client to be tested is connected to the server, a first testing tool located in the server deploys a second testing tool to the client to be tested, wherein a plurality of first preset interfaces are pre-packaged in the second testing tool, and a plurality of second preset interfaces are pre-packaged in the client to be tested.
After the first test tool detects the configured test case scene, the first test tool determines a preset interface to be called, when the called preset interface comprises the first preset interface, the first test tool sends test parameters determined according to the test case scene to the second test tool, and when the called preset interface comprises the second preset interface, the first test tool sends the test parameters determined according to the test case scene to the client to be tested.
After the second testing tool receives the testing parameters and determines the first preset interface to be called, the second testing tool detects whether the first preset interface to be called is started, when the second testing tool detects that the first preset interface to be called is started, the second testing tool detects whether a script data packet exists in the first preset interface to be called, and when the second testing tool detects that the script data packet exists in the first preset interface to be called, the second testing tool generates a testing script according to the testing parameters and the script data packet in the first preset interface.
The first test tool sends a test instruction to the second test tool and/or the client to be tested, after the second test tool receives the test instruction, the second test tool executes the generated test script to generate a first test result, the first test result is sent to the first test tool, and the first test tool receives the first test result.
After the client to be tested receives the test instruction, the client to be tested executes corresponding test based on the test parameters to generate a second test result, the second test result is sent to the first test tool, and the first test tool receives the second test result.
Further, an embodiment of the present application provides a testing device, which is applied to a second testing tool in an automated testing tool, where the automated testing tool includes a first testing tool and a second testing tool, the first testing tool is disposed at a server, and the second testing tool is disposed at a client to be tested when the client to be tested is tested, as shown in fig. 5, the device includes:
a receiving module 501, configured to receive a test parameter sent by a first test tool, where the test parameter is generated by the first test tool according to a configured test case scenario;
the generating module 502 is configured to generate a test script according to the test parameter and the invoked first preset interface, where the first preset interface is pre-packaged for the second test tool and determined according to a test case scenario;
an execution module 503, configured to receive a test instruction sent by a first test tool, and execute a test script according to the test instruction, so as to generate a first test result;
a sending module 504, configured to send the first test result to the first test tool.
Further, an embodiment of the present application provides a testing device, which is applied to a first testing tool in an automated testing tool, where the automated testing tool includes the first testing tool and a second testing tool, the first testing tool is disposed at a server, and the second testing tool is disposed at a client to be tested when the client to be tested is tested, as shown in fig. 6, the device includes:
The determining module 601 is configured to determine a called preset interface according to a configured test case scenario, and generate a test parameter, where the preset interface includes a first preset interface and a second preset interface;
a first sending module 602, configured to send test parameters to a second testing tool and/or a client to be tested;
a second sending module 603, configured to send a test instruction to a second testing tool and/or a client to be tested;
and the receiving module 604 is configured to receive the first test result sent by the second test tool and/or the second test result sent by the client to be tested.
The testing device of the present embodiment is configured to implement the corresponding testing method in the foregoing multiple method embodiments, and has the beneficial effects of the corresponding method embodiments, which are not described herein again. In addition, the functional implementation of each module in the testing device of the present embodiment may refer to the description of the corresponding parts in the foregoing method embodiments, which is not repeated herein.
Further, as shown in fig. 7, the test system includes a to-be-tested client and an automated test tool, where the automated test tool includes a first test tool and a second test tool, the first test tool is deployed at a server, and when the to-be-tested client and the automated test tool establish communication connection, the first test tool deploys the second test tool at the to-be-tested client. Specifically, the client to be tested is pre-packaged with a plurality of second preset interfaces, and the second test tool is pre-packaged with a plurality of first preset interfaces, where the first preset interfaces or the second preset interfaces may implement the following functions, including but not limited to: modifying rediss, modifying databases, modifying cache files, modifying test data, and restarting clients.
Referring to fig. 8, a schematic structural diagram of an electronic device according to an embodiment of the present application is shown, and the specific embodiment of the present application is not limited to a specific implementation of the electronic device.
As shown in fig. 8, the electronic device may include: a processor (processor) 802, a communication interface (Communications Interface) 804, a memory (memory) 806, and a communication bus 808.
Wherein:
processor 802, communication interface 804, and memory 806 communicate with each other via a communication bus 808.
A communication interface 804 for communicating with other electronic devices or servers.
The processor 802 is configured to execute the program 810, and may specifically perform relevant steps in the test method embodiment described above.
In particular, program 810 may include program code including computer operating instructions.
The processor 802 may be a central processing unit CPU, or a specific integrated circuit ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement embodiments of the present application. The one or more processors comprised by the smart device may be the same type of processor, such as one or more CPUs; but may also be different types of processors such as one or more CPUs and one or more ASICs.
Memory 806 for storing a program 810. Memory 506 may comprise high-speed RAM memory or may also include non-volatile memory (non-volatile memory), such as at least one disk memory.
The program 810 may be specifically operable to cause the processor 802 to:
in an alternative implementation manner, the program 810 is further configured to enable the specific implementation of each step of the processor 802 in the program 810 to refer to corresponding steps and corresponding descriptions in units in the foregoing test method embodiment, which are not described herein in detail. It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the apparatus and modules described above may refer to corresponding procedure descriptions in the foregoing method embodiments, which are not repeated herein.
Embodiments of the present application also provide a computer program product comprising computer instructions that instruct a computing device to perform operations corresponding to any one of the test methods in the method embodiments described above.
It should be noted that, according to implementation requirements, each component/step described in the embodiments of the present application may be split into more components/steps, and two or more components/steps or part of operations of the components/steps may be combined into new components/steps, so as to achieve the purposes of the embodiments of the present application.
The above-described methods according to embodiments of the present application may be implemented in hardware, firmware, or as software or computer code storable in a recording medium such as a CD ROM, RAM, floppy disk, hard disk, or magneto-optical disk, or as computer code originally stored in a remote recording medium or a non-transitory machine-readable medium and to be stored in a local recording medium downloaded through a network, so that the methods described herein may be stored on such software processes on a recording medium using a general purpose computer, special purpose processor, or programmable or special purpose hardware such as an ASIC or FPGA. It is understood that a computer, processor, microprocessor controller, or programmable hardware includes a memory component (e.g., RAM, ROM, flash memory, etc.) that can store or receive software or computer code that, when accessed and executed by the computer, processor, or hardware, implements the methods of generating the check code described herein. Further, when the general-purpose computer accesses code for implementing the check code generation method shown herein, execution of the code converts the general-purpose computer into a special-purpose computer for executing the check code generation method shown herein.
Those of ordinary skill in the art will appreciate that the elements and method steps of the examples described in connection with the embodiments disclosed herein can be implemented as electronic hardware, or as a combination of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the embodiments of the present application.
The above embodiments are only for illustrating the embodiments of the present application, but not for limiting the embodiments of the present application, and various changes and modifications can be made by one skilled in the relevant art without departing from the spirit and scope of the embodiments of the present application, so that all equivalent technical solutions also fall within the scope of the embodiments of the present application, and the scope of the embodiments of the present application should be defined by the claims.

Claims (10)

1. A test method applied to a second test tool in an automated test tool, wherein the automated test tool includes a first test tool and the second test tool, the first test tool is deployed at a server, the second test tool is deployed at a client to be tested when testing the client to be tested, the method includes:
Receiving test parameters sent by the first test tool, wherein the test parameters are generated by the first test tool according to a configured test case scene;
generating a test script according to the test parameters and the called first preset interface, wherein the first preset interface is pre-packaged for the second test tool and is determined according to the test case scene;
receiving a test instruction sent by the first test tool, executing the test script according to the test instruction, and generating a first test result;
and sending the first test result to the first test tool.
2. The method of claim 1, wherein the test parameters comprise test data;
the generating a test script according to the test parameters and the called first preset interface includes:
acquiring a script data packet of the called first preset interface;
and generating the test script according to the script data packet and the test data.
3. The method of claim 1, wherein prior to generating a test script based on the test parameters and the invoked preset interface, the method further comprises:
Under the condition that the called first preset interface is not started, sending test error information to the first test tool;
and if the first preset interface is detected to be started, executing the step of generating a test script according to the test parameters and the called preset interface.
4. A method according to claim 3, characterized in that the method further comprises:
transmitting test error information to the first test tool under the condition that the called preset first interface lacks a script data packet;
and if the fact that the called first preset interface has the script data packet is detected, executing the step of generating the test script according to the test parameters and the called preset interface.
5. A test method applied to a client to be tested, the method comprising:
receiving test parameters sent by a first test tool, wherein the test parameters are generated by the first test tool according to a configured test case scene;
executing a script data packet of a called second preset interface based on the test parameters to generate a second test result, wherein a plurality of second preset interfaces are pre-packaged in the client to be tested, and the called second preset interfaces are determined by the first test tool according to the test case scene;
And sending the second test result to the first test tool.
6. The test method is applied to a first test tool in an automatic test tool, and is characterized in that the automatic test tool comprises the first test tool and a second test tool, wherein the first test tool is arranged at a server side, and the second test tool is deployed at a client to be tested when the client to be tested is tested, and the method comprises the following steps:
determining a called preset interface according to a configured test case scene, and generating test parameters, wherein the preset interface comprises a first preset interface and a second preset interface;
sending the test parameters to the second test tool and/or the client to be tested;
sending a test instruction to the second test tool and/or the client to be tested;
and receiving a first test result sent by the second test tool and/or a second test result sent by the client to be tested.
7. A test device applied to a second test tool in an automated test tool, wherein the automated test tool comprises a first test tool and the second test tool, wherein the first test tool is deployed at a server side, the second test tool is deployed at a client to be tested when the client to be tested is tested, and the device comprises:
The receiving module is used for receiving the test parameters sent by the first test tool, wherein the test parameters are generated by the first test tool according to the configured test case scene;
the generation module is used for generating a test script according to the test parameters and the called first preset interface, wherein the first preset interface is pre-packaged for the second test tool and is determined according to the test case scene;
the execution module is used for receiving the test instruction sent by the first test tool, executing the test script according to the test instruction and generating a first test result;
and the sending module is used for sending the first test result to the first test tool.
8. A test device applied to a first test tool in an automated test tool, wherein the automated test tool comprises the first test tool and a second test tool, the first test tool is arranged at a server end, the second test tool is deployed at a client to be tested when the client to be tested is tested, and the device comprises:
the determining module is used for determining a called preset interface according to the configured test case scene and generating test parameters, wherein the preset interface comprises a first preset interface and a second preset interface;
The first sending module is used for sending the test parameters to the second test tool and/or the client to be tested;
the second sending module is used for sending a test instruction to the second test tool and/or the client to be tested;
and the receiving module is used for receiving the first test result sent by the second test tool and/or the second test result sent by the client to be tested.
9. An electronic device, comprising: the device comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete communication with each other through the communication bus;
the memory is configured to store at least one executable instruction that causes the processor to perform operations corresponding to the test method according to any one of claims 1-6.
10. A computer storage medium having stored thereon a computer program which when executed by a processor implements the test method according to any of claims 1-6.
CN202311756380.7A 2023-12-20 2023-12-20 Test method, test device, electronic equipment and computer storage medium Pending CN117687926A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311756380.7A CN117687926A (en) 2023-12-20 2023-12-20 Test method, test device, electronic equipment and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311756380.7A CN117687926A (en) 2023-12-20 2023-12-20 Test method, test device, electronic equipment and computer storage medium

Publications (1)

Publication Number Publication Date
CN117687926A true CN117687926A (en) 2024-03-12

Family

ID=90135137

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311756380.7A Pending CN117687926A (en) 2023-12-20 2023-12-20 Test method, test device, electronic equipment and computer storage medium

Country Status (1)

Country Link
CN (1) CN117687926A (en)

Similar Documents

Publication Publication Date Title
US8806442B2 (en) Remote debugging proxy
US7296190B2 (en) Parallel text execution on low-end emulators and devices
CN110647490B (en) Data transmission method, device, equipment and computer storage medium
CN111611021A (en) Log data transmission method and device, computer equipment and storage medium
CN110601915A (en) Method and device for testing gateway device
CN112953983A (en) SFTP transmission method and device
CN110474959A (en) Data interactive method, device, computer equipment and storage medium
CN114237498A (en) Snapshot generation method and system for cloud native storage data volume
CN111934953A (en) Batch testing method based on domestic processor computer platform
CN112699034B (en) Virtual login user construction method, device, equipment and storage medium
CN112118159B (en) Network testing method, device, equipment and computer readable storage medium
CN112650689A (en) Test method, test device, electronic equipment and storage medium
CN109960657B (en) Test environment deployment method and related device
CN117687926A (en) Test method, test device, electronic equipment and computer storage medium
CN114490746B (en) Equipment testing method and device, equipment to be tested and storage medium
CN113656322B (en) Data processing method, device, electronic equipment and computer storage medium
CN110737549A (en) Application testing method, device, server and system
CN114385493A (en) Performance test method and device, electronic equipment and storage medium
CN109639525B (en) Network interface detection method based on homemade operating system
CN111782291A (en) Test page starting method and device
CN106155961B (en) The method and device of parameter is passed to kernel based on BootLoader
CN110740134A (en) URL authentication test method, device, equipment and medium
CN115361327B (en) Method, device, terminal and medium for automatically testing NCSI command of network card
CN113868030B (en) CPU test tool self-adaptive matching method, system, terminal and storage medium
CN117762817A (en) Automatic test method, equipment and medium for distributed storage system

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