CN117076298A - Automatic test script generation method, device, jig and medium - Google Patents

Automatic test script generation method, device, jig and medium Download PDF

Info

Publication number
CN117076298A
CN117076298A CN202311001688.0A CN202311001688A CN117076298A CN 117076298 A CN117076298 A CN 117076298A CN 202311001688 A CN202311001688 A CN 202311001688A CN 117076298 A CN117076298 A CN 117076298A
Authority
CN
China
Prior art keywords
target
manual operation
operation information
jig
corresponding relation
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
CN202311001688.0A
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.)
Dongguan Yiyun Information System Co ltd
Original Assignee
Dongguan Yiyun Information System Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Dongguan Yiyun Information System Co ltd filed Critical Dongguan Yiyun Information System Co ltd
Priority to CN202311001688.0A priority Critical patent/CN117076298A/en
Publication of CN117076298A publication Critical patent/CN117076298A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3692Test management for test results analysis

Abstract

The application discloses a method, a device, a jig and a medium for generating an automatic test script, wherein the method is applied to the jig, and in the recording stage of the jig, the jig is respectively connected with manual operation equipment and standard tested equipment, and the method comprises the following steps: when target manual operation information input by manual operation equipment is received, adding the target manual operation information into a manual operation information sequence; transmitting the target manual operation information to standard tested equipment; receiving target response information fed back by standard tested equipment based on target manual operation information; constructing a target sub-corresponding relation between the target manual operation information and the target response information, and adding the target sub-corresponding relation into the target corresponding relation; and generating an automatic test script according to the manual operation information sequence and the target corresponding relation. By implementing the method provided by the embodiment of the application, the automatic test script can be automatically generated, and the intelligence of the automatic test development of the jig is improved.

Description

Automatic test script generation method, device, jig and medium
Technical Field
The present application relates to the field of automated testing technologies, and in particular, to a method, an apparatus, a jig, and a medium for generating an automated test script.
Background
At present, in research and development tests of a server, various functional test items are many, repeated tests are carried out on the same function at different stages, the test work can take a lot of manpower and time, at present, development of various automatic tests is carried out in a pre-programming mode, the intelligence of the automatic test development is low, and a method capable of automatically generating an automatic test script is needed.
Disclosure of Invention
The embodiment of the application provides a method, a device, a jig and a medium for generating an automatic test script, which can automatically generate the automatic test script.
In a first aspect, an embodiment of the present application provides a method for generating an automated test script, where the method is applied to a fixture, and in a recording stage of the fixture, the fixture is connected to a manual operation device and a standard tested device, respectively, where the method includes:
in the recording stage, when target manual operation information input by the manual operation equipment is received, adding the target manual operation information into a manual operation information sequence, wherein the manual operation information sequence comprises at least one piece of manual operation information received in the recording stage, and at least one piece of manual operation information is arranged according to the sequence of reception;
transmitting the target manual operation information to the standard tested equipment;
receiving target response information fed back by the standard tested equipment based on the target manual operation information;
constructing a target sub-corresponding relation between the target manual operation information and the target response information, and adding the target sub-corresponding relation into a target corresponding relation, wherein the target corresponding relation comprises the corresponding relation between each manual operation information and the response information in the manual operation information sequence;
and when receiving a recording stopping instruction, generating the automatic test script according to the manual operation information sequence and the target corresponding relation.
In a second aspect, an embodiment of the present application further provides a device for generating an automated test script, where the device is applied to a fixture, and in a recording stage of the fixture, the fixture is connected to a manual operation device and a standard tested device, respectively, where the device includes:
the storage unit is used for adding the target manual operation information to a manual operation information sequence when receiving the target manual operation information input by the manual operation equipment in the recording stage, wherein the manual operation information sequence comprises at least one piece of manual operation information received in the recording stage, and at least one piece of manual operation information is arranged according to the sequence of reception;
the sending unit is used for sending the target manual operation information to the standard tested equipment;
the receiving unit is used for receiving target response information fed back by the standard tested equipment based on the target manual operation information;
the construction unit is used for constructing a target sub-corresponding relation between the target manual operation information and the target response information and adding the target sub-corresponding relation into a target corresponding relation, wherein the target corresponding relation comprises the corresponding relation between each manual operation information and the response information in the manual operation information sequence;
and the script generation unit is used for generating the automatic test script according to the manual operation information sequence and the target corresponding relation when receiving the recording stopping instruction.
In a third aspect, an embodiment of the present application further provides a fixture, including a memory, a processor, and a computer program stored in the memory and capable of running on the processor, where the processor implements the method described in the first aspect when executing the computer program.
In a fourth aspect, embodiments of the present application also provide a storage medium storing a computer program comprising program instructions which, when executed by a processor, cause the processor to perform the method of the first aspect described above.
The application discloses a method for generating an automatic test script, which is applied to a jig, wherein in the recording stage of the jig, the jig is respectively connected with manual operation equipment and standard tested equipment, and the method comprises the following steps: in the recording stage, when target manual operation information input by the manual operation equipment is received, adding the target manual operation information into a manual operation information sequence, wherein the manual operation information sequence comprises at least one piece of manual operation information received in the recording stage, and at least one piece of manual operation information is arranged according to the sequence of reception; transmitting the target manual operation information to the standard tested equipment; receiving target response information fed back by the standard tested equipment based on the target manual operation information; constructing a target sub-corresponding relation between the target manual operation information and the target response information, and adding the target sub-corresponding relation into a target corresponding relation, wherein the target corresponding relation comprises the corresponding relation between each manual operation information and the response information in the manual operation information sequence; and when receiving a recording stopping instruction, generating the automatic test script according to the manual operation information sequence and the target corresponding relation. By implementing the method of the embodiment of the application, when a user has the requirement of generating the test script, the jig is respectively connected with the manual operation equipment and the standard tested equipment, and in the recording stage, the jig can store the information input by the manual operation equipment and can store the response information fed back by the standard tested equipment according to the information input by the manual operation equipment, and after the recording is finished, the jig can automatically generate the test script according to the stored signal; in the process of generating the test script, the jig automatically generates the corresponding test script according to the operation information and the operation sequence of the user only by manually standardizing standard operation once, and the user does not need to manually program to generate the corresponding test script, so that the automatic generation of the automatic test script is realized, and the intelligence of the automatic test development of the jig is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for the description of the embodiments will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic diagram of an application scenario of a method for generating an automated test script according to an embodiment of the present application;
FIG. 2 is a schematic flow chart of a method for generating an automated test script according to an embodiment of the present application;
FIG. 3 is a schematic block diagram of an automated test script generation apparatus provided by an embodiment of the present application;
fig. 4 is a schematic block diagram of a fixture according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
It should be understood that the terms "comprises" and "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in the present specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations.
The embodiment of the application provides a method, a device, a jig and a medium for generating an automatic test script. As shown in fig. 1, fig. 1 is an application scenario schematic diagram of a method for generating an automated test script according to an embodiment of the present application, where the method is applied to a jig 20, in a recording stage of the jig 20, the jig 20 is respectively connected with a manual operation device 10 and a standard device under test 30 (where the standard device under test is a qualified device), when recording begins, a user inputs, through the manual operation device 10, target manual operation information, the target manual operation information is sent to the jig 20 first, then the target manual operation information is stored by the jig 20, the target manual operation information is then sent to the standard device under test 30 by the jig 20, the standard device under test 30 processes the target manual operation information to obtain the target response information, the standard device under test 30 sends the target response information to the jig 20, then the jig 20 stores the target response information, and after finishing the recording, the target manual operation information is automatically stored in the jig 20, and then a series of target script information is generated.
In the testing stage of the jig, the jig is connected with a target tested device (wherein the target tested device is a device which is not tested, namely a device waiting for testing), the jig can automatically test the target tested device according to the automatic test script, so that a test result is obtained, and a user can judge whether the target tested device is qualified or not according to the test result.
Fig. 2 is a flow chart of a method for generating an automated test script according to an embodiment of the present application. As shown in fig. 2, the method includes the following steps S110 to S150.
And S110, in the recording stage, when receiving the target manual operation information input by the manual operation equipment, adding the target manual operation information into a manual operation information sequence.
The manual operation information sequence comprises at least one piece of manual operation information received in the recording stage, and at least one piece of manual operation information is arranged according to the receiving sequence.
In this embodiment, in the script recording stage, the jig stores the target manual operation information input by the user through the manual operation device, stores the target manual operation information into the manual operation information sequence, after the recording stage is finished, stores at least one piece of manual operation information input by the user through the manual operation device in the whole recording stage in the manual operation information sequence, and at least one piece of manual operation information is arranged according to the received sequence.
In an embodiment, the manual operation device includes a keyboard, a mouse, and a power switch, and the target manual operation information includes keyboard operation information, mouse operation information, or power switch information.
In this embodiment, the jig is connected to the keyboard, the mouse and the power supply, the power supply includes the power switch, the keyboard operation information is generated when the user operates the keyboard, the mouse operation information is generated when the user operates the mouse, the power switch information is generated when the user operates the power switch (connects the power supply or disconnects the power supply), wherein the power switch information includes that the jig is connected to the power supply or that the jig is disconnected from the power supply; the keyboard operation information, the mouse operation information or the power switch information are sent to the jig first and stored by the jig.
And S120, the target manual operation information is sent to the standard tested equipment.
In this embodiment, after the fixture stores the target manual operation information into the manual operation information sequence, the fixture further sends the target manual operation information to the standard device under test, so that the target manual operation information can instruct the standard device under test to perform testing according to the target manual operation information.
S130, receiving target response information fed back by the standard tested equipment based on the target manual operation information.
In this embodiment, after the standard tested device tests according to the target manual operation information, a test result is obtained, and the target response information is obtained; and then the standard tested equipment feeds the target response information back to the jig, and the jig receives the target response information.
In an embodiment, the fixture is connected to a universal serial bus (Universal Serial Bus, USB) interface, a video graphics array (Video Graphics Array, VGA) interface, and a power interface of the standard device under test, respectively.
In this embodiment, the interfaces of the standard device under test include the USB interface, the VGA interface, and the power interface, where the USB interface, the VGA interface, and the power interface are all connected to the jig; the standard tested equipment can receive the keyboard operation information or the mouse operation information sent by the jig through the USB interface; the standard tested equipment can send the target response information to the jig through the VGA interface; the standard tested equipment can be indirectly connected with a power supply from the jig through the power supply interface.
In an embodiment, when the target manual operation information is the keyboard operation information, the mouse operation information, or the power switch information, the sending the target manual operation information to the standard device under test includes:
when the target manual operation information is keyboard operation information or mouse operation information, the target manual operation information is sent to the USB interface;
and when the target manual operation information is the power switch information, the target manual operation information is sent to the power interface.
In this embodiment, when the target manual operation information received by the jig is the keyboard operation information, the jig stores the keyboard operation information first, and then the jig sends the keyboard operation information to the USB interface, so that the standard device under test performs a corresponding test according to the keyboard operation information.
When the target manual operation information received by the jig is the mouse operation information, the jig stores the mouse operation information first, and then the jig sends the mouse operation information to the USB interface, so that the standard tested equipment performs corresponding test according to the mouse operation information.
When the target manual operation information received by the jig is the power switch information, the jig stores the power switch information first, and then the jig sends the power switch information to the power interface, so that the standard tested equipment controls the power interface to be connected with or disconnected from a power supply according to the power switch information.
In an embodiment, after the standard tested device performs corresponding test according to the target manual operation information to obtain target response information, the standard tested device sends the target response information to the jig, and at this time, the receiving the target response information fed back by the standard tested device based on the target manual operation information includes:
and receiving the target response information fed back by the standard tested equipment through the VGA interface.
In this embodiment, after the standard tested device performs corresponding test according to the target manual operation information to obtain target response information, the standard tested device may send the target response information to the jig through the VGA interface, and the jig may receive the target response information fed back by the standard tested device through the VGA interface.
S140, constructing a target sub-corresponding relation between the target manual operation information and the target response information, and adding the target sub-corresponding relation into the target corresponding relation.
The target corresponding relation comprises the corresponding relation between each piece of manual operation information and response information in the manual operation information sequence.
In this embodiment, after receiving the target response information, the jig constructs a relationship between the target manual operation information and the target response information, so as to obtain a target sub-correspondence between the target manual operation information and the target response information, and stores the target sub-correspondence in the target correspondence, where after the recording stage is finished, all the correspondences between the manual operation information and the response information in the whole recording stage are stored in the target correspondence.
And S150, when a recording stopping instruction is received, generating the automatic test script according to the manual operation information sequence and the target corresponding relation.
In this embodiment, when the tool receives the instruction for stopping recording, the tool processes all the manual operation information stored in the manual operation information sequence and all the corresponding relations between the manual operation information and the response information stored in the target corresponding relation in the recording stage to generate the automated test script; according to the scheme, when a user needs to generate a test script, the jig is respectively connected with the manual operation equipment and the standard tested equipment, and in the recording stage, the jig can store information input by the manual operation equipment and can store response information fed back by the standard tested equipment according to the information input by the manual operation equipment, and after recording is finished, the jig can automatically generate the test script according to the stored signals; in the process of generating the test script, the jig automatically generates the corresponding test script according to the operation information and the operation sequence of the user only by manually standardizing standard operation once, and the user does not need to manually program to generate the corresponding test script, so that the automatic generation of the automatic test script is realized, and the intelligence of the automatic test development of the jig is improved.
In an embodiment, after the automatic test script is generated, the device to be tested may be tested by using the automatic test script, and at this time, in a test stage of the jig, the jig is connected to a target device to be tested, and after the automatic test script is generated according to the manual operation information sequence and the target correspondence, the method further includes:
and automatically testing the target tested equipment according to the automatic test script to obtain a test result.
In this embodiment, since the automated test script is generated by storing, by the tool, information in the manual operation information sequence and the target correspondence in the recording stage, in the test stage, the tool simulates the manual operation information of the manual operation information sequence according to the automated test script, then sends the manual operation information to the target device under test, then the target device under test tests according to the manual operation information to obtain the response information, then the target device under test feeds back the response information to the tool, and the tool constructs the correspondence according to the manual operation information and the response information, and then compares the correspondence with the target correspondence to obtain the test result.
In an embodiment, after the test result is obtained by the fixture, the test result may be sent to a display device, and the test result is observed by a user through the display device, where the automatic test is performed on the target device under test according to the automatic test script, and after the test result is obtained, the method further includes:
and sending the test result to a display device.
In this embodiment, after the test result is obtained by the fixture, the test result is sent to the display device, the display device performs visual display on the test result, and the user observes the automated test result of the target tested device through the display device.
By implementing the method of the embodiment of the application, when a user has the requirement of generating the test script, the jig is respectively connected with the manual operation equipment and the standard tested equipment, and in the recording stage, the jig can store the information input by the manual operation equipment and can store the response information fed back by the standard tested equipment according to the information input by the manual operation equipment, and after the recording is finished, the jig can automatically generate the test script according to the stored signal; in the process of generating the test script, the jig automatically generates the corresponding test script according to the operation information and the operation sequence of the user only by manually standardizing standard operation once, and the user does not need to manually program to generate the corresponding test script, so that the automatic generation of the automatic test script is realized, and the intelligence of the automatic test development of the jig is improved.
Fig. 3 is a schematic block diagram of an apparatus for generating an automated test script according to an embodiment of the present application. As shown in fig. 3, the present application further provides an apparatus 300 for generating an automated test script, corresponding to the above method for generating an automated test script. The device is applied to the tool, in the recording stage of tool, the tool is connected with manual operation equipment and standard equipment of being tested respectively, the device includes:
a storage unit 310, configured to, in the recording stage, add, when target manual operation information input by the manual operation device is received, the target manual operation information to a manual operation information sequence, where the manual operation information sequence includes at least one piece of manual operation information received in the recording stage, and at least one piece of manual operation information is arranged according to a received sequence;
a sending unit 320, configured to send the target manual operation information to the standard device under test;
a receiving unit 330, configured to receive target response information fed back by the standard device under test based on the target manual operation information;
a construction unit 340, configured to construct a target sub-correspondence between the target manual operation information and the target response information, and add the target sub-correspondence to a target correspondence, where the target correspondence includes a correspondence between each manual operation information and response information in the manual operation information sequence;
and the script generating unit 350 is configured to generate the automated test script according to the manual operation information sequence and the target correspondence when receiving the recording stopping instruction.
In some embodiments, the manually operated device includes a keyboard, a mouse, and a power switch, and the target manually operated information includes keyboard operation information, mouse operation information, or power switch information.
In some embodiments, the fixture is connected to a USB interface, a VGA interface, and a power interface of the standard device under test, respectively.
In some embodiments, the sending unit 320 is specifically configured to:
when the target manual operation information is keyboard operation information or mouse operation information, the target manual operation information is sent to the USB interface;
and when the target manual operation information is the power switch information, the target manual operation information is sent to the power interface.
In some embodiments, the receiving unit 330 is specifically configured to:
and receiving the target response information fed back by the standard tested equipment through the VGA interface.
In some embodiments, in the testing stage of the fixture, the fixture is connected to a target device under test, and the script generating unit 350 further includes, after performing the step of generating the automated test script according to the manual operation information sequence and the target correspondence, the automated test script generating apparatus 300:
and the test unit is used for automatically testing the target tested equipment according to the automatic test script to obtain a test result.
In some embodiments, after the step of performing the automated test on the target device under test according to the automated test script to obtain a test result, the sending unit 320 is further configured to: and sending the test result to a display device.
By implementing the automatic test script generation device provided by the embodiment of the application, when a user has a requirement for generating the test script, the jig is respectively connected with the manual operation equipment and the standard tested equipment, and in the recording stage, the jig can store information input by the manual operation equipment and can store response information fed back by the standard tested equipment according to the information input by the manual operation equipment, and after recording is finished, the jig can automatically generate the test script according to the stored signals; in the process of generating the test script, the jig automatically generates the corresponding test script according to the operation information and the operation sequence of the user only by manually standardizing standard operation once, and the user does not need to manually program to generate the corresponding test script, so that the automatic generation of the automatic test script is realized, and the intelligence of the automatic test development of the jig is improved.
It should be noted that, as a person skilled in the art can clearly understand, the specific implementation process of the automatic test script generating device may refer to the corresponding description in the foregoing method embodiment, and for convenience and brevity of description, the description is omitted herein.
An automated test script generating apparatus may be implemented in the form of a computer program that may be run on a jig as shown in fig. 4.
Referring to fig. 4, fig. 4 is a schematic block diagram of a fixture according to an embodiment of the application. The jig 400 may be a jig in an automated test script generating apparatus in the above-described automated test script generating method.
Referring to fig. 4, the jig 400 includes a processor 402, a memory, and a network interface 405 connected through a system bus 401, wherein the memory may include a nonvolatile storage medium 403 and an internal memory 404.
The non-volatile storage medium 403 may store an operating system 4031 and a computer program 4032. The computer program 4032 includes program instructions that, when executed, cause the processor 402 to perform a method of automated test script generation.
The processor 402 is used to provide computing and control capabilities to support the operation of the overall jig 400.
The internal memory 404 provides an environment for the execution of a computer program 4032 in the non-volatile storage medium 403, which computer program 4032, when executed by the processor 402, causes the processor 402 to perform a method of automated test script generation.
The network interface 405 is used for network communication with other devices. It will be appreciated by those skilled in the art that the structure shown in fig. 4 is merely a block diagram of a portion of the structure associated with the present inventive arrangements and is not limiting of the jig 400 to which the present inventive arrangements are applied, and that a particular jig 400 may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
It should be appreciated that in embodiments of the present application, the processor 402 may be a central processing unit (Central Processing Unit, CPU), the processor 402 may also be other general purpose processors, digital signal processors (Digital Signal Processor, DSPs), application specific integrated circuits (Application Specific Integrated Circuit, ASICs), off-the-shelf programmable gate arrays (Field-Programmable Gate Array, FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. Wherein the general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
Those skilled in the art will appreciate that all or part of the flow in a method embodying the above described embodiments may be accomplished by computer programs instructing the relevant hardware. The computer program comprises program instructions, and the computer program can be stored in a storage medium, which is a computer readable storage medium. The program instructions are executed by at least one processor in the computer system to implement the flow steps of the embodiments of the method described above.
Accordingly, the present application also provides a storage medium. The storage medium may be a computer readable storage medium. The storage medium stores a computer program, wherein the computer program includes program instructions. The program instructions, when executed by a processor, cause the processor to implement the flow steps of the embodiments of the method described above.
The storage medium may be a U-disk, a removable hard disk, a Read-Only Memory (ROM), a magnetic disk, or an optical disk, or other various computer-readable storage media that can store program codes.
Those of ordinary skill in the art will appreciate that the elements and algorithm steps described in connection with the embodiments disclosed herein may be embodied in electronic hardware, in computer software, or in a combination of the two, and that the elements and steps of the examples have been generally described in terms of function in the foregoing description to clearly illustrate the interchangeability of hardware and software. 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 present application.
In the several embodiments provided by the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the device embodiments described above are merely illustrative. For example, the division of each unit is only one logic function division, and there may be another division manner in actual implementation. For example, multiple units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed.
The steps in the method of the embodiment of the application can be sequentially adjusted, combined and deleted according to actual needs. The units in the device of the embodiment of the application can be combined, divided and deleted according to actual needs. In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit.
The integrated unit may be stored in a storage medium if implemented in the form of a software functional unit and sold or used as a stand-alone product. Based on such understanding, the technical solution of the present application is essentially or a part contributing to the prior art, or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a terminal, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present application.
While the application has been described with reference to certain preferred embodiments, it will be understood by those skilled in the art that various changes and substitutions of equivalents may be made and equivalents will be apparent to those skilled in the art without departing from the scope of the application. Therefore, the protection scope of the application is subject to the protection scope of the claims.

Claims (10)

1. The method for generating the automatic test script is characterized by being applied to a jig, wherein the jig is respectively connected with manual operation equipment and standard tested equipment in a recording stage of the jig, and the method comprises the following steps of:
in the recording stage, when target manual operation information input by the manual operation equipment is received, adding the target manual operation information into a manual operation information sequence, wherein the manual operation information sequence comprises at least one piece of manual operation information received in the recording stage, and at least one piece of manual operation information is arranged according to the sequence of reception;
transmitting the target manual operation information to the standard tested equipment;
receiving target response information fed back by the standard tested equipment based on the target manual operation information;
constructing a target sub-corresponding relation between the target manual operation information and the target response information, and adding the target sub-corresponding relation into a target corresponding relation, wherein the target corresponding relation comprises the corresponding relation between each manual operation information and the response information in the manual operation information sequence;
and when receiving a recording stopping instruction, generating the automatic test script according to the manual operation information sequence and the target corresponding relation.
2. The method of claim 1, wherein the manually operated device comprises a keyboard, a mouse, and a power switch, and the target manually operated information comprises keyboard operation information, mouse operation information, or power switch information.
3. The method of claim 2, wherein the jig is connected to a USB interface, a VGA interface, and a power interface of the standard device under test, respectively.
4. A method according to claim 3, wherein said transmitting said target manual operation information to said standard device under test comprises:
when the target manual operation information is keyboard operation information or mouse operation information, the target manual operation information is sent to the USB interface;
and when the target manual operation information is the power switch information, the target manual operation information is sent to the power interface.
5. A method according to claim 3, wherein said receiving target response information fed back by said standard device under test based on said target manual operation information comprises:
and receiving the target response information fed back by the standard tested equipment through the VGA interface.
6. The method according to any one of claims 1 to 5, wherein in a testing phase of the jig, the jig is connected to a target device under test, and after the automated test script is generated according to the sequence of manual operation information and the target correspondence, the method further comprises:
and automatically testing the target tested equipment according to the automatic test script to obtain a test result.
7. The method of claim 5, wherein the automated testing of the target device under test according to the automated test script results in a test result, the method further comprising:
and sending the test result to a display device.
8. An automated test script generating device, wherein the device is applied to a jig, and in a recording stage of the jig, the jig is respectively connected with a manual operation device and a standard tested device, and the device comprises:
the storage unit is used for adding the target manual operation information to a manual operation information sequence when receiving the target manual operation information input by the manual operation equipment in the recording stage, wherein the manual operation information sequence comprises at least one piece of manual operation information received in the recording stage, and at least one piece of manual operation information is arranged according to the sequence of reception;
the sending unit is used for sending the target manual operation information to the standard tested equipment;
the receiving unit is used for receiving target response information fed back by the standard tested equipment based on the target manual operation information;
the construction unit is used for constructing a target sub-corresponding relation between the target manual operation information and the target response information and adding the target sub-corresponding relation into a target corresponding relation, wherein the target corresponding relation comprises the corresponding relation between each manual operation information and the response information in the manual operation information sequence;
and the script generation unit is used for generating the automatic test script according to the manual operation information sequence and the target corresponding relation when receiving the recording stopping instruction.
9. A jig comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of any one of claims 1 to 7 when executing the computer program.
10. A storage medium storing a computer program comprising program instructions which, when executed by a processor, cause the processor to perform the method of any one of claims 1-7.
CN202311001688.0A 2023-08-09 2023-08-09 Automatic test script generation method, device, jig and medium Pending CN117076298A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311001688.0A CN117076298A (en) 2023-08-09 2023-08-09 Automatic test script generation method, device, jig and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311001688.0A CN117076298A (en) 2023-08-09 2023-08-09 Automatic test script generation method, device, jig and medium

Publications (1)

Publication Number Publication Date
CN117076298A true CN117076298A (en) 2023-11-17

Family

ID=88701591

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311001688.0A Pending CN117076298A (en) 2023-08-09 2023-08-09 Automatic test script generation method, device, jig and medium

Country Status (1)

Country Link
CN (1) CN117076298A (en)

Similar Documents

Publication Publication Date Title
CN111159049A (en) Automatic interface testing method and system
GB2544568A (en) System, method and non-transitory computer readable medium for software testing
CN111063386A (en) DDR chip testing method and device
CN111984239B (en) Page configuration method, page configuration device, server and storage medium
CN112996020B (en) Bluetooth-based automatic test method and device and Bluetooth test terminal
US11301237B2 (en) Upgrading method and apparatus
CN109086175B (en) Board card testing method and device
CN112015654A (en) Method and apparatus for testing
CN104978276A (en) Method, device and system used for detecting software
CN111338965A (en) Case testing method and device, electronic equipment and storage medium
CN110888800A (en) Service interaction function test method, device, storage medium and test system
CN109002397B (en) Controller smoking test system and test method
CN117076298A (en) Automatic test script generation method, device, jig and medium
CN112817883A (en) Method, device and system for adapting interface platform and computer readable storage medium
CN107562629B (en) Method and device for testing
CN110704307A (en) Application product testing method and device, user equipment and computer storage medium
CN113515447B (en) Automatic testing method and device for system
CN112631931B (en) Version testing method and device, storage medium and electronic equipment
CN114116353A (en) Equipment testing method, device, equipment and storage medium
US20230153229A1 (en) Method of testing performance, electronic device, and computer-readable medium
CN113239119A (en) Data synchronization method, device and storage medium
CN114487758B (en) Test method and test system for semiconductor equipment
CN113225717B (en) Control method and device of Bluetooth equipment and computer readable storage medium
KR102192098B1 (en) Apparatus and method for testing of firing output selection card of excitation system
CN108628750B (en) Test code processing method and device

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