Movatterモバイル変換


[0]ホーム

URL:


CN112965906A - Test system and test method - Google Patents

Test system and test method
Download PDF

Info

Publication number
CN112965906A
CN112965906ACN202110267379.2ACN202110267379ACN112965906ACN 112965906 ACN112965906 ACN 112965906ACN 202110267379 ACN202110267379 ACN 202110267379ACN 112965906 ACN112965906 ACN 112965906A
Authority
CN
China
Prior art keywords
test
module
test case
output
command
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
CN202110267379.2A
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.)
Suzhou Zhitu Technology Co Ltd
Original Assignee
Suzhou Zhitu Technology 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 Suzhou Zhitu Technology Co LtdfiledCriticalSuzhou Zhitu Technology Co Ltd
Priority to CN202110267379.2ApriorityCriticalpatent/CN112965906A/en
Publication of CN112965906ApublicationCriticalpatent/CN112965906A/en
Pendinglegal-statusCriticalCurrent

Links

Images

Classifications

Landscapes

Abstract

Translated fromChinese

本发明提供了一种测试系统和测试方法。其中,该测试系统包括:测试用例模块、测试框架模块和输入输出模块;其中,测试用例模块、测试框架模块和输入输出模块依次通信连接;测试用例模块用于生成测试用例,以使测试用例在测试系统中运行;监控测试系统的运行状态;如果运行状态表征测试系统处于异常状态,将错误信息发送至上位机中;测试框架模块用于提供测试用例模块的类型,为输入输出模块定义接口,调度和管理测试用例模块的测试用例;输入输出模块用于基于测试用例生成输出结果,将输出结果发送至上位机中。可以将部分测试用例的设计从测试工程师转移到开发工程师,从而减少测试工程师的测试工作量,提高工作效率,缩短集成测试的周期。

Figure 202110267379

The present invention provides a test system and a test method. Wherein, the test system includes: a test case module, a test framework module and an input and output module; wherein, the test case module, the test framework module and the input and output module are communicated and connected in sequence; the test case module is used to generate test cases, so that the test cases are in the Run in the test system; monitor the running state of the test system; if the running state indicates that the test system is in an abnormal state, send error information to the upper computer; the test framework module is used to provide the type of the test case module, and define the interface for the input and output modules, Schedule and manage the test cases of the test case module; the input and output module is used to generate output results based on the test cases, and send the output results to the host computer. The design of some test cases can be transferred from test engineers to development engineers, thereby reducing the test workload of test engineers, improving work efficiency, and shortening the cycle of integration testing.

Figure 202110267379

Description

