WO2017071519A1 - 多平台通用测试方法、装置和系统 - Google Patents

多平台通用测试方法、装置和系统 Download PDF

Info

Publication number
WO2017071519A1
WO2017071519A1 PCT/CN2016/102743 CN2016102743W WO2017071519A1 WO 2017071519 A1 WO2017071519 A1 WO 2017071519A1 CN 2016102743 W CN2016102743 W CN 2016102743W WO 2017071519 A1 WO2017071519 A1 WO 2017071519A1
Authority
WO
WIPO (PCT)
Prior art keywords
sending
test
measurement
platform
interface
Prior art date
Application number
PCT/CN2016/102743
Other languages
English (en)
French (fr)
Inventor
黄颍华
王可峰
魏跃远
代康伟
余军
Original Assignee
北京新能源汽车股份有限公司
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 北京新能源汽车股份有限公司 filed Critical 北京新能源汽车股份有限公司
Publication of WO2017071519A1 publication Critical patent/WO2017071519A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software

Definitions

  • the present invention relates to the field of software testing technologies, and in particular, to a multi-platform universal testing method, apparatus and system.
  • MIL model-in-the-loop test and implemented on PC
  • SIL software-in-the-loop test and implemented on PC
  • HIL hardware-in-the-loop. Testing, implemented on dedicated test equipment. They are different for different development stages, and the scripting programs and application software testing environment models involved in the automatic testing are different.
  • the present invention aims to solve at least one of the technical problems in the related art to some extent.
  • the first object of the present invention is to provide a multi-platform universal test method, which achieves test versatility compatible with multiple test platforms and improves test efficiency.
  • a second object of the present invention is to provide a multi-platform universal test device.
  • a third object of the present invention is to provide a multi-platform universal test system.
  • a fourth object of the present application is to propose an apparatus.
  • a fifth object of the present application is to propose a non-volatile computer storage medium.
  • the multi-platform universal testing method of the first aspect of the present invention includes: acquiring an environment model corresponding to the selected test platform; and identifying a sending signal operation in the environment model according to the preset test case. a path and a measurement signal operation path, wherein the test case includes: a time method, a transmission method, and a measurement method; generating a transmission interface of the test platform according to the transmission signal operation path, and generating a path according to the measurement signal operation path a measurement interface of the test platform; calling a time function corresponding to the time method, and applying a preset character instruction corresponding to the test platform to execute the sending method to determine a sending value, and sending the signal through the sending interface; The time function sends a request to the measurement interface to acquire measurement data, and the character instruction is used to execute the measurement method to determine whether the measurement data is correct.
  • the multi-platform universal test method of the embodiment of the present invention first obtains an environment model corresponding to the selected test platform; and then identifies a transmit signal operation path and a measurement signal operation path in the environment model according to a preset test case, where
  • the test case includes: a time method, a sending method, and a measuring method; and further generating a sending interface of the test platform according to the sending signal operation path, and generating a measurement interface of the test platform according to the measurement signal operation path; a time function corresponding to the time method, and applying a preset character instruction corresponding to the test platform to execute the sending method to determine a sending value, and sending the value through the sending interface; and finally, according to the time function
  • the measurement interface sends a request to acquire measurement data, and the character instruction is used to execute the measurement method to determine whether the measurement data is correct.
  • a multi-platform universal testing device includes: an obtaining module, configured to acquire an environment model corresponding to the selected test platform; and an identifying module, configured to use the preset test case according to the preset test case Identifying a transmission signal operation path and a measurement signal operation path in the environment model, wherein the test case includes: a time method, a transmission method, and a measurement method; and a generation module, configured to generate the test platform according to the transmission signal operation path Transmitting an interface, and generating a measurement interface of the test platform according to the measurement signal operation path; the sending module is configured to invoke a time function corresponding to the time method, and apply a preset character instruction corresponding to the test platform Performing the sending method to determine a sending value, and transmitting the value by using the sending interface.
  • the measuring module is configured to send, according to the time function, a request to acquire the measurement data to the measurement interface, and apply the character instruction to execute the measurement method to determine the location.
  • the multi-platform universal test device of the embodiment of the present invention acquires an environment model corresponding to the selected test platform by using an acquisition module; and the identification module identifies the transmit signal operation path and the measurement signal operation path in the environment model according to the preset test case.
  • the test case includes: a time method, a sending method, and a measuring method; generating, by the generating module, a sending interface of the test platform according to the sending signal operation path, and generating the test platform according to the measuring signal operation path a measurement interface; the time function corresponding to the time method is invoked by the sending module, and the sending method is performed by using a preset character instruction corresponding to the test platform to determine the sending value, and is sent through the sending interface;
  • the measurement module sends a request to the measurement interface to acquire measurement data according to the time function, and the character instruction is used to execute the measurement method to determine whether the measurement data is correct.
  • a multi-platform universal test system includes: a test platform, and a multi-platform universal test device as described above.
  • the multi-platform universal test system of the embodiment of the present invention first obtains an environment model corresponding to the selected test platform by using the multi-platform universal test device; and then identifies the transmit signal operation path and the measurement signal in the environment model according to the preset test case.
  • An operation path where the test case includes: a time method, a sending method, and a measuring method; and further generating a sending interface of the test platform according to the sending signal operation path, and generating the test platform according to the measuring signal operation path a measurement interface; then calling a time function corresponding to the time method, and applying a preset character instruction corresponding to the test platform to execute the sending method to determine a sending value, and sending the signal through the sending interface;
  • the time function sends a request to the measurement interface to acquire measurement data, and the character instruction is used to execute the measurement method to determine whether the measurement data is correct.
  • a fourth aspect of the present invention provides an apparatus comprising: one or more processors; a memory; one or more programs, the one or more programs being stored in the memory when When multiple processors are executed, the following steps are performed: obtaining an environment model corresponding to the selected test platform;
  • test case includes: a time method, a sending method, and a measuring method
  • a fifth aspect of the present invention provides a non-volatile computer storage medium storing one or more programs, when the one or more programs are executed by a device, causing the device Perform the following steps: Obtain an environment model corresponding to the selected test platform;
  • test case includes: a time method, a sending method, and a measuring method
  • the measurement method determines whether the measurement data is correct.
  • FIG. 1 is a flow chart of a multi-platform universal testing method according to an embodiment of the present invention.
  • FIG. 2 is a flow chart of a multi-platform universal testing method according to another embodiment of the present invention.
  • FIG. 3 is a schematic diagram of a test framework of the multi-platform universal test method shown in FIG.
  • FIG. 4 is a block diagram showing the structure of a multi-platform universal test device according to an embodiment of the present invention.
  • FIG. 5 is a structural block diagram of a multi-platform universal test apparatus according to another embodiment of the present invention.
  • FIG. 6 is a block diagram showing the structure of a multi-platform universal test system according to an embodiment of the present invention.
  • FIG. 1 is a flow chart of a multi-platform universal test method according to an embodiment of the present invention.
  • the multi-platform universal test method includes:
  • Step 101 Obtain an environment model corresponding to the selected test platform.
  • the multi-platform universal testing method provided by the embodiment of the present invention is configured in a multi-platform universal testing device, wherein the multi-platform universal testing device performs data interaction with the testing platform.
  • the environment model corresponding to the selected test platform is obtained.
  • test platforms such as MIL, SIL, and HIL, wherein MIL is model-in-the-loop test and implemented on a PC; SIL is a software-in-the-loop test. Implemented on a PC; HIL is a hardware-in-the-loop test implemented on a dedicated test device.
  • the environment model generating device may be deployed in a centralized manner in the multi-platform universal testing device, and the matching environment model may be automatically generated by the environment model generating device;
  • a communication interface with the environment model generation device is introduced to import a matching environment model from the environment model generation device.
  • Step 102 Identify a transmit signal operation path and a measurement signal operation path in the environment model according to a preset test case, where the test case includes: a time method, a sending method, and a measurement method.
  • a multi-platform universal test device pre-stores a test case expression method for multi-platform universal test, and uses a test case expression method to design a multi-platform common test case, each test case includes: a time method, a transmission method, and a measurement method, The content is shown in Table 1:
  • each row represents a test sequence in a test case. There is no limit to the number of test sequences.
  • the measurement method and the method of sending can be left undefined by default, and no processing is performed when not filled.
  • TX1 and TX2 represent the signal names of the values to be sent, which can be replaced by actual names.
  • RX1, RX2, and RX3 indicate the names of the signals to be measured, which can be replaced by actual names.
  • the time methods in Table 1 include: absolute time, limited trigger, continuous waiting, continuous transmission continuous waiting, random absolute time, randomly defined trigger, random continuous waiting, or random continuous transmission continuous waiting, as follows:
  • Absolute time refers to a specified time point on the time axis. The specific position of the point on the time axis is related to 0 point of the previous time. If the absolute time value is 18, it means the distance setting of the point. The distance of 0 o'clock is 18s.
  • the limited trigger refers to one or more measurement signal data that must be agreed by the measurement method within a certain period of time.
  • the data jumps to the next test sequence. No time If the data is fetched, it will determine that the test fails, and jump to the next test sequence. When the jump occurs, the moment of the jump is taken as the new time 0.
  • continuous waiting refers to the measurement data of one or more signals agreed by the measurement method for a limited time. If there is any measurement data that is not equivalent to the agreed measurement data, it is determined that the test fails, but will continue to run. The appointment time ends before jumping to the next test sequence.
  • continuous transmission continuous waiting refers to the continuous execution of the transmission method within a limited time, and there is always measurement data of one or more signals agreed by the measurement method, and if there is unequal measurement data, it is determined as The test does not pass, but it continues to run until the end of the appointment time before jumping to the next test sequence.
  • the time is 5
  • the transmission method of TX1 is between 2 and 3
  • the test method of RX1 in the line is greater than 1, indicating that the TX1 signal is continuously between 2 and 3 during 5s.
  • RX>1 in 5 s, and if RX1 ⁇ 1, it is judged as not passing.
  • random absolute time equivalent to absolute time, but the time value is a random value within the specified range. This method is applicable to the case where the same use case is repeatedly run, and different test effects can be obtained by multiple runs.
  • the random limit trigger equivalent to the limit trigger, but the time value is a random value within the specified range. This method is applicable to the case where the same use case is repeatedly run, and different test effects can be obtained by multiple runs.
  • random continuous waiting equivalent to continuous waiting, but the time value is a random value within the specified range. This method is suitable for the case where the same use case is repeatedly run, and different test effects can be obtained by multiple runs.
  • random continuous transmission continuous waiting equivalent to continuous transmission continuous waiting, but the time value is a random value within the specified range. This method is applicable to the case where the same use case is repeatedly run, and different tests can be obtained by multiple runs. effect.
  • Each of the signals to be transmitted in the transmission method in Table 1 has two values, a simulation value and a manual value.
  • the simulation value refers to the value calculated by the closed-loop operation of the environmental model, and when the manual value is used, the simulation value transmission is specified. Any value.
  • the specific instructions are as follows:
  • a random value between the second and second values take a random value between the two values.
  • the random value between the array take an element in a certain array as a value to send.
  • the random value of a given probability take a random value between the two values, and delimit a van between the two numbers Encircle, and give a probability to the number in this range, so that when the value is between the two values, the number in the demarcated range may be set to meet the set probability.
  • the gradient changes according to the given step: it will change according to the given amount of value for a certain time, until the given value.
  • the expression of the measurement method in Table 1 is divided into measurement data value and measurement judgment logic relationship, and the measurement method is constructed by the relationship between the selected measurement data value and the measurement judgment logic.
  • the value of the measurement data is as follows
  • read read the previously stored data, can read any location stored.
  • the random value between the fourth and the two values take a random value between the two values.
  • the random value between the array take an element in a certain array as a value to send.
  • a random value of a given probability take a random value between two values, and then delimit a range between the two numbers, and give the number within the range a probability, so that in these two values When the value is used, the value in the demarcated range may be set to meet the set probability.
  • the measurement and determination logic relationship specifically includes: greater than, less than, all equal to, not equal to, greater than or equal to, or less than or equal to.
  • test sequence is constructed based on the above time method, transmission method, and measurement method, and almost all test methods and test designs can be expressed.
  • the transmit signal operation path and the measurement signal operation path are identified in an environmental model matching the test platform according to a preset test case, and stored in a multi-platform universal test device.
  • Step 103 Generate a sending interface of the test platform according to the sending signal operation path, and generate a measurement interface of the test platform according to the measurement signal operation path.
  • the function call send interface returns the location of the send interface. And generating a measurement interface of the test platform according to the measurement signal operation path identified in the environment model, so as to return the measurement interface position by using an API function call measurement interface.
  • Step 104 Call a time function corresponding to the time method, and apply a preset character instruction corresponding to the test platform to execute the sending method to determine a sending value, and send the signal through the sending interface.
  • the test process can be performed. First call the time function corresponding to the time method in the test case.
  • the time function selects the similar part of all time methods, identifies the unique part of all time methods, and then uses a piece of code to cover and express all time methods.
  • the sending method is performed by using a preset character instruction corresponding to the test platform to determine the sending value, and is sent to the sending interface position of the environment model through the sending interface of the testing platform.
  • Step 105 Send a request to acquire the measurement data to the measurement interface according to the time function, and execute the measurement method by using the character instruction to determine whether the measurement data is correct.
  • the data acquisition request is sent to the measurement interface according to the time function.
  • the character instruction corresponding to the test platform is used to execute the measurement method in the test case to determine the slave measurement. Whether the measurement data returned by the interface is correct. If it is judged by the measurement method that the measurement data returned from the measurement interface is correct, the test is successful. If the measurement data returned from the measurement interface is determined by the measurement method, the test fails.
  • the multi-platform universal test method of the embodiment first obtains an environment model corresponding to the selected test platform; and then identifies a transmit signal operation path and a measurement signal operation path in the environment model according to the preset test case, wherein
  • the test case includes: a time method, a sending method, and a measuring method; and further generating a sending interface of the test platform according to the sending signal operation path, and generating a measurement interface of the test platform according to the measurement signal operation path; a time function corresponding to the time method, and applying a preset character instruction corresponding to the test platform to execute the sending method to determine a sending value, and sending the value through the sending interface; and finally, according to the time function, the measuring The interface sends a request to acquire measurement data, and the character instruction is used to execute the measurement method to determine whether the measurement data is correct.
  • FIG. 2 is a flow chart of a multi-platform universal testing method according to another embodiment of the present invention
  • FIG. 3 is a schematic diagram of a testing framework of the multi-platform universal testing method shown in FIG. 2.
  • the multi-platform universal test method includes the following steps:
  • Step 201 Generate a test case, where the test case includes at least one test sequence, where the test sequence includes: a time method, a sending method, and a measuring method.
  • Step 202 Receive the selected test platform identifier, and import an environment model corresponding to the platform identifier according to the preset test environment generation library.
  • Step 203 Identify a transmission signal operation path and a measurement signal operation in the environment model according to the test case. Make a path.
  • Step 204 Generate a sending interface of the test platform according to the sending signal operation path, and generate a measurement interface of the test platform according to the measurement signal operation path.
  • Step 205 Call a time function corresponding to the time method, and apply a preset character instruction corresponding to the test platform to execute the sending method to determine a sending value, and send the value through the sending interface.
  • step 201 to step 205 in this embodiment refer to step 101 to step 104 in the embodiment shown in FIG. 1 , and details are not described herein again.
  • Step 206 it is determined whether the transmission completion response of the sending interface feedback is received in a preset time period, and if yes, step 207 is performed; otherwise, step 208 is performed;
  • Step 207 Send a request for acquiring measurement data to the measurement interface according to the time function, and execute the measurement method by using the character instruction to determine whether the measurement data is correct.
  • Step 208 sending a test fault signal.
  • the embodiment determines whether the transmission completion response fed back by the sending interface is received in a preset time period, and if the sending interface feedback is received, The sending completion response indicates that the test is running normally, and then the step 207 is performed to perform the test through the measurement interface.
  • the specific testing process refer to step 105 in the embodiment shown in FIG. 1 , and details are not described herein again. If the transmission completion response of the transmission interface feedback is not received, the test operation failure is performed, that is, step 208 is performed, and the test failure signal is sent to ensure the reliability and validity of the test.
  • the multi-platform universal test method of the embodiment firstly imports the corresponding environment model according to the test platform identifier; then, according to the preset test case, the transmit signal operation path and the measurement signal operation path are identified, and then the test platform is generated according to the transmit signal operation path.
  • embodiments of the present invention also provide a multi-platform universal testing device.
  • FIG. 4 is a block diagram showing the structure of a multi-platform universal test apparatus according to an embodiment of the present invention.
  • the multi-platform universal test device includes:
  • the obtaining module 11 is configured to obtain an environment model corresponding to the selected test platform
  • the identification module 12 is configured to identify a sending signal operation path and a measurement signal operation path in the environment model according to a preset test case, where the test case includes: a time method, a sending method, and a measuring method;
  • time method includes:
  • the measuring method includes:
  • the sending method includes:
  • Constant manual value random value between two values, random value between arrays, random value for a given probability, change by default gradient, gradient change at a given time, gradient change according to a given step, or recovery simulation value.
  • the generating module 13 is configured to generate a sending interface of the test platform according to the sending signal operation path, and generate a measurement interface of the test platform according to the measurement signal operation path;
  • the sending module 14 is configured to invoke a time function corresponding to the time method, and apply a preset character instruction corresponding to the test platform to execute the sending method to determine a sending value, and send the sending value through the sending interface;
  • the measuring module 15 is configured to send, to the measurement interface, a request to acquire measurement data according to the time function, and apply the character instruction to perform the measurement method to determine whether the measurement data is correct.
  • the multi-platform universal test device of the embodiment of the present invention first obtains an environment model corresponding to the selected test platform; and then identifies a transmit signal operation path and a measurement signal operation path in the environment model according to a preset test case, where
  • the test case includes: a time method, a sending method, and a measuring method; and further generating a sending interface of the test platform according to the sending signal operation path, and generating a measurement interface of the test platform according to the measurement signal operation path; a time function corresponding to the time method, and applying a preset character instruction corresponding to the test platform to execute the sending method to determine a sending value, and sending the value through the sending interface; and finally, according to the time function
  • the measurement interface sends a request to acquire measurement data, and the character instruction is used to execute the measurement method to determine whether the measurement data is correct.
  • FIG. 5 is a structural block diagram of a multi-platform universal test apparatus according to another embodiment of the present invention.
  • the obtaining module 11 includes:
  • the receiving unit 111 is configured to receive the selected test platform identifier
  • the importing unit 112 is configured to import an environment model corresponding to the platform identifier according to a preset test environment generation library.
  • the device further includes:
  • the confirmation module 16 is configured to determine whether to receive the sending completion response of the sending interface feedback in a preset time period
  • the prompting module 17 is configured to send a test failure signal if the transmission completion response is not received during the time period.
  • the multi-platform universal testing device of the embodiment of the present invention firstly imports a corresponding environment model according to the test platform identifier; then, according to the preset test case, the sending signal operation path and the measurement signal operation path are identified, and then the test platform is generated according to the sent signal operation path.
  • embodiments of the present invention also provide a multi-platform universal test system.
  • FIG. 6 is a block diagram showing the structure of a multi-platform universal test system according to an embodiment of the present invention.
  • the multi-platform universal test system includes: a test platform 1 and a multi-platform universal test device 2, wherein the multi-platform universal test device 2 can adopt the multi-platform universal test device provided by the above embodiment, and the test platform 1
  • the test platform involved in the above embodiments can be employed.
  • the multi-platform universal test system of the embodiment of the present invention first obtains an environment model corresponding to the selected test platform by using the multi-platform universal test device; and then identifies the transmit signal operation path and the measurement signal in the environment model according to the preset test case.
  • An operation path where the test case includes: a time method, a sending method, and a measuring method; and further generating a sending interface of the test platform according to the sending signal operation path, and generating the test platform according to the measuring signal operation path a measurement interface; then calling a time function corresponding to the time method, and applying a preset character instruction corresponding to the test platform to execute the sending method to determine a sending value, and sending the signal through the sending interface;
  • the time function sends a request to the measurement interface to acquire measurement data, and the character instruction is used to execute the measurement method to determine whether the measurement data is correct.
  • portions of the invention may be implemented in hardware, software, firmware or a combination thereof.
  • multiple steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system.
  • a suitable instruction execution system For example, if implemented in hardware, as in another embodiment, it can be implemented by any one or combination of the following techniques well known in the art: having logic gates for implementing logic functions on data signals. Discrete logic circuits, application specific integrated circuits with suitable combinational logic gates, programmable gate arrays (PGAs), field programmable gate arrays (FPGAs), etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Arrangements For Transmission Of Measured Signals (AREA)
  • Test And Diagnosis Of Digital Computers (AREA)

Abstract

本发明提出一种多平台通用测试方法、装置和系统。该方法包括:获取与测试平台对应的环境模型;根据预设的测试用例在环境模型中识别发送信号操作路径和测量信号操作路径,测试用例包括:时间方法、发送方法和测量方法;根据发送信号操作路径生成测试平台的发送接口,根据测量信号操作路径生成测试平台的测量接口;调用与时间方法对应的时间函数,应用预设的与测试平台对应的字符指令执行发送方法确定发送数值通过发送接口发送;根据时间函数向所述测量接口发送请求获取测量数据,应用字符指令执行测量方法判断测量数据是否正确。实现了兼容多个测试平台的测试通用性,提高了测试效率。

Description

多平台通用测试方法、装置和系统
相关申请的交叉引用
本申请要求北京新能源汽车股份有限公司于2015年10月30日提交的、发明名称为“多平台通用测试方法、装置和系统”的、中国专利申请号“201510729354.4”的优先权。
技术领域
本发明涉及软件测试技术领域,尤其涉及一种多平台通用测试方法、装置和系统。
背景技术
目前汽车控制器的软件测试平台有多种,例如MIL、SIL、HIL,其中,MIL为模型在环测试,在PC机上实现;SIL为软件在环测试,在PC机上实现;HIL为硬件在环测试,在专用测试设备上实现。它们各自针对不同的开发环节,自动测试所涉及的脚本程序、应用软件测试环境模型均不相同。
这就导致某个平台上使用的自动测试脚本无法直接在另一平台上使用,每个平台都需要编写各自的自动测试脚本,并且当它们的测试软件供应商发生变更后,之前编写的自动测试脚本也无法再用。
由此可见,目前的各个测试平台上均有自动测试应用,但其自动测试应用的程序或脚本无法通用,这导致同样的测试方法若需要实现自动测试则要在测试设备上表达三次,甚至需要使用不同的编程语言进行表达,从而导致测试方式没有通用性,降低了测试效率。
发明内容
本发明旨在至少在一定程度上解决相关技术中的技术问题之一。
为此,本发明的第一个目的在于提出一种多平台通用测试方法,该方法实现了兼容多个测试平台的测试通用性,提高了测试效率。
本发明的第二个目的在于提出一种多平台通用测试装置。
本发明的第三个目的在于提出一种多平台通用测试系统。
本申请的第四个目的在于提出一种设备。
本申请的第五个目的在于提出一种非易失性计算机存储介质。
为了实现上述目的,本发明第一方面实施例的多平台通用测试方法,包括:获取与选择的测试平台对应的环境模型;根据预设的测试用例在所述环境模型中识别发送信号操作 路径和测量信号操作路径,其中,所述测试用例包括:时间方法、发送方法和测量方法;根据所述发送信号操作路径生成所述测试平台的发送接口,并根据所述测量信号操作路径生成所述测试平台的测量接口;调用与所述时间方法对应的时间函数,并应用预设的与所述测试平台对应的字符指令执行所述发送方法确定发送数值,并通过所述发送接口发送;根据所述时间函数向所述测量接口发送请求获取测量数据,应用所述字符指令执行所述测量方法判断所述测量数据是否正确。
本发明实施例的多平台通用测试方法,首先获取与选择的测试平台对应的环境模型;然后根据预设的测试用例在所述环境模型中识别发送信号操作路径和测量信号操作路径,其中,所述测试用例包括:时间方法、发送方法和测量方法;进而根据所述发送信号操作路径生成所述测试平台的发送接口,并根据所述测量信号操作路径生成所述测试平台的测量接口;然后调用与所述时间方法对应的时间函数,并应用预设的与所述测试平台对应的字符指令执行所述发送方法确定发送数值,并通过所述发送接口发送;最后根据所述时间函数向所述测量接口发送请求获取测量数据,应用所述字符指令执行所述测量方法判断所述测量数据是否正确。由此,实现了兼容多个测试平台的测试通用性,提高了测试效率。
为了实现上述目的,本发明第二方面实施例的多平台通用测试装置,包括:获取模块,用于获取与选择的测试平台对应的环境模型;识别模块,用于根据预设的测试用例在所述环境模型中识别发送信号操作路径和测量信号操作路径,其中,所述测试用例包括:时间方法、发送方法和测量方法;生成模块,用于根据所述发送信号操作路径生成所述测试平台的发送接口,并根据所述测量信号操作路径生成所述测试平台的测量接口;发送模块,用于调用与所述时间方法对应的时间函数,并应用预设的与所述测试平台对应的字符指令执行所述发送方法确定发送数值,并通过所述发送接口发送;测量模块,用于根据所述时间函数向所述测量接口发送请求获取测量数据,应用所述字符指令执行所述测量方法判断所述测量数据是否正确。
本发明实施例的多平台通用测试装置,通过获取模块获取与选择的测试平台对应的环境模型;通过识别模块根据预设的测试用例在所述环境模型中识别发送信号操作路径和测量信号操作路径,其中,所述测试用例包括:时间方法、发送方法和测量方法;通过生成模块根据所述发送信号操作路径生成所述测试平台的发送接口,并根据所述测量信号操作路径生成所述测试平台的测量接口;通过发送模块调用与所述时间方法对应的时间函数,并应用预设的与所述测试平台对应的字符指令执行所述发送方法确定发送数值,并通过所述发送接口发送;通过测量模块根据所述时间函数向所述测量接口发送请求获取测量数据,应用所述字符指令执行所述测量方法判断所述测量数据是否正确。由此,实现了兼容多个测试平台的测试通用性,提高了测试效率。
为了实现上述目的,本发明第三方面实施例的多平台通用测试系统,包括:测试平台,以及如上所述的多平台通用测试装置。
本发明实施例的多平台通用测试系统,通过多平台通用测试装置首先获取与选择的测试平台对应的环境模型;然后根据预设的测试用例在所述环境模型中识别发送信号操作路径和测量信号操作路径,其中,所述测试用例包括:时间方法、发送方法和测量方法;进而根据所述发送信号操作路径生成所述测试平台的发送接口,并根据所述测量信号操作路径生成所述测试平台的测量接口;然后调用与所述时间方法对应的时间函数,并应用预设的与所述测试平台对应的字符指令执行所述发送方法确定发送数值,并通过所述发送接口发送;最后根据所述时间函数向所述测量接口发送请求获取测量数据,应用所述字符指令执行所述测量方法判断所述测量数据是否正确。由此,实现了兼容多个测试平台的测试通用性,提高了测试效率。
本发明第四方面实施例提供了一种设备,包括:一个或者多个处理器;存储器;一个或者多个程序,所述一个或者多个程序存储在所述存储器中,当被所述一个或者多个处理器执行时,执行以下步骤:获取与选择的测试平台对应的环境模型;
根据预设的测试用例在所述环境模型中识别发送信号操作路径和测量信号操作路径,其中,所述测试用例包括:时间方法、发送方法和测量方法;
根据所述发送信号操作路径生成所述测试平台的发送接口,并根据所述测量信号操作路径生成所述测试平台的测量接口;
调用与所述时间方法对应的时间函数,并应用预设的与所述测试平台对应的字符指令执行所述发送方法确定发送数值,并通过所述发送接口发送;
根据所述时间函数向所述测量接口发送请求获取测量数据,应用所述字符指令执行所述测量方法判断所述测量数据是否正确。
本发明第五方面实施例提供了一种非易失性计算机存储介质,所述计算机存储介质存储有一个或者多个程序,当所述一个或者多个程序被一个设备执行时,使得所述设备执行以下步骤:获取与选择的测试平台对应的环境模型;
根据预设的测试用例在所述环境模型中识别发送信号操作路径和测量信号操作路径,其中,所述测试用例包括:时间方法、发送方法和测量方法;
根据所述发送信号操作路径生成所述测试平台的发送接口,并根据所述测量信号操作路径生成所述测试平台的测量接口;
调用与所述时间方法对应的时间函数,并应用预设的与所述测试平台对应的字符指令执行所述发送方法确定发送数值,并通过所述发送接口发送;
根据所述时间函数向所述测量接口发送请求获取测量数据,应用所述字符指令执行所 述测量方法判断所述测量数据是否正确。
本发明附加的方面和优点将在下面的描述中部分给出,部分将从下面的描述中变得明显,或通过本发明的实践了解到。
附图说明
本发明上述的和/或附加的方面和优点从下面结合附图对实施例的描述中将变得明显和容易理解,其中,
图1是本发明一个实施例的多平台通用测试方法的流程图;
图2是本发明另一个实施例的多平台通用测试方法的流程图;
图3是图2所示的多平台通用测试方法的测试框架示意图
图4是本发明一个实施例的多平台通用测试装置的结构框图;
图5是本发明另一个实施例的多平台通用测试装置的结构框图;
图6是本发明一个实施例的多平台通用测试系统的结构框图。
具体实施方式
下面详细描述本发明的实施例,所述实施例的示例在附图中示出,其中自始至终相同或类似的标号表示相同或类似的元件或具有相同或类似功能的元件。下面通过参考附图描述的实施例是示例性的,仅用于解释本发明,而不能理解为对本发明的限制。相反,本发明的实施例包括落入所附加权利要求书的精神和内涵范围内的所有变化、修改和等同物。
在本发明的描述中,需要理解的是,术语“第一”、“第二”等仅用于描述目的,而不能理解为指示或暗示相对重要性。在本发明的描述中,需要说明的是,除非另有明确的规定和限定,术语“相连”、“连接”应做广义理解,例如,可以是固定连接,也可以是可拆卸连接,或一体地连接;可以是机械连接,也可以是电连接;可以是直接相连,也可以通过中间媒介间接相连。对于本领域的普通技术人员而言,可以具体情况理解上述术语在本发明中的具体含义。此外,在本发明的描述中,除非另有说明,“多个”的含义是两个或两个以上。
流程图中或在此以其他方式描述的任何过程或方法描述可以被理解为,表示包括一个或更多个用于实现特定逻辑功能或过程的步骤的可执行指令的代码的模块、片段或部分,并且本发明的优选实施方式的范围包括另外的实现,其中可以不按所示出或讨论的顺序,包括根据所涉及的功能按基本同时的方式或按相反的顺序,来执行功能,这应被本发明的实施例所属技术领域的技术人员所理解。
以下结合附图描述根据本发明实施例的多平台通用测试方法、装置和系统。
图1是本发明一个实施例的多平台通用测试方法的流程图。
如图1所示,该多平台通用测试方法包括:
步骤101,获取与选择的测试平台对应的环境模型。
具体地,本发明实施例提供的多平台通用测试方法被配置在多平台通用测试装置中,其中,多平台通用测试装置与测试平台进行数据交互。首先,获取与选择的测试平台对应的环境模型,其中,测试平台的类型很多,例如:MIL、SIL、HIL,其中,MIL为模型在环测试,在PC机上实现;SIL为软件在环测试,在PC机上实现;HIL为硬件在环测试,在专用测试设备上实现。
需要说明的是,获取与选择的测试平台对应的环境模型的方式很多,可以在多平台通用测试装置中预先集中部署环境模型生成装置,通过环境模型生成装置自动生成匹配的环境模型;或者通过预设的与环境模型生成装置之间的通信接口从环境模型生成装置导入匹配的环境模型。
步骤102,根据预设的测试用例在所述环境模型中识别发送信号操作路径和测量信号操作路径,其中,所述测试用例包括:时间方法、发送方法和测量方法。
多平台通用测试装置中预先存储有用于多平台通用测试的测试用例表达方法,使用测试用例表达方法来设计多平台通用的测试用例,每个测试用例包括:时间方法、发送方法和测量方法,具体内容如表1所示:
表1
Figure PCTCN2016102743-appb-000001
参见表1,每行代表一个测试用例中的测试序列,测试序列数量没有限制,测量方法以及发送方法处可缺省不填,当不填时不作任何处理。上表中TX1、TX2表示待发送数值的信号名称,可用实际名称替代,RX1、RX2、RX3表示待测量的信号名称,可用实际名称替代。
表1中的时间方法包括:绝对时间、限定触发、持续等待、持续发送持续等待、随机绝对时间、随机限定触发、随机持续等待、或者,随机持续发送持续等待,具体说明如下:
第一,绝对时间:绝对时间指时间轴上的某一个指定时间点,该点在时间轴上的具体位置与前一个时间0点相关,如绝对时间数值为18,则表示该点距离设定的时间0点的距离为18s。
第二,限定触发:指限定在某段时间内一定会有测量方法约定的某一个或多个测量信号数据,当在限定时间内获取到该数据则跳转到下一个测试序列,若超出限定时间均未获 取到该数据则会判定该行测试不通过,同时跳转到下一个测试序列,当跳转发生时将跳转的那一刻时间作为新的时间0点。比如限定触发时间为5,TX1的发送方法为定值2,RX1在该行的测试方法为定值1,那么则表示发送1次TX1=2,之后在5s内会收到RX1==1的情况,但不确定是5s内具体哪一刻收到,也可能收不到,收不到时判定为不通过。
第三,持续等待:指在限定的时间内一直都存在测量方法约定的某一个或多个信号的测量数据,若有不等同于约定的测量数据则判定为测试不通过,但会持续运行到约定时间结束才跳转到下一个测试序列。比如持续等待时间为5,TX1的发送方法为定值2,RX1在该行的测试方法为定值1,则表示发送1次TX1=2,之后在5s内会持续收到RX1==1的情况,若5s内有1次RX1~=1的情况,则判定为不通过。
第四、持续发送持续等待:指在限定的时间内不断的执行发送方法,并且一直都存在测量方法约定的某一个或多个信号的测量数据,若有不等同于约定的测量数据则判定为测试不通过,但会持续运行到约定时间结束才跳转到下一个测试序列。比如,时间为5,TX1的发送方法为随机值2~3之间,RX1在该行的测试方法为大于1,则表示在5s期间不断的使TX1信号在2~3之间取值,同时在5s内RX>1,若存在RX1<=1的情况则判定为不通过。
第五,随机绝对时间:等同于绝对时间,只是时间取值为指定的范围内的随机值,这种方法适用于同一用例反复运行的情况,通过多次运行可获得不同的测试效果。
第六,随机限定触发:等同于限定触发,只是时间取值为指定的范围内的随机值,这种方法适用于同一用例反复运行的情况,通过多次运行可获得不同的测试效果。
第七,随机持续等待:等同于持续等待,只是时间取值为指定的范围内的随机值,这种方法适用于同一用例反复运行的情况,通过多次运行可获得不同的测试效果。
第八,随机持续发送持续等待:等同于持续发送持续等待,只是时间取值为指定的范围内的随机值,这种方法适用于同一用例反复运行的情况,通过多次运行可获得不同的测试效果。
需要注意的是,所有时间方法在具体使用时可用自定义的字母或其他符号来表示,作为计算机识别的标识符。
表1中的发送方法中每个待发送的信号均有两种取值,仿真值和手动值,仿真值是指环境模型闭环运算出来的数值,而使用手动值时则会屏蔽仿真值发送指定的任意数值。具体说明如下:
第一、常数手动值:给定一个指定的定值。
第二、两数值间的随机值:在两个数值之间取一个随机值。
第三、数组间的随机值:在某一个数组内取一个元素作为数值发送。
第四、给定概率的随机值:在两个数值之间取随机值,并在这两个数间再划定一个范 围,并给这个范围内的数一个概率,这样在这两个数值间取值时,划定范围内的数被取值可能会满足设定的概率。
第五、按默认梯度变化:会按默认的梯度变化到给定值。
第六、在给定时间内梯度变化:会在给定的时间内变化到给定值。
第七、按给定的步长梯度变化:会按照给定的某一定时间变化多少数值量来变化,直到给定值。
第八、恢复仿真值:将手动值赋值复位,并重新使用仿真值发送。
需要注意的是,所有发送方法在具体使用时可用自定义的字母或其他符号来表示,作为计算机识别的标识符。
表1中的测量方法的表达分为测量数据取值和测量判断逻辑关系,由选定的测量数据取值与测量判断逻辑关系来构成测量方法。
其中,测量数据取值具体如下
第一、存储:当选定为该类取值时,不做测量且不需再选定测量判断逻辑关系,但会将该点数据保存以备之后判断使用,可存储任意多个点。
第二、读取:读取之前存储的数据,可读取存储的任意位置。
第三、常数值:一个给定值。
第四、两数值间的随机值:在两个数值之间取一个随机值。
第五、数组间的随机值:在某一个数组内取一个元素作为数值发送。
第六、给定概率的随机值:在两个数值之间取随机值,并在这两个数间再划定一个范围,并给这个范围内的数一个概率,这样在这两个数值间取值时,划定范围内的数被取值可能会满足设定的概率。
其中,测量判断逻辑关系具体包括:大于、小于、全等于、不等于、大于等于、或者,小于等于。
需要说明的是,所有测量方法在具体使用时可用自定义的字母或其他符号来表示,作为计算机识别的标识符。
由此可见,基于上述时间方法、发送方法、测量方法来构成测试序列,可表达出几乎所有测试方法、测试设计。
根据预设的测试用例在与测试平台匹配的环境模型中识别发送信号操作路径和测量信号操作路径,并且存储在多平台通用测试装置中。
步骤103,根据所述发送信号操作路径生成所述测试平台的发送接口,并根据所述测量信号操作路径生成所述测试平台的测量接口。
根据环境模型中识别出的发送信号操作路径生成该测试平台的发送接口,以便经过API 函数调用发送接口返回该发送接口位置。并且根据环境模型中识别出的测量信号操作路径生成该测试平台的测量接口,以便经过API函数调用测量接口返回该测量接口位置
步骤104,调用与所述时间方法对应的时间函数,并应用预设的与所述测试平台对应的字符指令执行所述发送方法确定发送数值,并通过所述发送接口发送。
生成测试平台的发送接口和测量接口之后,即可执行测试流程。首先调用与测试用例中的时间方法对应的时间函数,时间函数是选取所有时间方法中的相似部分、识别所有时间方法中的特有部分,而后使用一段代码囊括、表达所有时间方法。
然后,应用预设的与所述测试平台对应的字符指令执行所述发送方法确定发送数值,并通过测试平台的发送接口发送到环境模型的发送接口位置。
步骤105,根据所述时间函数向所述测量接口发送请求获取测量数据,应用所述字符指令执行所述测量方法判断所述测量数据是否正确。
将发送数值通过发送接口发送后,根据该时间函数调向测量接口发送数据获取请求,当接收测量接口返回的测量数据时,应用与测试平台对应的字符指令执行测试用例中的测量方法判断从测量接口返回的测量数据是否正确,如果通过测量方法判断获知从测量接口返回的测量数据正确,则测试成功,如果通过测量方法判断获知从测量接口返回的测量数据错误,测试失败。
本实施例的多平台通用测试方法,首先获取与选择的测试平台对应的环境模型;然后根据预设的测试用例在所述环境模型中识别发送信号操作路径和测量信号操作路径,其中,所述测试用例包括:时间方法、发送方法和测量方法;进而根据所述发送信号操作路径生成所述测试平台的发送接口,并根据所述测量信号操作路径生成所述测试平台的测量接口;然后调用与所述时间方法对应的时间函数,并应用预设的与所述测试平台对应的字符指令执行所述发送方法确定发送数值,并通过所述发送接口发送;最后根据所述时间函数向所述测量接口发送请求获取测量数据,应用所述字符指令执行所述测量方法判断所述测量数据是否正确。由此,实现了兼容多个测试平台的测试通用性,提高了测试效率。
图2是本发明另一个实施例的多平台通用测试方法的流程图,图3是图2所示的多平台通用测试方法的测试框架示意图。
参见图2和图3所示,该多平台通用测试方法包括以下步骤:
步骤201,生成测试用例,所述测试用例包括至少一个测试序列,所述测试序列包括:时间方法、发送方法、测量方法。
步骤202,接收所选择的测试平台标识,根据预设的测试环境生成库导入与所述平台标识对应的环境模型。
步骤203,根据所述测试用例在所述环境模型中识别发送信号操作路径和测量信号操 作路径。
步骤204,根据所述发送信号操作路径生成所述测试平台的发送接口,并根据所述测量信号操作路径生成所述测试平台的测量接口。
步骤205,调用与所述时间方法对应的时间函数,并应用预设的与所述测试平台对应的字符指令执行所述发送方法确定发送数值,并通过所述发送接口发送。
本实施例中的步骤201至步骤205的具体实施过程参见图1所示实施例中的步骤101至步骤104,此处不再赘述。
步骤206,确定是否在预设的时间段接收所述发送接口反馈的发送完成响应,若是,则执行步骤207,否则,执行步骤208;
步骤207,根据所述时间函数向所述测量接口发送请求获取测量数据,应用所述字符指令执行所述测量方法判断所述测量数据是否正确。
步骤208,发送测试故障信号。
具体地,为了进一步地提高测试的可靠性,本实施例在将发送数值通过测试接口发送后,确定是否在预设的时间段接收该发送接口反馈的发送完成响应,如果接收到发送接口反馈的发送完成响应,则说明测试正常运行,进而执行步骤207,通过测量接口进行测试,具体的测试过程参见图1所示实施例中的步骤105,此处不再赘述。如果没有接收到发送接口反馈的发送完成响应,则说明测试运行故障,即执行步骤208,发送测试故障信号,保证了测试的可靠性和有效性。
本实施例的多平台通用测试方法,首先根据测试平台标识导入对应的环境模型;然后根据预设的测试用例识别发送信号操作路径和测量信号操作路径,进而根据发送信号操作路径生成测试平台的发送接口,并根据测量信号操作路径生成测试平台的测量接口;然后调用与时间方法对应的时间函数,并应用预设的与测试平台对应的字符指令执行发送方法确定发送数值,并通过发送接口发送,如果预设时间接收到发送完成响应,则根据时间函数向测量接口发送请求获取测量数据,应用字符指令执行所述测量方法判断测量数据是否正确;如果预设时间没接收到发送完成响应,发送测试故障信号。由此,实现了兼容多个测试平台的测试通用性,提高了测试效率和可靠性。
为了实现上述实施例,本发明的实施例还提供一种多平台通用测试装置。
图4是根据本发明一个实施例的多平台通用测试装置的结构框图。
如图4所示,该多平台通用测试装置包括:
获取模块11,用于获取与选择的测试平台对应的环境模型;
识别模块12,用于根据预设的测试用例在所述环境模型中识别发送信号操作路径和测量信号操作路径,其中,所述测试用例包括:时间方法、发送方法和测量方法;
需要说明的是,所述时间方法包括:
绝对时间、限定触发、持续等待、持续发送持续等待、随机绝对时间、随机限定触发、随机持续等待、或者,随机持续发送持续等待。
所述测量方法包括:
测量数据取值和测量判断逻辑关系。
所述发送方法包括:
常数手动值、两数值间的随机值、数组间的随机值、给定概率的随机值、按默认梯度变化、在给定时间内梯度变化、按给定的步长梯度变化、或者,恢复仿真值。
生成模块13,用于根据所述发送信号操作路径生成所述测试平台的发送接口,并根据所述测量信号操作路径生成所述测试平台的测量接口;
发送模块14,用于调用与所述时间方法对应的时间函数,并应用预设的与所述测试平台对应的字符指令执行所述发送方法确定发送数值,并通过所述发送接口发送;
测量模块15,用于根据所述时间函数向所述测量接口发送请求获取测量数据,应用所述字符指令执行所述测量方法判断所述测量数据是否正确。
需要说明的是,前述对多平台通用测试方法实施例的解释说明也适用于该实施例的多平台通用测试装置,此处不再赘述。
本发明实施例的多平台通用测试装置,首先获取与选择的测试平台对应的环境模型;然后根据预设的测试用例在所述环境模型中识别发送信号操作路径和测量信号操作路径,其中,所述测试用例包括:时间方法、发送方法和测量方法;进而根据所述发送信号操作路径生成所述测试平台的发送接口,并根据所述测量信号操作路径生成所述测试平台的测量接口;然后调用与所述时间方法对应的时间函数,并应用预设的与所述测试平台对应的字符指令执行所述发送方法确定发送数值,并通过所述发送接口发送;最后根据所述时间函数向所述测量接口发送请求获取测量数据,应用所述字符指令执行所述测量方法判断所述测量数据是否正确。由此,实现了兼容多个测试平台的测试通用性,提高了测试效率。
图5是本发明另一个实施例的多平台通用测试装置的结构框图。
如图5所示,基于图4所示,所述获取模块11,包括:
接收单元111,用于接收所选择的测试平台标识;
导入单元112,用于根据预设的测试环境生成库导入与所述平台标识对应的环境模型。
进一步地,所述装置还包括:
确认模块16,用于确定是否在预设的时间段接收所述发送接口反馈的发送完成响应;
提示模块17,用于若在所述时间段没有接收所述发送完成响应,则发送测试故障信号。
需要说明的是,前述对多平台通用测试方法实施例的解释说明也适用于该实施例的多 平台通用测试装置,此处不再赘述。
本发明实施例的多平台通用测试装置,首先根据测试平台标识导入对应的环境模型;然后根据预设的测试用例识别发送信号操作路径和测量信号操作路径,进而根据发送信号操作路径生成测试平台的发送接口,并根据测量信号操作路径生成测试平台的测量接口;然后调用与时间方法对应的时间函数,并应用预设的与测试平台对应的字符指令执行发送方法确定发送数值,并通过发送接口发送,如果预设时间接收到发送完成响应,则根据时间函数向测量接口发送请求获取测量数据,应用字符指令执行所述测量方法判断测量数据是否正确;如果预设时间没接收到发送完成响应,发送测试故障信号。由此,实现了兼容多个测试平台的测试通用性,提高了测试效率和可靠性。
为了实现上述实施例,本发明的实施例还提供一种多平台通用测试系统。
图6是本发明一个实施例的多平台通用测试系统的结构框图。
如图6所示,该多平台通用测试系统包括:测试平台1,以及多平台通用测试装置2,其中,多平台通用测试装置2可以采用上述实施例提供的多平台通用测试装置,测试平台1可以采用上述实施例中涉及的测试平台。
需要说明的是,前述对多平台通用测试方法实施例的解释说明也适用于该实施例的多平台通用测试系统,此处不再赘述。
本发明实施例的多平台通用测试系统,通过多平台通用测试装置首先获取与选择的测试平台对应的环境模型;然后根据预设的测试用例在所述环境模型中识别发送信号操作路径和测量信号操作路径,其中,所述测试用例包括:时间方法、发送方法和测量方法;进而根据所述发送信号操作路径生成所述测试平台的发送接口,并根据所述测量信号操作路径生成所述测试平台的测量接口;然后调用与所述时间方法对应的时间函数,并应用预设的与所述测试平台对应的字符指令执行所述发送方法确定发送数值,并通过所述发送接口发送;最后根据所述时间函数向所述测量接口发送请求获取测量数据,应用所述字符指令执行所述测量方法判断所述测量数据是否正确。由此,实现了兼容多个测试平台的测试通用性,提高了测试效率。
应当理解,本发明的各部分可以用硬件、软件、固件或它们的组合来实现。在上述实施方式中,多个步骤或方法可以用存储在存储器中且由合适的指令执行系统执行的软件或固件来实现。例如,如果用硬件来实现,和在另一实施方式中一样,可用本领域公知的下列技术中的任一项或他们的组合来实现:具有用于对数据信号实现逻辑功能的逻辑门电路的离散逻辑电路,具有合适的组合逻辑门电路的专用集成电路,可编程门阵列(PGA),现场可编程门阵列(FPGA)等。
在本说明书的描述中,参考术语“一个实施例”、“一些实施例”、“示例”、“具体示例”、 或“一些示例”等的描述意指结合该实施例或示例描述的具体特征、结构、材料或者特点包含于本发明的至少一个实施例或示例中。在本说明书中,对上述术语的示意性表述不一定指的是相同的实施例或示例。而且,描述的具体特征、结构、材料或者特点可以在任何的一个或多个实施例或示例中以合适的方式结合。
尽管已经示出和描述了本发明的实施例,本领域的普通技术人员可以理解:在不脱离本发明的原理和宗旨的情况下可以对这些实施例进行多种变化、修改、替换和变型,本发明的范围由权利要求及其等同物限定。

