CN116668336A - T-Box automatic test method, device, equipment and storage medium - Google Patents
T-Box automatic test method, device, equipment and storage medium Download PDFInfo
- Publication number
- CN116668336A CN116668336A CN202310617112.0A CN202310617112A CN116668336A CN 116668336 A CN116668336 A CN 116668336A CN 202310617112 A CN202310617112 A CN 202310617112A CN 116668336 A CN116668336 A CN 116668336A
- Authority
- CN
- China
- Prior art keywords
- test
- script
- task
- box
- information
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000010998 test method Methods 0.000 title claims abstract description 19
- 238000012360 testing method Methods 0.000 claims abstract description 238
- 238000013515 script Methods 0.000 claims abstract description 88
- 238000000034 method Methods 0.000 claims abstract description 33
- 238000004590 computer program Methods 0.000 claims description 14
- 230000008569 process Effects 0.000 abstract description 10
- 238000010586 diagram Methods 0.000 description 15
- 230000006870 function Effects 0.000 description 12
- 238000004891 communication Methods 0.000 description 6
- 230000004044 response Effects 0.000 description 5
- 230000003287 optical effect Effects 0.000 description 4
- 238000012545 processing Methods 0.000 description 4
- 230000000644 propagated effect Effects 0.000 description 3
- 238000012356 Product development Methods 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 238000010438 heat treatment Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 239000004065 semiconductor Substances 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 238000012827 research and development Methods 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/08—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
- H04L43/0805—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
- H04L43/0817—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking functioning
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/02—Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
- H04L67/025—Protocols based on web technology, e.g. hypertext transfer protocol [HTTP] for remote control or remote monitoring of applications
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Environmental & Geological Engineering (AREA)
- Debugging And Monitoring (AREA)
- Test And Diagnosis Of Digital Computers (AREA)
Abstract
The application provides a T-Box automatic test method, a device, equipment and a storage medium, wherein the method comprises the following steps: acquiring a remote control instruction and target test information, generating a test script based on the remote control instruction, creating a target test task in a preset test environment according to the target test information, and establishing an association relation between the test task and the test script so as to add the test script into the test task, and executing the test task to obtain a test result so as to realize automatic test of the T-Box; the T-Box end is directly accessed through the script without being circulated through a TSP server, so that an automatic test process from script access to feedback result closed loop can be realized, and the test efficiency is effectively improved.
Description
Technical Field
The application relates to the technical field of automatic testing, in particular to a T-Box automatic testing method, a device, equipment and a storage medium.
Background
As one of the functions, a vehicle-mounted communication Box (T-Box for short) is an important link for realizing the internet of vehicles, from the initial single realization of vehicle information acquisition to the gradual development of various module functions such as vehicle information monitoring and interaction, remote control, system management, configuration information access, power management and the like. The remote control module further comprises more than ten sub-functions of reserved charging, remote trunk opening, remote steering wheel heating, seat heating and the like, and the test scene use cases contained in each sub-function are also tens. In the process of realizing the T-Box function, in order to ensure the quality of products, full-function tests are required to be carried out on each key node, the requirement cannot be met by simple human input, and the automatic test is particularly important.
For example, CN108566323a proposes a method and a system for automated testing of T-Box, which still need to be performed by means of an external physical auxiliary tool to achieve automated closed-loop testing of a real vehicle, and the related test cannot be completed before the product is developed in the product development process, and thus the problem cannot be found and corrected in time in the product development process.
Disclosure of Invention
In view of the above drawbacks, the present application provides a method, apparatus, device and storage medium for automated testing of T-Box, so as to solve the above problems that related testing cannot be completed before the product is developed.
The application provides a T-Box automatic test method, which comprises the following steps: acquiring a remote control instruction and target test information, and generating a test script based on the remote control instruction; and creating a target test task in a preset test environment according to the target test information, and establishing an association relation between the test task and the test script to realize automatic test on the T-Box.
In one embodiment of the present application, before the remote control command and the target test information are obtained, the method further includes building a test environment, where the test environment includes at least two servers.
In one embodiment of the present application, generating a test script based on the remote control instruction includes: determining request information and a resource address based on the remote control instruction; writing the request information and the resource address into script information to generate the test script; the request information comprises a request service type, a request service parameter and request key value pair information; the resource address includes a request protocol, a request server address, a request interface address, a port number, and an authentication value.
In one embodiment of the present application, creating a target test task in a preset test environment according to the target test information includes: creating a blank test task in a preset test environment; adding a test script generated based on the remote control instruction to the blank test task to obtain a target test task; setting the execution sequence of the target test task, wherein the execution sequence comprises parallel connection and series connection.
In one embodiment of the present application, the method includes, before executing the test task to obtain an actual test result: the program-controlled power supply is controlled to electrify the T-Box through the script; and determining the running state of the script control program, wherein the running state comprises normal running and running faults.
In one embodiment of the present application, determining an operating state of a script control program comprises at least one of: adding a system management command in front of the test script to check the starting state of the script control program, wherein the starting state comprises started and non-started, and when the starting state is started, the running state of the script control program is judged to be normal; a delay time is added before the test script.
In one embodiment of the present application, after executing the test task to obtain a test result, the method further includes: determining test assertions of a pre-written script based on the test script; when the test result is the same as the test assertion, the test is successful; and when the test result is different from the test assertion, the test failure is indicated.
The application provides a T-Box automatic testing device, which comprises: the information acquisition module is used for acquiring remote control instructions and target test information and generating test scripts based on the remote control instructions; the task creation module is used for creating a target test task in a preset test environment according to the target test information, and establishing an association relation between the test task and the test script so as to add the test script into the test task; and the test execution module is used for executing the test task to obtain an actual test result so as to realize the automatic test of the T-Box.
The present application provides an electronic device including: one or more processors; and the storage device is used for storing one or more programs, and when the one or more programs are executed by the one or more processors, the electronic equipment realizes the T-Box automatic test method.
The present application provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor of a computer, causes the computer to perform the T-Box automated test method as described above.
The application has the beneficial effects that: according to the T-Box automatic test method, the device, the equipment and the storage medium, the remote control instruction and the target test information are acquired, the test script is generated based on the remote control instruction, the target test task is created in a preset test environment according to the target test information, the association relation between the test task and the test script is established, the test script is added into the test task, the test task is executed, the test result is obtained, and the automatic test of the T-Box is realized; according to the method, the T-Box end is directly accessed through script information, and an automatic test process from script access to feedback result closed loop can be realized without circulation through a TSP server, so that the current state of the vehicle is not required to be acquired through a vehicle-mounted Ethernet in a test link, related test work can be completed under the condition that no actual vehicle exists, related test is completed in the existing research and development process, and cost loss caused by vehicle repairing due to the fact that the test fails is effectively avoided.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application as claimed.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application. It is evident that the drawings in the following description are only some embodiments of the present application and that other drawings may be obtained from these drawings without inventive effort for a person of ordinary skill in the art. In the drawings:
FIG. 1 is a schematic diagram of an implementation environment for T-Box automation testing, shown in accordance with an exemplary embodiment of the present application;
FIG. 2 is a flow chart of a Box automated test shown in an exemplary embodiment of the application;
FIG. 3 is a schematic diagram of test script composition shown in an exemplary embodiment of the present application;
FIG. 4 is a schematic diagram illustrating an implementation flow of a conventional real vehicle test in accordance with an exemplary embodiment of the present application;
FIG. 5 is a flow chart illustrating a single board automated test procedure according to an exemplary embodiment of the present application;
FIG. 6 is a block diagram of a T-Box automated test equipment shown in an exemplary embodiment of the application;
fig. 7 shows a schematic diagram of a computer system suitable for use in implementing an embodiment of the application.
Detailed Description
Further advantages and effects of the present application will become readily apparent to those skilled in the art from the disclosure herein, by referring to the accompanying drawings and the preferred embodiments. The application may be practiced or carried out in other embodiments that depart from the specific details, and the details of the present description may be modified or varied from the spirit and scope of the present application. It should be understood that the preferred embodiments are presented by way of illustration only and not by way of limitation.
It should be noted that the illustrations provided in the following embodiments merely illustrate the basic concept of the present application by way of illustration, and only the components related to the present application are shown in the drawings and are not drawn according to the number, shape and size of the components in actual implementation, and the form, number and proportion of the components in actual implementation may be arbitrarily changed, and the layout of the components may be more complicated.
In the following description, numerous details are set forth in order to provide a more thorough explanation of embodiments of the present application, it will be apparent, however, to one skilled in the art that embodiments of the present application may be practiced without these specific details, in other embodiments, well-known structures and devices are shown in block diagram form, rather than in detail, in order to avoid obscuring the embodiments of the present application.
It should be noted that Linux (collectively referred to as GNU/Linux) is a freely available and freely propagated UNIX-like operating system. The Linux command is a command for managing the Linux system. For the Linux system, whether a central processing unit, a memory, a disk drive, a keyboard, a mouse, a user and the like are files, the command managed by the Linux system is the core of normal operation of the Linux system and is similar to the previous DOS command.
The URL represents a uniform resource locator (uniform resource locator). The URL is simply not the address of a given unique resource on the Web. Theoretically, each valid URL points to a unique resource.
The T-BOX (vehicle-mounted communication BOX) is mainly used for communicating with a background system/mobile phone APP, and vehicle information display and control of the mobile phone APP are achieved.
TSP (TelematicsServiceProvider), content service provider-the supporting content provider mainly produces text, image, audio, video or multimedia information for the service provider.
FIG. 1 is a schematic diagram of an implementation environment of a T-Box automation test, according to an exemplary embodiment of the present application.
As shown in fig. 1, the implementation environment of the T-Box automation test includes a server device 101 and a server device 102, wherein the server device 101 is used to deploy a front-end operable interface, and the server device 102 is used to deploy a back-end interface. It should be noted that this environment is mainly used for writing, storing and executing automation scripts, and creating automation test tasks in an online environment to realize automation test on T-Box.
Fig. 2 is a flow chart of a Box automated test shown in an exemplary embodiment of the application.
As shown in fig. 2, in an exemplary embodiment, the method for automated testing of T-Box at least includes steps S210 to S230, which are described in detail below:
step S210, obtaining a remote control instruction and target test information, and generating a test script based on the remote control instruction.
It should be noted that, before the remote control instruction and the target test information are obtained, the method further includes setting up a test environment, where the test environment includes at least two servers.
In one embodiment of the application, a set of online environments is built for managing automation scripts. At least two servers are used in the on-line environment, one of which is used for deploying the front-end operable interface and the other is used for deploying the back-end interface. The built on-line environment is mainly used for writing, storing and executing the automation script and creating the automation test task in the on-line environment.
Generating a test script based on the remote control instruction, comprising: determining request information and a resource address based on the remote control instruction; writing the request information and the resource address into script information to generate a test script; the request information comprises a request service type, a request service parameter and a request key value pair information; the resource address includes a request protocol, a request server address, a request interface address, a port number, and an authentication value.
FIG. 3 is a schematic diagram of test script composition shown in an exemplary embodiment of the present application.
In one embodiment of the present application, as shown in fig. 3, an interface test script is written according to a remote control instruction, where url required by the current request is written, including a request protocol, a request server address, a request interface address, a port number, and a required authentication value, and then a request body is written, including content such as sid (requested service type), mid (requested service parameter), content (requested key value pair information) and the like in the remote control instruction. In addition, according to the current remote control test result, the response body is generally divided into three cases: firstly, the content of the request body is correct, and a normal response is obtained after the request is sent, which represents that the request is successful; the second is that the request body is correct but the T-Box end does not give a response, and the request response is overtime after exceeding the specified response time; the third is a request body error, representing that the request failed. It should be noted that here, it is not just to set up a successful use case, and the failure of returning also needs to be written into the automation script, so that the integrity of the use case coverage is ensured.
Step S220, a target test task is created in a preset test environment according to the target test information, and an association relation between the test task and the test script is created so as to add the test script into the test task.
In one embodiment of the present application, creating a target test task in a preset test environment according to target test information includes: creating a blank test task in a preset test environment; adding a test script generated based on a remote control instruction to a blank test task to obtain a target test task; setting the execution sequence of the target test tasks, wherein the execution sequence comprises parallel connection and serial connection.
In one embodiment of the application, a test task is created in an online environment, a test script is associated, a remote control command script to be tested is added into the task, and the execution sequence is set to be executed in series.
In another embodiment of the application, a test task is created in an online environment, a test script is associated, a remote control command script to be tested is added into the task, and the execution sequence is set to be parallel execution.
In addition, the repeated calling interface can be set to repeat three times of failures to judge the failure for the execution failure possibly caused by network delay. And if the timed execution is needed, adding the execution time into the creation task.
And step S230, executing a test task to obtain a test result so as to realize automatic test of the T-Box.
It should be understood that, for the single board test, the T-Box function needs to be woken up before the test task is executed, so before the test task is executed, the actual test result is obtained, the method further includes: the program-controlled power supply is controlled to electrify the T-Box through the script; and determining the running state of the script control program, wherein the running state comprises normal running and running faults. Wherein determining the running state of the script control program comprises at least one of: adding a system management command in front of the test script to check the starting state of the script control program, wherein the starting state comprises started and non-started, and when the starting state is started, the running state of the script control program is judged to be normal; a delay time is added before the test script.
In one embodiment of the application, the program-controlled power supply is controlled by the script to electrify the T-Box so as to wake up the T-Box function, and the running state of the program is further judged after the power is electrified.
In one embodiment of the present application, it is checked whether the program has been started by adding a linux command to the forefront of the script.
In another embodiment of the application, it is checked whether the program has been started by adding a delay time before script execution.
It should be noted that, when the program is normally running and then enters into the created automation task to execute the test task, the execution progress can be monitored in real time after execution, and the execution speed of the whole task can be generally hundreds of times in minutes. Because each use case is an independent script, even one failure will not affect the execution of the rest of the use cases. After updating each version, only the MPU needs to update the new version and then directly execute the created remote control task, so that the test of the whole remote control command can be completed within a few minutes. If a new remote control module is arranged at the back, the new remote control module is directly added into the execution task after only a script is written, and compared with manual testing, the time and labor cost are greatly saved.
In addition, after executing the test task and obtaining the test result, the method further comprises the following steps: determining test assertions of the pre-written script based on the test script; when the test result is the same as the test assertion, the test is successful; and when the test result is different from the test assertion, the test failure is indicated.
In one embodiment of the application, after the automatic task is executed, the test result can be directly seen on the test completion task interface, the test result is determined by the assertion written in the script, the display in the script passes before, and the display which does not pass before fails. For the three scenarios mentioned above, where the passing specification results are consistent with the expected output, and for the failed results are different from the expected output, the log of execution is reviewed to analyze the specific causes of test failure, including but not limited to the following: first, script writing is unstable; second, version mismatch, etc.; third, new problems are introduced.
Fig. 3 is a schematic diagram illustrating a flow chart of a conventional real vehicle test implementation according to an exemplary embodiment of the present application. As shown in fig. 3, in the conventional T-Box test, the mobile phone APP is generally used to query the current information of the vehicle, the vehicle obtains the position information through a satellite, the T-Box in the vehicle obtains the current state of the vehicle through the vehicle-mounted ethernet, the T-Box sends the information to the TSP server through the base station, and the TSP server transmits the data to the mobile phone APP through the base station to complete the whole remote control.
Fig. 4 is a flow chart illustrating a single board automated test procedure according to an exemplary embodiment of the present application.
In one embodiment of the present application, as shown in fig. 4, in the T-Box automatic test method proposed in the present application, the trigger of the mobile phone APP is directly written as a script, and the T-Box is directly accessed through the script without passing through the TSP server. The internal flow of the T-Box end is that the MPU sends the result to the MCU, and the MCU sends the result to the MPU, and because the MCU needs the strategy feedback result, the single board test needs to preset the strategy feedback result to the upper layer of the MCU to enable the MPU to directly access the upper layer of the MCU when the MPU accesses the MCU and then directly send the result to the MPU for feedback. Therefore, an automatic process from script access to feedback result closed loop can be realized, and automatic test on the T-Box is realized without help of a real vehicle in the development process.
Fig. 6 is a block diagram of a T-Box automated test equipment according to an exemplary embodiment of the present application. The device may be applied to the implementation environment shown in fig. 1. The apparatus may also be adapted to other exemplary implementation environments and may be specifically configured in other devices, and the present embodiment is not limited to the implementation environments to which the apparatus is adapted.
As shown in fig. 6, the exemplary T-Box automated test apparatus includes: the information acquisition module 610, the task creation module 620, the test execution module 630.
The information acquisition module 610 is configured to acquire a remote control instruction and target test information, and generate a test script based on the remote control instruction; the task creation module 620 is configured to create a target test task in a preset test environment according to the target test information, and establish an association relationship between the test task and the test script, so as to add the test script to the test task; the test execution module 630 is configured to execute a test task to obtain an actual test result, so as to implement an automated test on the T-Box.
It should be noted that, the T-Box automatic test apparatus provided in the above embodiment and the T-Box automatic test method provided in the above embodiment belong to the same concept, and the specific manner in which each module and unit execute the operation has been described in detail in the method embodiment, which is not repeated here. In practical application, the T-Box automatic test device provided in the above embodiment may distribute the functions to be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above, which is not limited herein.
The embodiment of the application also provides electronic equipment, which comprises: one or more processors; and the storage device is used for storing one or more programs, and when the one or more programs are executed by the one or more processors, the electronic equipment realizes the T-Box automatic test method provided in the various embodiments.
Fig. 7 shows a schematic diagram of a computer system suitable for use in implementing an embodiment of the application. It should be noted that, the computer system 700 of the electronic device shown in fig. 7 is only an example, and should not impose any limitation on the functions and the application scope of the embodiments of the present application.
As shown in fig. 7, the computer system 700 includes a central processing unit (CentralProcessingUnit, CPU) 701, which can perform various appropriate actions and processes according to a program stored in a Read-only memory (ROM) 702 or a program loaded from a storage section 708 into a random access memory (RandomAccessMemory, RAM) 703, for example, performing the methods described in the above embodiments. In the RAM703, various programs and data required for the system operation are also stored. The CPU701, ROM702, and RAM703 are connected to each other through a bus 704. An Input/Output (I/O) interface 705 is also connected to bus 704.
The following components are connected to the I/O interface 705: an input section 706 including a keyboard, a mouse, and the like; an output portion 707 including a cathode ray tube (CathodeRayTube, CRT), a liquid crystal display (LiquidCrystalDisplay, LCD), and the like, a speaker, and the like; a storage section 708 including a hard disk or the like; and a communication section 709 including a network interface card such as a LAN (local area network) card, a modem, or the like. The communication section 709 performs communication processing via a network such as the internet. The drive 710 is also connected to the I/O interface 705 as needed. A removable medium 711 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is installed on the drive 710 as needed, so that a computer program read out therefrom is installed into the storage section 708 as needed.
In particular, according to embodiments of the present application, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present application include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising a computer program for performing the method shown in the flowchart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication portion 709, and/or installed from the removable medium 711. When executed by a Central Processing Unit (CPU) 701, performs the various functions defined in the system of the present application.
It should be noted that, the computer readable medium shown in the embodiments of the present application may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium may be, for example, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-Only Memory (ROM), an erasable programmable read-Only Memory (ErasableProgrammableReadOnlyMemory, EPROM), a flash Memory, an optical fiber, a portable compact disk read-Only Memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present application, a computer-readable signal medium may comprise a data signal propagated in baseband or as part of a carrier wave, with a computer-readable computer program embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. A computer program embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. Where each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units involved in the embodiments of the present application may be implemented by software, or may be implemented by hardware, and the described units may also be provided in a processor. Wherein the names of the units do not constitute a limitation of the units themselves in some cases.
Another aspect of the application also provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor of a computer, causes the computer to perform the T-Box automated test method as described above. The computer-readable storage medium may be included in the electronic device described in the above embodiment or may exist alone without being incorporated in the electronic device.
Another aspect of the application also provides a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the T-Box automated test method provided in the above embodiments.
The above embodiments are merely illustrative of the principles of the present application and its effectiveness, and are not intended to limit the application. Modifications and variations may be made to the above-described embodiments by those skilled in the art without departing from the spirit and scope of the application. It is therefore intended that all equivalent modifications and changes made by those skilled in the art without departing from the spirit and technical spirit of the present application shall be covered by the appended claims.
Claims (10)
1. A method for automated testing of T-boxes, the method comprising:
acquiring a remote control instruction and target test information, and generating a test script based on the remote control instruction;
creating a target test task in a preset test environment according to the target test information, and establishing an association relation between the test task and the test script so as to add the test script into the test task;
and executing the test task to obtain a test result so as to realize automatic test of the T-Box.
2. The automated test method of T-Box of claim 1, wherein prior to obtaining the remote control instructions and the target test information, the method further comprises building a test environment comprising at least two servers.
3. The method of automated T-Box testing of claim 1, wherein generating a test script based on the remote control instruction comprises:
determining request information and a resource address based on the remote control instruction;
writing the request information and the resource address into script information to generate the test script;
the request information comprises a request service type, a request service parameter and request key value pair information;
the resource address includes a request protocol, a request server address, a request interface address, a port number, and an authentication value.
4. The method of automated T-Box testing according to claim 3, wherein creating a target test task in a preset test environment according to the target test information comprises:
creating a blank test task in a preset test environment;
adding a test script generated based on the remote control instruction to the blank test task to obtain a target test task;
setting the execution sequence of the target test task, wherein the execution sequence comprises parallel connection and series connection.
5. The automated test method of T-Box of claim 1, wherein the method comprises, prior to performing the test task to obtain an actual test result:
the program-controlled power supply is controlled to electrify the T-Box through the script;
and determining the running state of the script control program, wherein the running state comprises normal running and running faults.
6. The method of automated T-Box testing according to claim 5, wherein determining the operational status of the script control program comprises at least one of:
adding a system management command in front of the test script to check the starting state of the script control program, wherein the starting state comprises started and non-started, and when the starting state is started, the running state of the script control program is judged to be normal;
a delay time is added before the test script.
7. The automated test method of any of claims 1-6, wherein after performing the test task to obtain a test result, the method further comprises:
determining test assertions of a pre-written script based on the test script;
when the test result is the same as the test assertion, the test is successful;
and when the test result is different from the test assertion, the test failure is indicated.
8. A T-Box automated test apparatus, the apparatus comprising:
the information acquisition module is used for acquiring remote control instructions and target test information and generating test scripts based on the remote control instructions;
the task creation module is used for creating a target test task in a preset test environment according to the target test information, and establishing an association relation between the test task and the test script so as to add the test script into the test task;
and the test execution module is used for executing the test task to obtain an actual test result so as to realize the automatic test of the T-Box.
9. An electronic device, the electronic device comprising:
one or more processors;
storage means for storing one or more programs that, when executed by the one or more processors, cause the electronic device to implement the T-Box automated test method of any of claims 1 to 7.
10. A computer-readable storage medium, having stored thereon a computer program which, when executed by a processor of a computer, causes the computer to perform the T-Box automated test method of any of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310617112.0A CN116668336A (en) | 2023-05-29 | 2023-05-29 | T-Box automatic test method, device, equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310617112.0A CN116668336A (en) | 2023-05-29 | 2023-05-29 | T-Box automatic test method, device, equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN116668336A true CN116668336A (en) | 2023-08-29 |
Family
ID=87723604
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310617112.0A Pending CN116668336A (en) | 2023-05-29 | 2023-05-29 | T-Box automatic test method, device, equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116668336A (en) |
-
2023
- 2023-05-29 CN CN202310617112.0A patent/CN116668336A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2021203604A1 (en) | Update test method and apparatus for vehicle component, and computer device and storage medium | |
CN110888414B (en) | Test method for upgrading vehicle controller | |
CN114374632B (en) | Internet of things data platform multi-protocol test efficiency improvement method | |
US20170364436A1 (en) | Plugin-based software verification system | |
CN104572239A (en) | Cloud platform-based template making system and method | |
CN112631919A (en) | Comparison test method and device, computer equipment and storage medium | |
CN113687858A (en) | Configuration file checking method and device, electronic equipment and storage medium | |
CN111399895A (en) | Client updating method and device, electronic equipment and computer readable medium | |
CN110727575B (en) | Information processing method, system, device and storage medium | |
CN116257438A (en) | Updating method of interface test case and related equipment | |
CN113268257A (en) | Vehicle-mounted application upgrading system, method and computer storage medium | |
CN114878186A (en) | Automatic testing device and method for vehicle-mounted equipment | |
CN107203471B (en) | Joint debugging method, service platform and computer storage medium | |
CN116668336A (en) | T-Box automatic test method, device, equipment and storage medium | |
CN116126710A (en) | Vehicle-mounted software simulation method, device, equipment and medium | |
CN116090252A (en) | Matlab-based method, device, equipment and medium for automatically generating input interface model | |
CN115145630A (en) | Cabin software version management method, device, equipment and medium | |
CN115268964A (en) | Data reinjection method and system, electronic device and readable storage medium | |
CN112416796A (en) | Method and device for testing software upgrading | |
CN111082984A (en) | Method and device for simulating login of network equipment to carry out command line interaction | |
CN113094281B (en) | Test method and device for hybrid App | |
CN112860559B (en) | Upgrade test system and method | |
CN115811488A (en) | Internet of vehicles multi-protocol testing system and method | |
CN112241359B (en) | Equipment testing method and equipment | |
CN115396941A (en) | OTA pressure testing method, system, electronic device and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |