CN105205006B - multi-platform universal test method, device and system - Google Patents

multi-platform universal test method, device and system Download PDF

Info

Publication number
CN105205006B
CN105205006B CN201510729354.4A CN201510729354A CN105205006B CN 105205006 B CN105205006 B CN 105205006B CN 201510729354 A CN201510729354 A CN 201510729354A CN 105205006 B CN105205006 B CN 105205006B
Authority
CN
China
Prior art keywords
test
platform
time
measurement
environmental model
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.)
Active
Application number
CN201510729354.4A
Other languages
Chinese (zh)
Other versions
CN105205006A (en
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.)
Beijing Electric Vehicle Co Ltd
Original Assignee
Beijing Electric Vehicle 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 Beijing Electric Vehicle Co Ltd filed Critical Beijing Electric Vehicle Co Ltd
Priority to CN201510729354.4A priority Critical patent/CN105205006B/en
Publication of CN105205006A publication Critical patent/CN105205006A/en
Priority to PCT/CN2016/102743 priority patent/WO2017071519A1/en
Application granted granted Critical
Publication of CN105205006B publication Critical patent/CN105205006B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

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

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

The invention provides a multi-platform universal test method, a multi-platform universal test device and a multi-platform universal test system. The method comprises the following steps: acquiring an environment model corresponding to the test platform; identifying a sending signal operation path and a measuring signal operation path in the environment model according to a preset test case, wherein the test case comprises the following steps: time method, sending method and measuring method; generating a sending interface of the test platform according to the sending signal operation path, and generating a measuring interface of the test platform according to the measuring signal operation path; calling a time function corresponding to the time method, and executing a sending method by using a preset character instruction corresponding to the test platform to determine that a sending numerical value is sent through a sending interface; and sending a request to the measurement interface to acquire measurement data according to the time function, and judging whether the measurement data is correct or not by applying a character instruction execution measurement method. The test universality of a plurality of compatible test platforms is realized, and the test efficiency is improved.

Description