Test system and test method
Technical Field
The invention relates to the technical field of vehicle communication, in particular to a test system and a test method.
Background
With the increasing complexity of software of an automotive ECU (Electronic Control Unit), engineers in different directions cooperate to jointly develop the software, generally, a kava engineer develops the software, and a test engineer tests the software.
However, as the software complexity of automotive ECUs is increasing, it is likely that the specific logic will be unclear to test engineers and clear to development engineers. Therefore, the above-described method has the following problems: the communication cost between the test engineer and the development engineer is high; test cases with some requirements are difficult to develop; the time cost for the test engineer to develop the test case is high; ultimately resulting in longer product development cycles. The test engineer needs to have a certain understanding of the requirements and functions and their implementation to complete the design of the test case, so the requirements on the test engineer are also high.
Disclosure of Invention
In view of this, the present invention provides a test system and a test method, which can enable a development engineer to design a part of test cases, thereby reducing the development difficulty and time cost of the test cases and further reducing the development cycle of the product.
In a first aspect, an embodiment of the present invention provides a test system, where the test system includes: the test system comprises a test case module, a test frame module and an input/output module; the test case module, the test frame module and the input/output module are sequentially in communication connection; the test case module is used for generating a test case so as to enable the test case to run in the test system; monitoring the running state of the test system; if the running state represents that the test system is in an abnormal state, sending error information to an upper computer; the test frame module is used for providing the type of the test case module, defining an interface for the input and output module, and scheduling and managing the test cases of the test case module; the input and output module is used for generating an output result based on the test case and sending the output result to the upper computer.
In a preferred embodiment of the present invention, the test case module includes: the test case configuration file, the test case file and the test execution file; the test case configuration file is used for setting the identification and the test function of the test case; the test case file is used for defining a monitoring mode and output content of the test system; the test execution file is used for providing an entry function for the test framework module.
In a preferred embodiment of the present invention, the test frame module includes: the method comprises the steps of testing a framework configuration file, a testing framework type file and a testing framework execution file; the test framework configuration file is used for setting the identification of the test case module and the entry function of the test case module; the test frame type file is used for providing the type of the test case module; the test framework execution file is used for testing-specific behaviors, and the testing behaviors comprise periodic execution, trigger execution or inhibition execution of test cases; and the method is also used for scheduling the entry function of the test case module.
In a preferred embodiment of the present invention, the input/output module includes: a protocol layer and a driver layer; the protocol layer is used for formatting an output result of the test case and a lower computer command; and the driving layer is used for sending the output result to the upper computer based on the lower computer command.
In a preferred embodiment of the present invention, the test case module, the test frame module and the input/output module are all applied to a lower computer.
In a preferred embodiment of the present invention, the test system further includes: the device comprises a result display module, a command output module and a file code generation module; the result display module is used for displaying an output result sent by the lower computer; the command output module is used for sending an upper computer command to the lower computer; the file code generation module is used for generating a configuration file and a test case code of a test case module of the lower computer.
In a preferred embodiment of the present invention, the result display module, the command output module and the file code generation module are all applied to an upper computer.
In a second aspect, an embodiment of the present invention further provides a testing method, which is applied to the testing system described above, and the method includes: determining a target test case and a target test case module corresponding to the target test case through a test frame module; executing the target test case through the target test case module; and obtaining an output result of the target test case through the input and output module, and sending the output result of the target test case to the upper computer.
In a preferred embodiment of the present invention, the step of determining the target test case and the target test case module corresponding to the target test case by the test framework module includes: the lower computer responds to the first test command, and determines a target test case and a target test case module corresponding to the target test case through the test frame module; or the upper computer sends a first upper computer command to the input/output module, and the input/output module generates a second test command based on the first upper computer command; and responding to the second test command through the test framework module, and determining the target test case and the target test case module corresponding to the target test case.
In a preferred embodiment of the present invention, the method further includes: the upper computer sends a second upper computer command to the input/output module; the input/output module generates an attribute setting command based on the second upper computer command; and modifying the type of the test case by responding to the attribute setting command through the test framework module.
The embodiment of the invention has the following beneficial effects:
the test system and the test method provided by the embodiment of the invention can transfer the design of part of the test cases from the test engineer to the development engineer, thereby reducing the test workload of the test engineer, improving the working efficiency and shortening the cycle of the integrated test.
Additional features and advantages of the disclosure will be set forth in the description which follows, or in part may be learned by the practice of the above-described techniques of the disclosure, or may be learned by practice of the disclosure.
In order to make the aforementioned objects, features and advantages of the present disclosure more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a schematic structural diagram of a test system according to an embodiment of the present invention;
FIG. 2 is a schematic structural diagram of a test case module according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a test frame module according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an input/output module according to an embodiment of the present invention;
FIG. 5 is a schematic structural diagram of another testing system according to an embodiment of the present invention;
FIG. 6 is a flow chart of a testing method according to an embodiment of the present invention;
FIG. 7 is a sequence diagram of a cycle execution test and output result according to an embodiment of the present invention;
fig. 8 is a sequence diagram of a host computer commanding execution test and returning a result according to the embodiment of the present invention;
fig. 9 is a sequence diagram of an attribute setting performed by a host computer command according to an embodiment of the present invention;
FIG. 10 is a schematic structural diagram of a testing apparatus according to an embodiment of the present invention;
fig. 11 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
To make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
At present, the complexity of automobile ECU software is higher and higher, the automobile ECU software is developed by engineers in different directions in a cooperative mode, basic software is divided into different categories such as communication, diagnosis and the like, the basic software is developed by communication engineers and diagnosis engineers respectively, application software is also divided into different categories such as transverse control, longitudinal control and the like, and the different categories are developed by corresponding engineers respectively. And modules responsible by different engineers are integrated by the integration engineer and then released after the development is completed.
The communication may refer to a communication function of the vehicle-mounted Controller, such as CAN (Controller Area Network) communication and ethernet communication. Diagnostics may refer to the functionality of the on-board controller for fault detection, fault storage, and communication protocols with diagnostics (e.g., UDS ISO 14229).
Before release, the product needs to be tested in multiple dimensions, such as testing for communication, diagnosis, control, and the like. Current software integration tests are performed by test engineers. And the test engineer formulates a test case according to the requirements proposed by the development engineer and the requirements of the project and executes the test.
The above-described method has the following problems: the communication cost between the test engineer and the development engineer is high; test cases with some requirements are difficult to develop; the time cost for the test engineer to develop the test case is high; ultimately resulting in longer product development cycles. The test engineer needs to have a certain understanding of the requirements and functions and their implementation to complete the design of the test case, so the requirements on the test engineer are also high.
For example, a state machine inside a controller is not familiar to a test engineer with the logic of the internal state machine, but the development engineer is very familiar with the logic of the internal state machine, and if the test engineer develops a test case, the development engineer needs to communicate with the test engineer for a long time, which causes great development difficulty, high time cost and long product development period.
Based on this, the test system and the test method provided by the embodiment of the invention can reduce the test difficulty, shorten the test time, and optimize and adjust the work of development engineers, integration engineers and test engineers.
To facilitate understanding of the embodiment, a detailed description will be given of a test system disclosed in the embodiment of the present invention.
The first embodiment is as follows:
an embodiment of the present invention provides a test system, referring to a schematic structural diagram of a test system shown in fig. 1, as shown in fig. 1, the test system includes: the test system comprises atest case module 1, atest frame module 2 and an input/output module 3; thetest case module 1, thetest frame module 2 and the input/output module 3 are sequentially in communication connection;
as shown in fig. 1, in order to design a part of test cases by a development engineer, the embodiment includes an upper computer and a lower computer, and the upper computer and the lower computer may be devices capable of communicating with each other, such as a computer and a server. The upper computer is used for sending a test command, receiving, analyzing and displaying a test result and generating a lower computer configuration file. The lower computer comprises three parts: the test system comprises a test case module, a test frame module and an input/output module.
The test case module is used for generating a test case so as to enable the test case to run in the test system; monitoring the running state of the test system; and if the running state represents that the test system is in an abnormal state, sending error information to the upper computer.
The test case in this embodiment may be integrated into the controller software, and executed by the controller together with the functional software, which may consume controller resources. In this embodiment, development engineers with various functions can refer to test cases in the test case module according to their own responsible contents, monitor the stable running state of the test system through the test cases, and feed back error information to the upper computer when the test system is abnormal.
It should be noted that, in this embodiment, there is not necessarily only one test case module, and each functional module of the software may correspond to one test case module, as shown in fig. 1, there may be 3 test case modules.
The test frame module is used for providing the type of the test case module, defining an interface for the input and output module, and scheduling and managing the test cases of the test case module. The test frame module can provide basic types for the test case module, can define a uniform interface for the result output module, and can also schedule and manage the test cases of each test case module and execute the output of the output module.
The input and output module is used for generating an output result based on the test case and sending the output result to the upper computer. The input and output module can generate an output result corresponding to the test case, format the output result, format a lower computer command corresponding to the output result, and then send the output result to the upper computer according to the formatted lower computer command.
According to the test system provided by the embodiment of the invention, the design of part of test cases is transferred from the test engineer to the development engineer, so that the test workload of the test engineer can be reduced, the working efficiency is improved, and the period of integrated test is shortened; the difficulty of the integration test can be reduced, and the requirements on an integration test engineer are reduced; the coverage of integrated test can be increased, and the reliability of the product is improved. Meanwhile, because the development engineer is very familiar with the module in charge of the development engineer, the difficulty in developing the test case is low, the required time is short, the design of the test case is transferred to the development engineer and is not consumed too much, and the test cases with different functions are completed by the corresponding development engineer and can be designed in parallel.
Example two:
the embodiment provides another test system, and the method is implemented on the basis of the embodiment; the present embodiment focuses on the specific structures of the test case module, the test frame module, and the input/output module. As shown in fig. 2, a schematic structural diagram of a test case module, atest case module 1 in this embodiment includes: a testcase configuration file 11, atest case file 12 and atest execution file 13;
the test case configuration file is used for setting the identification and the test function of the test case; the test case file is used for defining a monitoring mode and output content of the test system; the test execution file is used for providing an entry function for the test framework module.
Each test case module in the embodiment has the corresponding three types of files, and is independent from each other. The test case modules are independent of each other: the test case modules with various functions, such as a test case module with a communication function, a test case module with a diagnosis function, a test case module with a vehicle transverse control function and the like, are independent of one another, and can be only one test case module, a plurality of test case modules or even none.
The test case configuration file can set the ID number and the test function of the test case; the test case file defines a monitoring mode and self-defined output content; the test execution file provides an entry function for the test framework module, executes each test case, and uniformly outputs the test result of each test case.
Specifically, the test case configuration file may be _ cfg.c or _ cfg.h, the test case file may be _ testcase.c or _ testcase.h, and the test execution file may be _. The code of the test case configuration file may be:
Figure BDA0002972678350000081
the test case is a structure array constant, one test case corresponds to one array element, the first member of the structure is the serial number of the test case, and the second member is the name of the realization function of the test case. The code of the test case file may be:
Figure BDA0002972678350000082
Figure BDA0002972678350000091
this is a specific example of a test case, and queries whether the current CAN Pdu mode is correct. The code of the test execution file may be:
Figure BDA0002972678350000092
the function is an API provided for the test framework module, each test case function API is called through the structure array constant in the configuration file of the test module, and the test result of each test case is uniformly output
Referring to the structural diagram of a test framework module shown in fig. 3, thetest framework module 2 includes a testframework configuration file 21, a test framework type file 22 and a testframework execution file 23;
the test framework configuration file is used for setting the identification of the test case module and the entry function of the test case module; the test frame type file is used for providing the type of the test case module; the test framework execution file is used for testing-specific behaviors, and the testing behaviors comprise periodic execution, trigger execution or inhibition execution of test cases; and the method is also used for scheduling the entry function of the test case module.
In this embodiment, the test framework configuration file may be "cfg.c" or "cfg.h", the test framework type file may be "types.h", and the test framework execution file may be "c" or "h". The test framework configuration file can set the ID number of the test case module and the entry function of the test case module. The test framework type file may provide the types used in the integrated test system. The test framework execution file can define the test behaviors including not only periodic execution, trigger execution and inhibit the execution of test cases; the test framework execution file can also schedule the entry function of the test case module.
Specifically, the code of the test framework configuration file may be:
Figure BDA0002972678350000101
Figure BDA0002972678350000111
this is a structure array constant, one test module corresponds to one array element, the first member of the structure is the test module number, the second member is the test module entry executive function name, and the third member is the test module status (default in inactive state).
The code for testing the framework type file may be:
Figure BDA0002972678350000112
Figure BDA0002972678350000121
some basic types are defined in the test framework type file and used by the whole framework, including a test case return result type enCTst _ ResultType and a test module state type enCTst _ modulestatus type.
The code of the test framework execution file can be:
Figure BDA0002972678350000122
Figure BDA0002972678350000131
the first of the two functions executes the test case of the appointed module, and the second executes the test cases of all the modules.
Referring to a schematic structural diagram of an input/output module shown in fig. 4, the input/output module 3 includes: aprotocol layer 31 and adriver layer 32, wherein the protocol layer is also referred to as TP layer. The protocol layer is used for formatting an output result of the test case and a lower computer command; and the driving layer is used for sending the output result to the upper computer based on the lower computer command.
The protocol layer may output the result as well as the format command. The driving layer may use, but is not limited to, Uart, Can, TcpIp, etc. communication means. The output result and the upper computer command can be formatted by a TP layer, and can also be freely input and output by directly using a driving layer.
The test case module, the test frame module and the input/output module in the embodiment are all applied to the lower computer. For a test system in an upper computer, see fig. 5 for a schematic structural diagram of another test system, the test system includes aresult display module 41, acommand output module 42, and a filecode generation module 43; the result display module is used for displaying an output result sent by the lower computer; the command output module is used for sending an upper computer command to the lower computer; the file code generation module is used for generating a configuration file and a test case code of a test case module of the lower computer.
As shown in fig. 5, the result display module, the command output module, and the file code generation module in this embodiment are all applied to an upper computer.
The result display module has a result display function, can output a result without a protocol, and the upper computer directly analyzes and displays the result based on the ASCII code; the output result of the protocol can also be provided, and the upper computer analyzes and displays the protocol according to the protocol defined by the lower computer.
The command output module has a command output function: commands may be output to the lower computer according to a defined protocol.
The file code generation module can automatically generate the configuration file and the test case code of the test case module.
Generally, a test system for a test engineer generally develops a test case on a computer side based on a test tool (open source or business tool).
Example three:
the test case module, the test frame module and the input/output module in the embodiment are combined into a set of software system, and an integration engineer is required to integrate the software system into a specific embedded system. Under the condition of not influencing the original function module, a development engineer designs a test case of the original function module. The test cases refer to ranges including, but not limited to, states inside the functional modules, values of variables, the number of times the functional services are run, the order of execution, and the like.
Referring to fig. 6, a flow chart of a testing method is shown, as shown in fig. 6, the testing method includes the steps of:
step S602, determining a target test case and a target test case module corresponding to the target test case through the test framework module.
In this embodiment, the test may be periodically executed and the result may be output, or the test may be executed and the result may be returned under the control of the command of the upper computer, and the above steps may be executed in two ways:
mode 1: and the lower computer responds to the first test command and determines the target test case and a target test case module corresponding to the target test case through the test framework module.
In themode 1, that is, the case of periodically executing the test and outputting the result, referring to the sequence diagram of periodically executing the test and outputting the result shown in fig. 7, as can be seen from fig. 7, the scheduler may first send a first test command to the test frame module, determine the target test case and the target test case module corresponding to the target test case, and then execute the target test case by the target test case module.
Mode 2: the upper computer sends a first upper computer command to the input/output module, and the input/output module generates a second test command based on the first upper computer command; and responding to the second test command through the test framework module, and determining the target test case and the target test case module corresponding to the target test case.
Mode 2 is a situation that the upper computer commands to execute the test and return the result, referring to a sequence diagram of the upper computer commands to execute the test and return the result shown in fig. 8, as can be seen from fig. 8, the upper computer sends a first upper computer command to the input/output module, the input/output module sends a second test command to the test frame module, and the test frame module responds to the second test command to determine the target test case and the target test case module corresponding to the target test case.
Step S604, the target test case is executed by the target test case module.
After determining a target test case module for executing the target test case, the target test case may be executed by the target test case module.
And step S606, obtaining an output result of the target test case through the input and output module, and sending the output result of the target test case to the upper computer.
The output result of the target test case is obtained through the input and output module, and the input and output module can send the output result of the target test case to the upper computer.
Besides, the method further comprises the following steps: the upper computer sends a second upper computer command to the input/output module; the input/output module generates an attribute setting command based on the second upper computer command; and modifying the type of the test case by responding to the attribute setting command through the test framework module.
Referring to the sequence diagram of fig. 9, in which the scheduler performs attribute setting through the upper computer command, the scheduler may send a second upper computer command to the input/output module, and after the input/output module generates the attribute setting command, the test framework module responds to the attribute setting command to modify the type of the test case.
The test system and the test method provided by the embodiment of the invention have the following advantages: and (3) expandability: the number of test cases of each test case module is not limited, and the test cases can be freely expanded according to requirements. The communication mode has wide applicability: different communication modes may be selected, such as CAN, ethernet, Uart, etc. The functional module has wide applicability: the content of the functional module is not limited, and the test case can be specifically designed according to the difference of the functional module. The workload of a system integration test engineer is reduced, the working efficiency is improved, and the period of integration test is shortened; the coverage of integrated test is increased, and the reliability of the product is improved; the difficulty of the integrated test is reduced, and the requirements on an integrated test engineer are reduced.
Example four:
corresponding to the above method embodiment, an embodiment of the present invention provides a testing apparatus, as shown in fig. 10, which includes:
a target test case determining module 1001, configured to determine a target test case and a target test case module corresponding to the target test case through a test framework module;
a target testcase execution module 1002, configured to execute a target test case through the target test case module;
and the target testcase result module 1003 is used for obtaining an output result of the target test case through the input and output module and sending the output result of the target test case to the upper computer.
The target test case determining module is used for responding to the first test command by the lower computer and determining a target test case and a target test case module corresponding to the target test case through the test frame module; or the upper computer sends a first upper computer command to the input/output module, and the input/output module generates a second test command based on the first upper computer command; and responding to the second test command through the test framework module, and determining the target test case and the target test case module corresponding to the target test case.
The testing device also comprises an attribute setting module which is used for sending a second upper computer command to the input and output module by the upper computer; the input/output module generates an attribute setting command based on the second upper computer command; and modifying the type of the test case by responding to the attribute setting command through the test framework module.
Example five:
the embodiment of the invention also provides electronic equipment, which is used for operating the test method; referring to fig. 11, a schematic structural diagram of an electronic device is shown, the electronic device includes amemory 100 and aprocessor 101, where thememory 100 is used to store one or more computer instructions, and the one or more computer instructions are executed by theprocessor 101 to implement the above-mentioned test method.
Further, the electronic device shown in fig. 11 further includes a bus 102 and acommunication interface 103, and theprocessor 101, thecommunication interface 103, and thememory 100 are connected through the bus 102.
TheMemory 100 may include a high-speed Random Access Memory (RAM) and may further include a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. The communication connection between the network element of the system and at least one other network element is realized through at least one communication interface 103 (which may be wired or wireless), and the internet, a wide area network, a local network, a metropolitan area network, and the like can be used. The bus 102 may be an ISA bus, PCI bus, EISA bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one double-headed arrow is shown in FIG. 11, but that does not indicate only one bus or one type of bus.
Theprocessor 101 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in theprocessor 101. TheProcessor 101 may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the device can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component. The various methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in thememory 100, and theprocessor 101 reads the information in thememory 100, and completes the steps of the method of the foregoing embodiment in combination with the hardware thereof.
The embodiment of the present invention further provides a computer-readable storage medium, where the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are called and executed by a processor, the computer-executable instructions cause the processor to implement the test method.
The computer program product of the test system and the test method provided by the embodiment of the present invention includes a computer readable storage medium storing a program code, and instructions included in the program code may be used to execute the method in the foregoing method embodiment, and specific implementation may refer to the method embodiment, and will not be described herein again.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the system and/or the apparatus described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In addition, in the description of the embodiments of the present invention, unless otherwise explicitly specified or limited, the terms "mounted," "connected," and "connected" are to be construed broadly, e.g., as meaning either a fixed connection, a removable connection, or an integral connection; can be mechanically or electrically connected; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. The specific meanings of the above terms in the present invention can be understood in specific cases to those skilled in the art.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings, and are only for convenience of description and simplicity of description, but do not indicate or imply that the device or element being referred to must have a particular orientation, be constructed and operated in a particular orientation, and thus, should not be construed as limiting the present invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
Finally, it should be noted that: the above-mentioned embodiments are only specific embodiments of the present invention, which are used for illustrating the technical solutions of the present invention and not for limiting the same, and the protection scope of the present invention is not limited thereto, although the present invention is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art can modify or easily conceive the technical solutions described in the foregoing embodiments or equivalent substitutes for some technical features within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the embodiments of the present invention, and they should be construed as being included therein. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. A test system, characterized in that the test system comprises: the test system comprises a test case module, a test frame module and an input/output module; the test case module, the test frame module and the input/output module are sequentially in communication connection;
the test case module is used for generating a test case so as to enable the test case to run in a test system; monitoring the running state of the test system; if the running state represents that the test system is in an abnormal state, error information is sent to an upper computer;
the test framework module is used for providing the type of the test case module, defining an interface for the input and output module, and scheduling and managing the test cases of the test case module;
the input and output module is used for generating an output result based on the test case and sending the output result to the upper computer.
2. The test system of claim 1, wherein the test case module comprises: the test case configuration file, the test case file and the test execution file;
the test case configuration file is used for setting the identification and the test function of the test case;
the test case file is used for defining a monitoring mode and output content of the test system;
the test execution file is used for providing an entry function for the test framework module.
3. The test system of claim 1, wherein the test frame module comprises: the method comprises the steps of testing a framework configuration file, a testing framework type file and a testing framework execution file;
the test framework configuration file is used for setting the identification of the test case module and the entry function of the test case module;
the test frame type file is used for providing the type of the test case module;
the test framework execution file is used for testing-specific behaviors, and the testing behaviors comprise periodic execution, trigger execution or inhibition of execution of the test case; and the system is also used for scheduling the entry function of the test case module.
4. The test system of claim 1, wherein the input-output module comprises: a protocol layer and a driver layer;
the protocol layer is used for formatting the output result of the test case and the lower computer command;
the driving layer is used for sending the output result to the upper computer based on the lower computer command.
5. The test system according to any one of claims 1 to 4, wherein the test case module, the test frame module and the input/output module are applied to a lower computer.
6. The test system of claim 1, further comprising: the device comprises a result display module, a command output module and a file code generation module;
the result display module is used for displaying an output result sent by the lower computer;
the command output module is used for sending an upper computer command to the lower computer;
the file code generation module is used for generating a configuration file and a test case code of the test case module of the lower computer.
7. The test system of claim 6, wherein the result display module, the command output module and the file code generation module are all applied to an upper computer.
8. A testing method applied to the testing system of any one of claims 1 to 7, the method comprising:
determining a target test case and a target test case module corresponding to the target test case through the test framework module;
executing the target test case through the target test case module;
and obtaining an output result of the target test case through the input and output module, and sending the output result of the target test case to the upper computer.
9. The method of claim 8, wherein the step of determining, by the test framework module, a target test case and a target test case module corresponding to the target test case comprises:
the lower computer responds to a first test command, and determines a target test case and a target test case module corresponding to the target test case through the test framework module;
or the upper computer sends a first upper computer command to the input/output module, and the input/output module generates a second test command based on the first upper computer command; and responding to the second test command through the test framework module, and determining a target test case and a target test case module corresponding to the target test case.
10. The method of claim 8, further comprising:
the upper computer sends a second upper computer command to the input/output module;
the input/output module generates an attribute setting command based on the second upper computer command;
and responding to the attribute setting command through the test framework module, and modifying the type of the test case.
CN202110267379.2A2021-03-112021-03-11Test system and test methodPendingCN112965906A (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN202110267379.2ACN112965906A (en)2021-03-112021-03-11Test system and test method

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202110267379.2ACN112965906A (en)2021-03-112021-03-11Test system and test method

Publications (1)

Publication NumberPublication Date
CN112965906Atrue CN112965906A (en)2021-06-15

Family

ID=76277357

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202110267379.2APendingCN112965906A (en)2021-03-112021-03-11Test system and test method

Country Status (1)

CountryLink
CN (1)CN112965906A (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20030097650A1 (en)*2001-10-042003-05-22International Business Machines CorporationMethod and apparatus for testing software
CN101571830A (en)*2009-06-192009-11-04北京航空航天大学Automatic closed loop test system of real-time embedded software
CN107861874A (en)*2017-11-102018-03-30宁波普瑞均胜汽车电子有限公司Full-automatic vehicle electronics test system
CN108920372A (en)*2018-07-092018-11-30北京首汽智行科技有限公司Shared automobile intelligent car-mounted terminal automatization test system and method based on serial ports
CN109947647A (en)*2019-03-142019-06-28麦特汽车服务股份有限公司A kind of method of testing and control lifting machine stationarity algorithm
CN111308935A (en)*2020-02-272020-06-19北京广利核系统工程有限公司Automatic testing device and method for priority management product
CN112306875A (en)*2020-10-302021-02-02南京汽车集团有限公司Automatic testing method based on HIL (hardware-in-the-loop) rack
CN112362360A (en)*2020-11-102021-02-12广州小鹏汽车科技有限公司Vehicle component testing method, device and system, test board card and storage medium
CN212586473U (en)*2020-02-222021-02-23苏州挚途科技有限公司Test equipment and test system

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20030097650A1 (en)*2001-10-042003-05-22International Business Machines CorporationMethod and apparatus for testing software
CN101571830A (en)*2009-06-192009-11-04北京航空航天大学Automatic closed loop test system of real-time embedded software
CN107861874A (en)*2017-11-102018-03-30宁波普瑞均胜汽车电子有限公司Full-automatic vehicle electronics test system
CN108920372A (en)*2018-07-092018-11-30北京首汽智行科技有限公司Shared automobile intelligent car-mounted terminal automatization test system and method based on serial ports
CN109947647A (en)*2019-03-142019-06-28麦特汽车服务股份有限公司A kind of method of testing and control lifting machine stationarity algorithm
CN212586473U (en)*2020-02-222021-02-23苏州挚途科技有限公司Test equipment and test system
CN111308935A (en)*2020-02-272020-06-19北京广利核系统工程有限公司Automatic testing device and method for priority management product
CN112306875A (en)*2020-10-302021-02-02南京汽车集团有限公司Automatic testing method based on HIL (hardware-in-the-loop) rack
CN112362360A (en)*2020-11-102021-02-12广州小鹏汽车科技有限公司Vehicle component testing method, device and system, test board card and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
王海文等主编: "《测试技术》", 30 June 2017, 武汉:华中科技大学出版社, pages: 9*
赵小强等编著: "《水质远程分析科学决策智能化环保系统》", 31 October 2012, 西安:西安电子科技大学出版社, pages: 51*

Similar Documents

PublicationPublication DateTitle
CN107491061B (en) A network automated test system and method for commercial vehicle OBD diagnostic equipment
CN114327543A (en) Online upgrade method, device, vehicle and storage medium of vehicle controller
CN114138644B (en) BMC debugging method and monitoring method, system, device, equipment, and medium
CN104734911A (en)CAN bus network management test system and method
CN109658542B (en)Diagnostic parameter data verification method, diagnostic parameter data verification device, vehicle diagnostic equipment and storage medium
CN115016431B (en) A method, device and equipment for testing OBD diagnostic system function
CN118921292A (en)Hardware-in-loop test method, apparatus, computer device, medium and program product
CN115981992A (en)Verification method, device, equipment and storage medium of AUTOSAR software
CN112965906A (en)Test system and test method
JP2018170591A (en) COMMUNICATION DEVICE, COMMUNICATION METHOD, AND CONTROL PROGRAM
JP7590560B2 (en) METHOD, DATA PROCESSING MODULE AND DATA PROCESSING NETWORK FOR PROCESSING DATA - Patent application
CN115755867A (en) A vehicle diagnosis method and related device
CN115827052A (en)Vehicle offline configuration data processing method and device, electronic equipment and medium
CN115473832A (en)Vehicle networking terminal cloud communication testing method, device, server, client and system
CN112257381A (en)AXI Crossbar design circuit verification method and system
CN107562617B (en) A Module Verification System Based on NC System
CN120407024B (en)Verification method and device for instruction sequence, electronic equipment and storage medium
CN115543839B (en)Method and device for testing health management function, electronic equipment and storage medium
CN117631655B (en)Secure communication method, apparatus, device and storage medium for vehicle diagnosis
US20250165334A1 (en)Functional safety bist with system vitals
US20240403186A1 (en)IoT Event Detector Correctness Verification
CN115426381A (en) A method, system and electronic device for sending messages
CN118631486A (en) Method for verifying the integrity of a computing node
JP2003023440A (en)Gateway, computer and communication evaluation system
Ahmed et al.Automotive ECU Basic Test & Validation for XIL in ADAS: A Comprehensive Overview on HIL bench phase

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination

[8]ページ先頭

©2009-2025 Movatter.jp