Claims (16)

  1. 一种多平台通用测试方法,其特征在于,包括以下步骤:
    获取与选择的测试平台对应的环境模型;
    根据预设的测试用例在所述环境模型中识别发送信号操作路径和测量信号操作路径,其中,所述测试用例包括:时间方法、发送方法和测量方法;
    根据所述发送信号操作路径生成所述测试平台的发送接口,并根据所述测量信号操作路径生成所述测试平台的测量接口;
    调用与所述时间方法对应的时间函数,并应用预设的与所述测试平台对应的字符指令执行所述发送方法确定发送数值,并通过所述发送接口发送;
    根据所述时间函数向所述测量接口发送请求获取测量数据,应用所述字符指令执行所述测量方法判断所述测量数据是否正确。
  2. 如权利要求1所述的多平台通用测试方法,其特征在于,所述获取与选择的测试平台对应的环境模型,包括:
    接收所选择的测试平台标识;
    根据预设的测试环境生成库导入与所述平台标识对应的环境模型。
  3. 如权利要求1或2所述的多平台通用测试方法,其特征在于,在所述通过所述发送接口发送之后,还包括:
    确定是否在预设的时间段接收所述发送接口反馈的发送完成响应;
    若在所述时间段没有接收所述发送完成响应,则发送测试故障信号。
  4. 如权利要求1-3任一所述的多平台通用测试方法,其特征在于,所述时间方法包括:
    绝对时间、限定触发、持续等待、持续发送持续等待、随机绝对时间、随机限定触发、随机持续等待、或者,随机持续发送持续等待。
  5. 如权利要求1-4任一所述的多平台通用测试方法,其特征在于,所述测量方法包括:
    测量数据取值和测量判断逻辑关系。
  6. 如权利要求1-5任一所述的多平台通用测试方法,其特征在于,所述发送方法包括:
    常数手动值、两数值间的随机值、数组间的随机值、给定概率的随机值、按默认梯度变化、在给定时间内梯度变化、按给定的步长梯度变化、或者,恢复仿真值。
  7. 一种多平台通用测试装置,其特征在于,包括:
    获取模块,用于获取与选择的测试平台对应的环境模型;
    识别模块,用于根据预设的测试用例在所述环境模型中识别发送信号操作路径和测量信号操作路径,其中,所述测试用例包括:时间方法、发送方法和测量方法;
    生成模块,用于根据所述发送信号操作路径生成所述测试平台的发送接口,并根据所述测量信号操作路径生成所述测试平台的测量接口;
    发送模块,用于调用与所述时间方法对应的时间函数,并应用预设的与所述测试平台对应的字符指令执行所述发送方法确定发送数值,并通过所述发送接口发送;
    测量模块,用于根据所述时间函数向所述测量接口发送请求获取测量数据,应用所述字符指令执行所述测量方法判断所述测量数据是否正确。
  8. 如权利要求7所述的多平台通用测试装置,其特征在于,所述获取模块,包括:
    接收单元,用于接收所选择的测试平台标识;
    导入单元,用于根据预设的测试环境生成库导入与所述平台标识对应的环境模型。
  9. 如权利要求7或8所述的多平台通用测试装置,其特征在于,还包括:
    确认模块,用于确定是否在预设的时间段接收所述发送接口反馈的发送完成响应;
    提示模块,用于若在所述时间段没有接收所述发送完成响应,则发送测试故障信号。
  10. 如权利要求7-9任一所述的多平台通用测试装置,其特征在于,所述时间方法包括:
    绝对时间、限定触发、持续等待、持续发送持续等待、随机绝对时间、随机限定触发、随机持续等待、或者,随机持续发送持续等待。
  11. 如权利要求7-10任一所述的多平台通用测试装置,其特征在于,所述测量方法包括:
    测量数据取值和测量判断逻辑关系。
  12. 如权利要求7-11任一所述的多平台通用测试装置,其特征在于,所述发送方法包括:
    常数手动值、两数值间的随机值、数组间的随机值、给定概率的随机值、按默认梯度变化、在给定时间内梯度变化、按给定的步长梯度变化、或者,恢复仿真值。
  13. 一种多平台通用测试系统,其特征在于,包括:测试平台,以及如权利要求7-12任一所述的多平台通用测试装置。
  14. 如权利要求8-13任一所述的装置,其特征在于,所述处理模块还用于:
    预先设置与所述电池组的类型对应的适宜工作温度区间。
  15. 一种设备,其特征在于,包括:
    一个或者多个处理器;
    存储器;
    一个或者多个程序,所述一个或者多个程序存储在所述存储器中,当被所述一个或者多个处理器执行时,执行以下步骤:
    获取与选择的测试平台对应的环境模型;
    根据预设的测试用例在所述环境模型中识别发送信号操作路径和测量信号操作路径,其中,所述测试用例包括:时间方法、发送方法和测量方法;
    根据所述发送信号操作路径生成所述测试平台的发送接口,并根据所述测量信号操作路径生成所述测试平台的测量接口;
    调用与所述时间方法对应的时间函数,并应用预设的与所述测试平台对应的字符指令执行所述发送方法确定发送数值,并通过所述发送接口发送;
    根据所述时间函数向所述测量接口发送请求获取测量数据,应用所述字符指令执行所述测量方法判断所述测量数据是否正确。
  16. 一种非易失性计算机存储介质,其特征在于,所述计算机存储介质存储有一个或者多个程序,当所述一个或者多个程序被一个设备执行时,使得所述设备执行以下步骤:
    获取与选择的测试平台对应的环境模型;
    根据预设的测试用例在所述环境模型中识别发送信号操作路径和测量信号操作路径,其中,所述测试用例包括:时间方法、发送方法和测量方法;
    根据所述发送信号操作路径生成所述测试平台的发送接口,并根据所述测量信号操作路径生成所述测试平台的测量接口;
    调用与所述时间方法对应的时间函数,并应用预设的与所述测试平台对应的字符指令执行所述发送方法确定发送数值,并通过所述发送接口发送;
    根据所述时间函数向所述测量接口发送请求获取测量数据,应用所述字符指令执行所述测量方法判断所述测量数据是否正确。
PCT/CN2016/102743 2015-10-30 2016-10-20 多平台通用测试方法、装置和系统 WO2017071519A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510729354.4A CN105205006B (zh) 2015-10-30 2015-10-30 多平台通用测试方法、装置和系统
CN201510729354.4 2015-10-30

Publications (1)

Publication Number Publication Date
WO2017071519A1 true WO2017071519A1 (zh) 2017-05-04

Family

ID=54952700

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/102743 WO2017071519A1 (zh) 2015-10-30 2016-10-20 多平台通用测试方法、装置和系统

Country Status (2)

Country Link
CN (1) CN105205006B (zh)
WO (1) WO2017071519A1 (zh)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109947658A (zh) * 2019-04-03 2019-06-28 颜沿(上海)智能科技有限公司 一种模拟真实场景数据产生的方法及装置
CN110471834A (zh) * 2019-06-28 2019-11-19 平安银行股份有限公司 多交易渠道下的信用卡模拟测试方法及相关设备
CN110794813A (zh) * 2019-11-18 2020-02-14 上海顺试汽车科技有限公司 一种机电零部件在环实时联动测试方法及系统
CN111258827A (zh) * 2020-01-14 2020-06-09 吉利汽车研究院(宁波)有限公司 接口模型的确定方法、装置、电子设备及存储介质
CN113360391A (zh) * 2021-06-24 2021-09-07 上海真虹信息科技有限公司 一种基于RT-Linux的嵌入式软件黑盒测试方法
CN117915376A (zh) * 2024-03-18 2024-04-19 欧智通科技股份有限公司 一种WiFi信号测试方法

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105205006B (zh) * 2015-10-30 2018-05-04 北京新能源汽车股份有限公司 多平台通用测试方法、装置和系统
CN108490922B (zh) * 2018-04-27 2020-03-24 北京新能源汽车股份有限公司 一种统一诊断服务测试用例的生成方法及装置
CN109144857A (zh) * 2018-08-01 2019-01-04 武汉普利商用机器有限公司 跨平台的算法测试方法及系统
CN112180890B (zh) * 2019-07-05 2022-01-07 北京新能源汽车股份有限公司 一种测试用例的生成方法、装置及设备
CN110442522A (zh) * 2019-08-05 2019-11-12 广州小鹏汽车科技有限公司 基于电动汽车的功能需求的测试用例生成方法和测试方法
CN110531637A (zh) * 2019-08-12 2019-12-03 东莞巨正源科技有限公司 基于集散控制系统的锅炉仿真系统构建方法及锅炉仿真系统
CN112667494A (zh) * 2020-12-08 2021-04-16 上海纳恩汽车技术股份有限公司 一种基于配置表的汽车uds自动化测试方法,系统以及存储介质
CN115060985B (zh) * 2022-06-21 2023-03-24 北京电磁方圆科技有限公司 多通道天线的测试方法及装置

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103198009A (zh) * 2012-01-04 2013-07-10 中国移动通信集团公司 一种通用测试方法、系统及相应装置
US20140033177A1 (en) * 2005-07-20 2014-01-30 International Business Machines Corporation Multi-platform test automation enhancement
CN105205006A (zh) * 2015-10-30 2015-12-30 北京新能源汽车股份有限公司 多平台通用测试方法、装置和系统

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000074982A (ja) * 1998-09-01 2000-03-14 Honda Motor Co Ltd 電力用半導体の熱ストレス試験装置
CN103577907B (zh) * 2012-07-24 2016-12-07 阿里巴巴集团控股有限公司 一种持续集成测试方法和系统
WO2014035462A2 (en) * 2012-09-01 2014-03-06 Promptlink Communications, Inc. Functional verification process and universal platform for high-volume reverse logistics of cpe devices
CN103713282B (zh) * 2013-12-12 2016-03-30 中国人民解放军海军工程大学 基于通用测试平台的视频自动对消装置的自动测试系统
CN104536856B (zh) * 2014-12-12 2018-03-13 北京新能源汽车股份有限公司 汽车控制器测试的环境模型生成的方法及装置
CN104834595B (zh) * 2015-02-15 2017-09-12 网易(杭州)网络有限公司 一种可视化自动测试方法及系统
CN104875629B (zh) * 2015-04-23 2018-01-19 北京新能源汽车股份有限公司 电动汽车的换挡冲击实现方法和换挡控制装置

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140033177A1 (en) * 2005-07-20 2014-01-30 International Business Machines Corporation Multi-platform test automation enhancement
CN103198009A (zh) * 2012-01-04 2013-07-10 中国移动通信集团公司 一种通用测试方法、系统及相应装置
CN105205006A (zh) * 2015-10-30 2015-12-30 北京新能源汽车股份有限公司 多平台通用测试方法、装置和系统

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109947658A (zh) * 2019-04-03 2019-06-28 颜沿(上海)智能科技有限公司 一种模拟真实场景数据产生的方法及装置
CN110471834A (zh) * 2019-06-28 2019-11-19 平安银行股份有限公司 多交易渠道下的信用卡模拟测试方法及相关设备
CN110471834B (zh) * 2019-06-28 2024-05-28 平安银行股份有限公司 多交易渠道下的信用卡模拟测试方法及相关设备
CN110794813A (zh) * 2019-11-18 2020-02-14 上海顺试汽车科技有限公司 一种机电零部件在环实时联动测试方法及系统
CN110794813B (zh) * 2019-11-18 2022-06-07 上海顺试汽车科技有限公司 一种机电零部件在环实时联动测试方法及系统
CN111258827A (zh) * 2020-01-14 2020-06-09 吉利汽车研究院(宁波)有限公司 接口模型的确定方法、装置、电子设备及存储介质
CN111258827B (zh) * 2020-01-14 2024-01-12 宁波吉利汽车研究开发有限公司 接口模型的确定方法、装置、电子设备及存储介质
CN113360391A (zh) * 2021-06-24 2021-09-07 上海真虹信息科技有限公司 一种基于RT-Linux的嵌入式软件黑盒测试方法
CN117915376A (zh) * 2024-03-18 2024-04-19 欧智通科技股份有限公司 一种WiFi信号测试方法
CN117915376B (zh) * 2024-03-18 2024-06-04 欧智通科技股份有限公司 一种WiFi信号测试方法