Multi-platform universal testing method, device and system
Technical field
The present invention relates to software testing technology field, more particularly to a kind of multi-platform universal testing method, device and system.
Background technology
The software test platform of automobile controller has a variety of at present, such as MIL, SIL, HIL, wherein, MIL is model in ring Test, is realized in PC machine;SIL is software in ring test, is realized in PC machine;HIL is hardware-in―the-loop test, in special test Realized in equipment.Each of which is directed to different exploitation links, the involved shell script of automatic test, application software testing ring Border model differs.
This results in the automatic test script used on some platform and can not directly use on another platform, each platform It is required for writing respective automatic test script, and after their test software supplier changes, writes before Automatic test script is also unrenewable.
It can be seen from the above that there are automatic test application, but the program of its automatic test application on current each test platform Or script can not be general, this causes same test method if desired to realize that automatic test will then express three in test equipment It is secondary, or even need to be expressed using different programming languages, so as to cause test mode there is no versatility, reduce test effect Rate.
The content of the invention
It is contemplated that solve at least some of the technical problems in related technologies.
For this reason, first purpose of the present invention is to propose a kind of multi-platform universal testing method, the method achieve simultaneous Hold the test all-purpose of multiple test platforms, improve testing efficiency.
Second object of the present invention is to propose a kind of multi-platform universal test device.
Third object of the present invention is to propose a kind of multi-platform universal test system.
To achieve these goals, the multi-platform universal testing method of first aspect present invention embodiment, including:Obtain with The corresponding environmental model of test platform of selection;Identified according to default test case in the environmental model and send signal behaviour Make path and measuring signal courses of action, wherein, the test case includes:Time method, sending method and measuring method;Root According to the transmission interface of test platform described in the transmission signal operation coordinates measurement, and given birth to according to the measuring signal courses of action Into the measurement interface of the test platform;Call corresponding with the time method function of time, and apply it is default with it is described The corresponding character instruction of test platform performs described sender method and determines to send numerical value, and is sent by the transmission interface;Root Acquisition request measurement data is sent to the measurement interface according to the function of time, the measurement is performed using the character instruction Method judges whether the measurement data is correct.
The multi-platform universal testing method of the embodiment of the present invention, obtains environment mould corresponding with the test platform selected first Type;Then identified according to default test case in the environmental model and send signal operation path and measuring signal operation road Footpath, wherein, the test case includes:Time method, sending method and measuring method;And then according to the transmission signal operation The transmission interface of test platform described in coordinates measurement, and according to the survey of the measuring signal courses of action generation test platform Measure interface;Then the function of time corresponding with the time method is called, and application is default corresponding with the test platform Character instruction performs described sender method and determines to send numerical value, and is sent by the transmission interface;Finally according to the time Function sends acquisition request measurement data to the measurement interface, and performing the measuring method using the character instruction judges institute Whether correct state measurement data.Hereby it is achieved that the test all-purpose of compatible multiple test platforms, improves testing efficiency.
To achieve these goals, the multi-platform universal test device of second aspect of the present invention embodiment, including:Obtain mould Block, the corresponding environmental model of test platform for obtaining with selecting;Identification module, for according to default test case in institute State identification in environmental model and send signal operation path and measuring signal courses of action, wherein, the test case includes:Time Method, sending method and measuring method;Generation module, for the test platform according to the transmission signal operation coordinates measurement Transmission interface, and generate according to the measuring signal courses of action measurement interface of the test platform;Sending module, is used for The function of time corresponding with the time method is called, and the default character instruction corresponding with the test platform of application performs Described sender method determines to send numerical value, and is sent by the transmission interface;Measurement module, for according to the function of time Acquisition request measurement data is sent to the measurement interface, performing the measuring method using the character instruction judges the survey Whether correct measure data.
The multi-platform universal test device of the embodiment of the present invention, is obtained corresponding with the test platform selected by acquisition module Environmental model;Identified by identification module according to default test case in the environmental model and send signal operation path With measuring signal courses of action, wherein, the test case includes:Time method, sending method and measuring method;Pass through generation The transmission interface of module test platform according to the transmission signal operation coordinates measurement, and operated according to the measuring signal The measurement interface of test platform described in coordinates measurement;The function of time corresponding with the time method is called by sending module, And the default character instruction corresponding with the test platform of application performs described sender method and determines to send numerical value, and pass through institute State transmission interface transmission;Acquisition request is sent to the measurement interface according to the function of time by measurement module and measures number According to performing the measuring method using the character instruction and judge whether the measurement data is correct.It is hereby it is achieved that compatible more The test all-purpose of a test platform, improves testing efficiency.
To achieve these goals, the multi-platform universal test system of third aspect present invention embodiment, including:Test is flat Platform, and multi-platform universal test device as described above.
The multi-platform universal test system of the embodiment of the present invention, is obtained and selected first by multi-platform universal test device The corresponding environmental model of test platform;Then identified according to default test case in the environmental model and send signal behaviour Make path and measuring signal courses of action, wherein, the test case includes:Time method, sending method and measuring method;Into And according to it is described transmission signal operation coordinates measurement described in test platform transmission interface, and according to the measuring signal operate road Footpath generates the measurement interface of the test platform;Then the function of time corresponding with the time method is called, and application is default Character instruction corresponding with the test platform perform described sender method and determine to send numerical value, and pass through the transmission interface Send;Acquisition request measurement data is finally sent to the measurement interface according to the function of time, using the character instruction Perform the measuring method and judge whether the measurement data is correct.Hereby it is achieved that the test of compatible multiple test platforms is led to With property, testing efficiency is improved.
The additional aspect of the present invention and advantage will be set forth in part in the description, and will partly become from the following description Obtain substantially, or recognized by the practice of the present invention.
Brief description of the drawings
Of the invention above-mentioned and/or additional aspect and advantage will become from the following description of the accompanying drawings of embodiments Substantially and it is readily appreciated that, wherein,
Fig. 1 is the flow chart of the multi-platform universal testing method of one embodiment of the invention;
Fig. 2 is the flow chart of the multi-platform universal testing method of another embodiment of the present invention;
Fig. 3 is the test frame schematic diagram of the multi-platform universal testing method shown in Fig. 2
Fig. 4 is the structure diagram of the multi-platform universal test device of one embodiment of the invention;
Fig. 5 is the structure diagram of the multi-platform universal test device of another embodiment of the present invention;
Fig. 6 is the structure diagram of the multi-platform universal test system of one embodiment of the invention.
Embodiment
The embodiment of the present invention is described below in detail, the example of the embodiment is shown in the drawings, wherein from beginning to end Same or similar label represents same or similar element or has the function of same or like element.Below with reference to attached The embodiment of figure description is exemplary, and is only used for explaining the present invention, and is not considered as limiting the invention.On the contrary, this The embodiment of invention includes falling into all changes in the range of the spirit and intension of attached claims, modification and equivalent Thing.
In the description of the present invention, it is to be understood that term " first ", " second " etc. are only used for description purpose, without It is understood that to indicate or implying relative importance.In the description of the present invention, it is necessary to which explanation, provides unless otherwise clear and definite And restriction, term " connected ", " connection " should be interpreted broadly, for example, it may be fixedly connected or be detachably connected, Or it is integrally connected;Can mechanically connect or be electrically connected;It can be directly connected, intermediary can also be passed through It is indirectly connected.For the ordinary skill in the art, the tool of above-mentioned term in the present invention can be understood with concrete condition Body implication.In addition, in the description of the present invention, unless otherwise indicated, " multiple " are meant that two or more.
Any process or method described otherwise above description in flow chart or herein is construed as, and represents to include Module, fragment or the portion of the code of the executable instruction of one or more the step of being used for realization specific logical function or process Point, and the scope of the preferred embodiment of the present invention includes other realization, wherein can not press shown or discuss suitable Sequence, including according to involved function by it is basic at the same time in the way of or in the opposite order, carry out perform function, this should be of the invention Embodiment person of ordinary skill in the field understood.
Below in conjunction with attached drawing description multi-platform universal testing method according to embodiments of the present invention, device and system.
Fig. 1 is the flow chart of the multi-platform universal testing method of one embodiment of the invention.
As shown in Figure 1, the multi-platform universal testing method includes:
Step 101, environmental model corresponding with the test platform selected is obtained.
Specifically, multi-platform universal testing method provided in an embodiment of the present invention is configured in multi-platform universal test device In, wherein, multi-platform universal test device carries out data interaction with test platform.First, the test platform pair with selection is obtained The environmental model answered, wherein, the type of test platform is very much, such as:MIL, SIL, HIL, wherein, MIL is model in ring test, Realized in PC machine;SIL is software in ring test, is realized in PC machine;HIL is hardware-in―the-loop test, in special test equipment Upper realization.
It should be noted that the mode for obtaining environmental model corresponding with the test platform selected is very much, can be more flat Deployed environment model generating means are concentrated in platform universal test device in advance, matching is automatically generated by environmental model generating means Environmental model;Or led by the communication interface between the default generating means with environmental model from environmental model generating means Enter matched environmental model.
Step 102, identified according to default test case in the environmental model and send signal operation path and measurement Signal operation path, wherein, the test case includes:Time method, sending method and measuring method.
The test case expression for being useful for multi-platform universal test is prestored in multi-platform universal test device, is made Multi-platform general test case is designed with test case expression, each test case includes:Time method, sender Method and measuring method, particular content are as shown in table 1:
Table 1
Referring to table 1, often row represents the cycle tests in a test case, and cycle tests quantity does not limit, measurement side It default can not be filled out at method and sending method, do not make any processing when not filling out.TX1, TX2 represent numerical value to be sent in upper table Signal name, can be substituted with actual name, and RX1, RX2, RX3 represent signal name to be measured, can be substituted with actual name.
Time method in table 1 includes:Absolute time, limit triggering, lasting wait, persistently send lasting wait, at random Absolute time, it is random limit triggering, it is random it is lasting wait or, it is random it is lasting send it is lasting wait, be described as follows:
First, absolute time:Absolute time refers to some specified time point on time shaft, the tool of point on a timeline Body position is related to previous 0 point of the time, as absolute time numerical value be 18, then it represents that the point distance setting 0 point of time away from From for 18s.
Second, limit triggering:Refer to some or multiple surveys for being limited to and measuring method agreement necessarily being had in certain time Signal data is measured, next cycle tests is then jumped to when getting the data in limiting time, if equal beyond limiting time Do not get the data can then judge row test not by, while jump to next cycle tests, will when redirecting generation Time that time redirected is as 0 point new of the time.For example it is definite value 2, RX1 to limit the sending method of triggered time as 5, TX1 It is definite value 1 in the test method of the row, then then represent to send 1 TX1=2, the feelings of RX1==1 can be received in 5s afterwards Condition, but uncertain is that specifically which is received at quarter in 5s, it is also possible to it can not receive, be judged to not passing through when can not receive.
3rd, it is lasting to wait:Refer to some or multiple letters all arranged always there are measuring method within the time of restriction Number measurement data, if having be not equal to agreement measurement data if be determined as test not by, but can continuous service to arrange Time terminates just to jump to next cycle tests.For example it is definite value 2 to continue the sending method that the stand-by period is 5, TX1, RX1 exists The test method of the row is definite value 1, then it represents that 1 TX1=2 sent, can persistently receive the situation of RX1==1 in 5s afterwards, If there is 1 RX1~=1 situation in 5s, it is judged to not passing through.
4th, it is lasting to send lasting wait:Refer to and sending method is constantly performed within the time of restriction, and all deposit always In the measurement data of some or multiple signals of measuring method agreement, it is determined as if having the measurement data for being not equal to agreement Test not by, but can continuous service terminate just to jump to next cycle tests to the designated time.Such as the time 5, TX1 Sending method between random value 2~3, RX1 the row test method be more than 1, then it represents that constantly make during 5s TX1 signals value between 2~3, while the RX in 5s>1, if there are RX1<=1 situation is then judged to not passing through.
5th, random absolute time:It is equal to absolute time, simply time value is the random value in the scope specified, This method is suitable for the situation that same use-case is run repeatedly, and different test effects can be obtained by being run multiple times.
6th, it is random to limit triggering:It is equal to restriction triggering, simply time value is the random value in the scope specified, This method is suitable for the situation that same use-case is run repeatedly, and different test effects can be obtained by being run multiple times.
7th, random lasting wait:It is equal to lasting wait, simply time value is the random value in the scope specified, This method is suitable for the situation that same use-case is run repeatedly, and different test effects can be obtained by being run multiple times.
8th, random lasting send persistently waits:It is equal to the lasting wait of lasting transmission, simply time value is specified In the range of random value, this method is suitable for same use-case situation about running repeatedly, by be run multiple times can obtain it is different Test effect.
It should be noted that institute's having time method letter of available customization or other symbols when specifically used carry out table Show, the identifier as computer identification.
Each signal to be sent has two kinds of values in sending method in table 1, and simulation value and manual value, simulation value are Refer to the numerical value that generates of environmental model closed loop, and using manual value when can then shield any number that simulation value transmission is specified. It is described as follows:
Firstth, constant is worth manually:Give a definite value specified.
Secondth, the random value between two numerical value:A random value is taken between two values.
Random value between three, array:An element is taken to be sent as numerical value in some array.
4th, the random value of probability is given:Random value is taken between two values, and delimits one again at the two several Scope, and to one probability of number in the range of this, so between the two numerical value during value, the interior number that draws the line is by value It may meet the probability of setting.
5th, by acquiescence graded:Can be by the graded of acquiescence to set-point.
6th, to inside gradient change of fixing time:Set-point can be changed within the given time.
7th, change by given step gradient:It can change according to given certain certain time change how many numerical quantities, Until set-point.
8th, simulation value is recovered:Assignment reset will be worth manually, and reuse simulation value transmission.
It should be noted that all sending methods letter of available customization or other symbols when specifically used carry out table Show, the identifier as computer identification.
The expression of measuring method in table 1 is divided into measurement data value and measurement decision logic relation, by selected measurement Data value forms measuring method with measurement decision logic relation.
Wherein, measurement data value is specific as follows
Firstth, store:When being chosen to be such value, do not measure and be not required to select measurement decision logic relation again, but The point data can be preserved in case judgement use afterwards, can store any number of points.
Secondth, read:The data stored before are read, the optional position of storage can be read.
3rd, constant value:One set-point.
Random value between four, the two numerical value:A random value is taken between two values.
Random value between five, array:An element is taken to be sent as numerical value in some array.
6th, the random value of probability is given:Random value is taken between two values, and delimits one again at the two several Scope, and to one probability of number in the range of this, so between the two numerical value during value, the interior number that draws the line is by value It may meet the probability of setting.
Wherein, measurement decision logic relation specifically includes:Be more than, be less than, being congruent to, being not equal to, being more than or equal to or, It is less than or equal to.
It should be noted that all measuring methods letter of available customization or other symbols when specifically used carry out table Show, the identifier as computer identification.
It can be seen from the above that forming cycle tests based on above-mentioned time method, sending method, measuring method, can give expression to several All test methods, test design.
According to default test case with the matched environmental model of test platform identification send signal operation path and Measuring signal courses of action, and be stored in multi-platform universal test device.
Step 103, according to the transmission signal operation coordinates measurement test platform transmission interface, and according to described Measuring signal courses of action generate the measurement interface of the test platform.
According to the transmission interface for sending the signal operation coordinates measurement test platform identified in environmental model, to pass through Crossing api function calls transmission interface to return to the transmission interface position.And grasped according to the measuring signal identified in environmental model Make the measurement interface of the coordinates measurement test platform, to call measurement interface to return to the measurement interface position by api function
Step 104, the function of time corresponding with the time method is called, and using the default and test platform pair The character instruction answered performs described sender method and determines to send numerical value, and is sent by the transmission interface.
After the transmission interface and measurement interface that generate test platform, you can perform testing process.Call and test first The corresponding function of time of time method in use-case, the function of time are to choose similar portion in institute having time method, identification institute Unique portion in having time method, is then included using one section of code, expresses institute's having time method.
Then, described sender method is performed using default character instruction corresponding with the test platform to determine to send number Value, and it is sent to by the transmission interface of test platform the transmission interface position of environmental model.
Step 105, acquisition request measurement data is sent to the measurement interface according to the function of time, using the word Symbol instruction performs the measuring method and judges whether the measurement data is correct.
To send after numerical value sent by transmission interface, according to the function of time tuning measure interface send data acquisition please Ask, when receiving the measurement data that measurement interface returns, using in character instruction implementation of test cases corresponding with test platform Measuring method judge from measurement interface return measurement data it is whether correct, if by measuring method judge know from measurement The measurement data that interface returns is correct, then is successfully tested, if judging to know the survey returned from measurement interface by measuring method Measure error in data, test crash.
The multi-platform universal testing method of the present embodiment, obtains environmental model corresponding with the test platform selected first; Then identified according to default test case in the environmental model and send signal operation path and measuring signal courses of action, Wherein, the test case includes:Time method, sending method and measuring method;And then according to the transmission signal operation road Footpath generates the transmission interface of the test platform, and the measurement of the test platform is generated according to the measuring signal courses of action Interface;Then the function of time corresponding with the time method is called, and applies default word corresponding with the test platform Symbol instruction performs described sender method and determines to send numerical value, and is sent by the transmission interface;Finally according to the time letter Number sends acquisition request measurement data to the measurement interface, is performed using the character instruction described in the measuring method judgement Whether measurement data is correct.Hereby it is achieved that the test all-purpose of compatible multiple test platforms, improves testing efficiency.
Fig. 2 is the flow chart of the multi-platform universal testing method of another embodiment of the present invention, and Fig. 3 is more shown in Fig. 2 The test frame schematic diagram of platform universal testing method.
Referring to shown in Fig. 2 and Fig. 3, which comprises the following steps:
Step 201, test case is generated, the test case includes at least one cycle tests, the cycle tests bag Include:Time method, sending method, measuring method.
Step 202, selected test platform mark is received, generate storehouse importing according to default test environment puts down with described The corresponding environmental model of station identification.
Step 203, identify that sending signal operation path and measurement believes in the environmental model according to the test case Number courses of action.
Step 204, according to the transmission signal operation coordinates measurement test platform transmission interface, and according to described Measuring signal courses of action generate the measurement interface of the test platform.
Step 205, the function of time corresponding with the time method is called, and using the default and test platform pair The character instruction answered performs described sender method and determines to send numerical value, and is sent by the transmission interface.
Step in the specific implementation process embodiment shown in Figure 1 of step 201 to step 205 in the present embodiment 101 to step 104, and details are not described herein again.
Step 206, it is determined whether the transmission interface feedback is received in the default period is sent completely response, if It is then to perform step 207, otherwise, performs step 208;
Step 207, acquisition request measurement data is sent to the measurement interface according to the function of time, using the word Symbol instruction performs the measuring method and judges whether the measurement data is correct.
Step 208, test failure signal is sent.
Specifically, in order to further improve the reliability of test, transmission numerical value is being passed through test interface by the present embodiment After transmission, it is determined whether transmission interface feedback is received in the default period is sent completely response, if receiving transmission Interface feedback is sent completely response, then explanation test normal operation, and then perform step 207, is surveyed by measuring interface Try, the step 105 in specific test process embodiment shown in Figure 1, details are not described herein again.If it is not received by transmission Interface feedback is sent completely response, then illustrates test run failure, that is, performs step 208, sends test failure signal, ensures The reliability and validity of test.
The multi-platform universal testing method of the present embodiment, imports corresponding environmental model according to test platform mark first; Then identified according to default test case and send signal operation path and measuring signal courses of action, and then according to transmission signal Courses of action generate the transmission interface of test platform, and the measurement interface of test platform is generated according to measuring signal courses of action; Then the function of time corresponding with time method is called, and transmission is performed using default character instruction corresponding with test platform Method determines to send numerical value, and is sent by transmission interface, if preset time, which receives, is sent completely response, according to the time Function sends acquisition request measurement data to measurement interface, and performing the measuring method using character instruction judges that measurement data is It is no correct;If preset time, which does not receive, is sent completely response, test failure signal is sent.It is hereby it is achieved that compatible multiple The test all-purpose of test platform, improves testing efficiency and reliability.
In order to realize above-described embodiment, the embodiment of the present invention also provides a kind of multi-platform universal test device.
Fig. 4 is the structure diagram of multi-platform universal test device according to an embodiment of the invention.
As shown in figure 4, the multi-platform universal test device includes:
Acquisition module 11, the corresponding environmental model of test platform for obtaining with selecting;
Identification module 12, signal operation path is sent for being identified according to default test case in the environmental model With measuring signal courses of action, wherein, the test case includes:Time method, sending method and measuring method;
It should be noted that the time method includes:
Absolute time, restriction triggering, lasting wait, the lasting wait of lasting transmission, random absolute time, random restriction are touched Hair, it is random lasting wait or, it is random lasting to send lasting wait.
The measuring method includes:
Measurement data value and measurement decision logic relation.
Described sender method includes:
Constant is worth manually, the random value between two numerical value, the random value between array, the random value of given probability, by acquiescence ladder Degree change, to inside gradient change of fixing time, by given step gradient change or, recover simulation value.
Generation module 13, for the transmission interface of the test platform according to the transmission signal operation coordinates measurement, and The measurement interface of the test platform is generated according to the measuring signal courses of action;
Sending module 14, for calling the function of time corresponding with the time method, and using the default and survey The corresponding character instruction of examination platform performs described sender method and determines to send numerical value, and is sent by the transmission interface;
Measurement module 15, should for sending acquisition request measurement data to the measurement interface according to the function of time The measuring method, which is performed, with the character instruction judges whether the measurement data is correct.
It should be noted that the foregoing explanation to multi-platform universal testing method embodiment is also applied for the embodiment Multi-platform universal test device, details are not described herein again.
The multi-platform universal test device of the embodiment of the present invention, obtains environment mould corresponding with the test platform selected first Type;Then identified according to default test case in the environmental model and send signal operation path and measuring signal operation road Footpath, wherein, the test case includes:Time method, sending method and measuring method;And then according to the transmission signal operation The transmission interface of test platform described in coordinates measurement, and according to the survey of the measuring signal courses of action generation test platform Measure interface;Then the function of time corresponding with the time method is called, and application is default corresponding with the test platform Character instruction performs described sender method and determines to send numerical value, and is sent by the transmission interface;Finally according to the time Function sends acquisition request measurement data to the measurement interface, and performing the measuring method using the character instruction judges institute Whether correct state measurement data.Hereby it is achieved that the test all-purpose of compatible multiple test platforms, improves testing efficiency.
Fig. 5 is the structure diagram of the multi-platform universal test device of another embodiment of the present invention.
As shown in figure 5, be based on shown in Fig. 4, the acquisition module 11, including:
Receiving unit 111, for receiving selected test platform mark;
Import unit 112, environment corresponding with the platform identification is imported for generating storehouse according to default test environment Model.
Further, described device further includes:
Confirm module 16, be used to determine whether to be sent completely sound in reception of the default period transmission interface feedback Should;
Reminding module 17, if for being sent completely response described in the period not reception, sends test failure Signal.
It should be noted that the foregoing explanation to multi-platform universal testing method embodiment is also applied for the embodiment Multi-platform universal test device, details are not described herein again.
The multi-platform universal test device of the embodiment of the present invention, imports corresponding environment mould according to test platform mark first Type;Then identified according to default test case and send signal operation path and measuring signal courses of action, and then according to transmission The transmission interface of signal operation coordinates measurement test platform, and connect according to the measurement of measuring signal courses of action generation test platform Mouthful;Then the function of time corresponding with time method is called, and the default character instruction corresponding with test platform of application performs Sending method determines to send numerical value, and is sent by transmission interface, if preset time, which receives, is sent completely response, basis The function of time sends acquisition request measurement data to measurement interface, and performing the measuring method using character instruction judges measurement number According to whether correct;If preset time, which does not receive, is sent completely response, test failure signal is sent.It is hereby it is achieved that compatible The test all-purpose of multiple test platforms, improves testing efficiency and reliability.
In order to realize above-described embodiment, the embodiment of the present invention also provides a kind of multi-platform universal test system.
Fig. 6 is the structure diagram of the multi-platform universal test system of one embodiment of the invention.
As shown in fig. 6, the multi-platform universal test system includes:Test platform 1, and multi-platform universal test device 2, Wherein, multi-platform universal test device 2 can use the multi-platform universal test device that above-described embodiment provides, test platform 1 The test platform involved in above-described embodiment can be used.
It should be noted that the foregoing explanation to multi-platform universal testing method embodiment is also applied for the embodiment Multi-platform universal test system, details are not described herein again.
The multi-platform universal test system of the embodiment of the present invention, is obtained and selected first by multi-platform universal test device The corresponding environmental model of test platform;Then identified according to default test case in the environmental model and send signal behaviour Make path and measuring signal courses of action, wherein, the test case includes:Time method, sending method and measuring method;Into And according to it is described transmission signal operation coordinates measurement described in test platform transmission interface, and according to the measuring signal operate road Footpath generates the measurement interface of the test platform;Then the function of time corresponding with the time method is called, and application is default Character instruction corresponding with the test platform perform described sender method and determine to send numerical value, and pass through the transmission interface Send;Acquisition request measurement data is finally sent to the measurement interface according to the function of time, using the character instruction Perform the measuring method and judge whether the measurement data is correct.Hereby it is achieved that the test of compatible multiple test platforms is led to With property, testing efficiency is improved.
It should be appreciated that each several part of the present invention can be realized with hardware, software, firmware or combinations thereof.Above-mentioned In embodiment, software that multiple steps or method can be performed in memory and by suitable instruction execution system with storage Or firmware is realized.If, and in another embodiment, can be with well known in the art for example, realized with hardware Any one of row technology or their combination are realized:With the logic gates for realizing logic function to data-signal Discrete logic, have suitable combinational logic gate circuit application-specific integrated circuit, programmable gate array (PGA), scene Programmable gate array (FPGA) etc..
In the description of this specification, reference term " one embodiment ", " some embodiments ", " example ", " specifically show The description of example " or " some examples " etc. means specific features, structure, material or the spy for combining the embodiment or example description Point is contained at least one embodiment of the present invention or example.In the present specification, schematic expression of the above terms is not Necessarily refer to identical embodiment or example.Moreover, particular features, structures, materials, or characteristics described can be any One or more embodiments or example in combine in an appropriate manner.
Although an embodiment of the present invention has been shown and described, it will be understood by those skilled in the art that:Not In the case of departing from the principle of the present invention and objective a variety of change, modification, replacement and modification can be carried out to these embodiments, this The scope of invention is limited by claim and its equivalent.

Claims (13)

1. a kind of multi-platform universal testing method, it is characterised in that comprise the following steps:
Obtain environmental model corresponding with the test platform selected;Wherein, in the middle part of collecting in advance in multi-platform universal test device Environmental model generating means are affixed one's name to, matched environmental model is automatically generated by environmental model generating means;Or by default Communication interface between environmental model generating means imports matched environmental model from environmental model generating means;
Identified according to default test case in the environmental model and send signal operation path and measuring signal courses of action, Wherein, the test case includes:Time method, sending method and measuring method;
According to the transmission interface of test platform described in the transmission signal operation coordinates measurement, and operated according to the measuring signal The measurement interface of test platform described in coordinates measurement;
The function of time corresponding with the time method is called, and applies default character instruction corresponding with the test platform Perform described sender method to determine to send numerical value, and sent by the transmission interface;
Acquisition request measurement data is sent to the measurement interface according to the function of time, institute is performed using the character instruction State measuring method and judge whether the measurement data is correct.
2. multi-platform universal testing method as claimed in claim 1, it is characterised in that the test platform of the acquisition and selection Corresponding environmental model, including:
Receive selected test platform mark;
Storehouse is generated according to default test environment and imports environmental model corresponding with the platform identification.
3. multi-platform universal testing method as claimed in claim 1, it is characterised in that sent out described by the transmission interface After sending, further include:
Determine whether to be sent completely response in reception of the default period transmission interface feedback;
If being sent completely response described in not received in the period, test failure signal is sent.
4. the multi-platform universal testing method as described in claim 1-3 is any, it is characterised in that the time method includes:
Absolute time, limit triggering, it is lasting wait, it is lasting send lasting waits, random absolute time, it is random limit trigger, with Machine persistently wait or, it is random lasting to send lasting wait.
5. the multi-platform universal testing method as described in claim 1-3 is any, it is characterised in that the measuring method includes:
Measurement data value and measurement decision logic relation.
6. the multi-platform universal testing method as described in claim 1-3 is any, it is characterised in that described sender method includes:
Constant is worth manually, the random value between two numerical value, the random value between array, the random value of given probability, becomes by acquiescence gradient Change, to inside gradient change of fixing time, by given step gradient change or, recover simulation value.
A kind of 7. multi-platform universal test device, it is characterised in that including:
Acquisition module, the corresponding environmental model of test platform for obtaining with selecting;Wherein, in multi-platform universal test device In in advance concentrate deployed environment model generating means, automatically generate matched environmental model by environmental model generating means;Or Person imports matched environment by the communication interface between the default generating means with environmental model from environmental model generating means Model;
Identification module, signal operation path and measurement are sent for being identified according to default test case in the environmental model Signal operation path, wherein, the test case includes:Time method, sending method and measuring method;
Generation module, for the transmission interface of the test platform according to the transmission signal operation coordinates measurement, and according to institute State the measurement interface that measuring signal courses of action generate the test platform;
Sending module, for calling the function of time corresponding with the time method, and using the default and test platform Corresponding character instruction performs described sender method and determines to send numerical value, and is sent by the transmission interface;
Measurement module, for sending acquisition request measurement data to the measurement interface according to the function of time, using described Character instruction performs the measuring method and judges whether the measurement data is correct.
8. multi-platform universal test device as claimed in claim 7, it is characterised in that the acquisition module, including:
Receiving unit, for receiving selected test platform mark;
Import unit, environmental model corresponding with the platform identification is imported for generating storehouse according to default test environment.
9. multi-platform universal test device as claimed in claim 7, it is characterised in that further include:
Confirm module, be used to determine whether to be sent completely response in reception of the default period transmission interface feedback;
Reminding module, if for being sent completely response described in the period not reception, sends test failure signal.
10. the multi-platform universal test device as described in claim 7-9 is any, it is characterised in that the time method includes:
Absolute time, limit triggering, it is lasting wait, it is lasting send lasting waits, random absolute time, it is random limit trigger, with Machine persistently wait or, it is random lasting to send lasting wait.
11. the multi-platform universal test device as described in claim 7-9 is any, it is characterised in that the measuring method includes:
Measurement data value and measurement decision logic relation.
12. the multi-platform universal test device as described in claim 7-9 is any, it is characterised in that described sender method includes:
Constant is worth manually, the random value between two numerical value, the random value between array, the random value of given probability, becomes by acquiescence gradient Change, to inside gradient change of fixing time, by given step gradient change or, recover simulation value.
A kind of 13. multi-platform universal test system, it is characterised in that including:Test platform, and as claim 7-12 is any The multi-platform universal test device.
CN201510729354.4A 2015-10-30 2015-10-30 multi-platform universal test method, device and system Active CN105205006B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201510729354.4A CN105205006B (en) 2015-10-30 2015-10-30 multi-platform universal test method, device and system
PCT/CN2016/102743 WO2017071519A1 (en) 2015-10-30 2016-10-20 Multi-platform general test method, apparatus and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510729354.4A CN105205006B (en) 2015-10-30 2015-10-30 multi-platform universal test method, device and system