Also Published As

Publication number Publication date
CN105205006A (zh) 2015-12-30
CN105205006B (zh) 2018-05-04

Similar Documents

Publication Publication Date Title
WO2017071519A1 (zh) 多平台通用测试方法、装置和系统
US10621797B2 (en) System and method for transferring diagnostic commands to a vehicle
CN104579816B (zh) 诊断车辆网络的方法和系统
CN105338110A (zh) 远程调试方法和平台、服务器
US10156611B2 (en) Executing code on a test instrument in response to an event
TWI477139B (zh) 用以測試無線裝置之系統與方法
CN113672441B (zh) 对智能设备的测试方法及装置
US9170924B2 (en) Ecosystem certification of a partner product
CN111858295B (zh) 一种固件测试方法、装置、电子设备和存储介质
CN106021101B (zh) 对移动终端进行测试的方法及装置
CN108132876B (zh) 一种基于注入方式的嵌入式软件目标码单元测试方法
CN106708696B (zh) 一种检测移动终端应用程序中函数耗电量的方法及装置
CN107632913B (zh) 基于国产化操作系统的存储设备与接口测试方法
CN110968004B (zh) 一种基于FPGA原型验证开发板的Cable测试系统
CN105320593B (zh) 多路帧随机数据验证处理方法及装置
EP2519875A1 (en) Method for providing a real time to an application running on a virtual platform
CN110971478B (zh) 云平台服务性能的压测方法、装置及计算设备
WO2023230883A1 (zh) 一种测试方法、系统及装置
CN111770074A (zh) 数据通路测试报文生成装置与方法
CN109918312B (zh) 一种基于risc_v的嵌入式flash编程模块的验证方法
CN116643998B (zh) 一种基于autosar rtm的测试方法及装置
WO2017198051A1 (zh) 一种数据传输方法、装置及计算机存储介质
US9141499B2 (en) Semiconductor inspection apparatus and semiconductor inspection method
KR101894311B1 (ko) 자동변속 제어의 시뮬레이션 방법
TWI797799B (zh) 具動態調整測試項目的測試方法及系統

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16858954

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16858954

Country of ref document: EP

Kind code of ref document: A1