Publications (2)

Publication Number Publication Date
CN105205006A CN105205006A (en) 2015-12-30
CN105205006B true CN105205006B (en) 2018-05-04

Family

ID=54952700

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510729354.4A Active CN105205006B (en) 2015-10-30 2015-10-30 multi-platform universal test method, device and system

Country Status (2)

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

Families Citing this family (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105205006B (en) * 2015-10-30 2018-05-04 北京新能源汽车股份有限公司 multi-platform universal test method, device and system
CN108490922B (en) * 2018-04-27 2020-03-24 北京新能源汽车股份有限公司 Generation method and device of unified diagnostic service test case
CN109144857A (en) * 2018-08-01 2019-01-04 武汉普利商用机器有限公司 Cross-platform test of heuristics method and system
CN109947658B (en) * 2019-04-03 2022-03-04 颜沿(上海)智能科技有限公司 Method and device for simulating real scene data generation
CN110471834B (en) * 2019-06-28 2024-05-28 平安银行股份有限公司 Credit card simulation test method under multi-transaction channel and related equipment
CN112180890B (en) * 2019-07-05 2022-01-07 北京新能源汽车股份有限公司 Test case generation method, device and equipment
CN110442522A (en) * 2019-08-05 2019-11-12 广州小鹏汽车科技有限公司 The method for generating test case and test method of functional requirement based on electric car
CN110531637A (en) * 2019-08-12 2019-12-03 东莞巨正源科技有限公司 Boiler Simulation construction method and Boiler Simulation based on Distributed Control System
CN110794813B (en) * 2019-11-18 2022-06-07 上海顺试汽车科技有限公司 In-loop real-time linkage testing method and system for electromechanical parts
CN111258827B (en) * 2020-01-14 2024-01-12 宁波吉利汽车研究开发有限公司 Interface model determining method and device, electronic equipment and storage medium
CN113900922A (en) * 2020-06-22 2022-01-07 深圳兆日科技股份有限公司 Method, device, equipment and medium for testing application program interface of multi-platform application
CN112667494A (en) * 2020-12-08 2021-04-16 上海纳恩汽车技术股份有限公司 Automobile UDS automatic testing method and system based on configuration table and storage medium
CN113360391A (en) * 2021-06-24 2021-09-07 上海真虹信息科技有限公司 Embedded software black box testing method based on RT-Linux
CN115060985B (en) * 2022-06-21 2023-03-24 北京电磁方圆科技有限公司 Method and device for testing multi-channel antenna
CN115291587B (en) * 2022-07-18 2024-07-23 重庆长安汽车股份有限公司 Platform software model architecture based on multi-HIL test system, automobile, computer readable storage medium and electronic equipment
CN117915376B (en) * 2024-03-18 2024-06-04 欧智通科技股份有限公司 WiFi signal testing method

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103577907A (en) * 2012-07-24 2014-02-12 阿里巴巴集团控股有限公司 Continuous integration testing method and system
CN103713282A (en) * 2013-12-12 2014-04-09 中国人民解放军海军工程大学 Automatic test system of video auto-cancellation device based on general test platform
CN104536856A (en) * 2014-12-12 2015-04-22 北京新能源汽车股份有限公司 Method and device for generating environment model for automobile controller test
CN104834595A (en) * 2015-02-15 2015-08-12 网易(杭州)网络有限公司 Visual automatic test method and system
CN104875629A (en) * 2015-04-23 2015-09-02 北京新能源汽车股份有限公司 Gear shifting impact implementation method and gear shifting control device of electric automobile

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000074982A (en) * 1998-09-01 2000-03-14 Honda Motor Co Ltd Thermal stress tester of semiconductor for electric power
US8572437B2 (en) * 2005-07-20 2013-10-29 International Business Machines Corporation Multi-platform test automation enhancement
CN103198009B (en) * 2012-01-04 2016-09-07 中国移动通信集团公司 A kind of universal testing method, system and related device
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
CN105205006B (en) * 2015-10-30 2018-05-04 北京新能源汽车股份有限公司 multi-platform universal test method, device and system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103577907A (en) * 2012-07-24 2014-02-12 阿里巴巴集团控股有限公司 Continuous integration testing method and system
CN103713282A (en) * 2013-12-12 2014-04-09 中国人民解放军海军工程大学 Automatic test system of video auto-cancellation device based on general test platform
CN104536856A (en) * 2014-12-12 2015-04-22 北京新能源汽车股份有限公司 Method and device for generating environment model for automobile controller test
CN104834595A (en) * 2015-02-15 2015-08-12 网易(杭州)网络有限公司 Visual automatic test method and system
CN104875629A (en) * 2015-04-23 2015-09-02 北京新能源汽车股份有限公司 Gear shifting impact implementation method and gear shifting control device of electric automobile

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Maximizing Test Asset Re-Use across MiL,SiL,and HiL Development Platforms;Pjeter Vuli;《SAE International》;20100412;第1-5页 *

Also Published As

Publication number Publication date
CN105205006A (en) 2015-12-30
WO2017071519A1 (en) 2017-05-04

Similar Documents

Publication Publication Date Title
CN105205006B (en) multi-platform universal test method, device and system
CN109408384A (en) Test method, device, processor and the electronic device of software application
CN104391797B (en) The recognition methods of GUI controls and device
CN105717439B (en) Chip detecting method and system
CN105320591B (en) Code detection method and device
CN104199773B (en) Obtain the method and device of code coverage information
CN105787364B (en) Automatic testing method, device and system for tasks
CN108845930A (en) Interface operation test method and device, storage medium and electronic device
CN106095673A (en) Automated testing method based on WEB interface and system
CN109542761A (en) Evaluation of Software Quality, device and storage medium
CN107943707A (en) Test method, device and the storage medium and terminal of behavior tree
CN109165170A (en) A kind of method and system automating request for test
CN106980571A (en) The construction method and equipment of a kind of test use cases
CN110163225A (en) It is a kind of that package detection and recognition methods, apparatus and system are mixed based on cloud platform
CN109688033A (en) A kind of network bandwidth evaluating method, device, system and storage medium
CN108628732B (en) Traversal test method and device for application interface control
CN108897647A (en) Test macro, test method and device
CN105092992A (en) Method and device for conducting vector-controlled test on ATE (automatic test equipment)
CN109800169A (en) Test case obtaining method and device, readable storage medium and electronic equipment
CN108292254A (en) Technology for the operation for verifying equipment
CN107168760B (en) The variable detection method and device of language
CN108804271A (en) Interface tolerating measure method and device
CN113778890B (en) Code testing method and device, electronic equipment and storage medium
CN106557419A (en) The method of testing and device of program
CN106168924A (en) Software testing method and device and electronic equipment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant