CN109327354A - A kind of method, apparatus and test macro generating signal transmitted test use-case - Google Patents

A kind of method, apparatus and test macro generating signal transmitted test use-case Download PDF

Info

Publication number
CN109327354A
CN109327354A CN201811157784.3A CN201811157784A CN109327354A CN 109327354 A CN109327354 A CN 109327354A CN 201811157784 A CN201811157784 A CN 201811157784A CN 109327354 A CN109327354 A CN 109327354A
Authority
CN
China
Prior art keywords
signal
target
list
received
name
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.)
Granted
Application number
CN201811157784.3A
Other languages
Chinese (zh)
Other versions
CN109327354B (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 CN201811157784.3A priority Critical patent/CN109327354B/en
Publication of CN109327354A publication Critical patent/CN109327354A/en
Application granted granted Critical
Publication of CN109327354B publication Critical patent/CN109327354B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L2012/40208Bus networks characterized by the use of a particular bus standard
    • H04L2012/40215Controller Area Network CAN

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment provides a kind of method, apparatus and test macro for generating signal transmitted test use-case, wherein, method includes: to obtain for recording the forward signal list of the first signal group to be forwarded of forwarding required for target controller and the DBC file for the every CAN domain being connected with target controller;According to every DBC file and forward signal list, determines target forward signal group and generate Signal Message Address list;Environmental model parsing is carried out according to Signal Message Address list, determines path of each target forward signal group in environmental model, and generate use-case signal list;Test case is generated according to use-case signal list.Technical solution provided by the embodiment of the present invention only needs manually to determine without the governed echo signal group of evident regularity, achieve that writing for the test case applied to target controller, avoid many and diverse labour of hand-written test case, improve test case writes speed and accuracy, and then shortens test period.

Description

A kind of method, apparatus and test macro generating signal transmitted test use-case
Technical field
The present invention relates to the field of test technology, in particular to a kind of method, apparatus for generating signal transmitted test use-case and Test macro.
Background technique
The controller of multiple CAN (controller local area network, Controller Area Network) domain is connected on automobile (such as entire car controller) generally requires some specific CAN signals to be forwarded to another domain from a domain.Signal exists Forwarding front and back, attribute are consistent, and there is no complicated logics.But if forward signal is more, conventionally employed is manual With writing test case larger workload is easy error, and can not be to being forwarded signal each when writing test case DBC (database CAN, Data Base Controller Area Network) file, that is, CAN network information describes in file Consistency is checked that only having arrived when test is completed can just find the problem, so that the larger workload of test and consumption Time is longer, extends test period.
Summary of the invention
Technical problems to be solved of the embodiment of the present invention are to provide a kind of method, apparatus for generating signal transmitted test use-case And test macro, when solving to carry out signal transmitted test, speed existing for current traditional handwriting test case and accurate Test period longer problem caused by the deficiency of degree.
In order to solve the above technical problems, the embodiment of the invention provides a kind of method for generating signal transmitted test use-case, Include:
Obtain for record the first signal group to be forwarded of forwarding required for target controller forward signal list and with The DBC file for every CAN domain that target controller is connected;
According to every DBC file and forward signal list, determines target forward signal group and generates Signal Message Address list, Target forward signal group includes that target received signal and target send signal;
Environmental model parsing is carried out according to Signal Message Address list, determines each target forward signal group in environmental model Path, and generate use-case signal list;
Test case is generated according to use-case signal list.
Specifically, method as described above obtains the first letter to be forwarded for recording forwarding required for target controller In the step of forward signal list of number group, the first signal group to be forwarded includes: that the first signal to be received and first are to be sent Signal;
Every a line of forward signal list records the signal message of one first signal group to be forwarded, and signal message at least wraps Include: the signal name of the first signal to be received, the CAN domain information of the first signal to be received, the first signal to be sent signal The CAN domain information of title and the first signal to be sent.
Preferably, method as described above determines target forwarding letter according to every DBC file and forward signal list Number group and the step of generating Signal Message Address list includes:
By the second signal to be received relevant to target controller in every DBC file and the category of the second signal to be received Property information is stored into reception signal list corresponding with DBC file, will be relevant to target controller in every DBC file The attribute information of second signal to be sent and the second signal to be sent is stored to transmission signal list corresponding with DBC file In, attribute information includes: signal name, signal sending cycle, signal length, signal accuracy, signal offset, signal maximum And signal minimum;
Reception signal list corresponding to every DBC file is successively chosen as first object and receives signal list, removes quilt Transmission signal list corresponding to other DBC files except the DBC file of selection sends signal list as first object, and First object is successively received to the second signal to be received and first object hair for receiving signal in signal list as first object One second signal to be sent for sending signal as first object in the number of delivering letters list carries out the comparison of signal name, obtains first Comparison result;
If the first comparison result is that the main body for the signal name that first object receives signal and first object send signal The main body of signal name is identical, then first object is received to the target property information of signal and the mesh of first object transmission signal Mark attribute information is compared, and obtains the second comparison result, and target property information includes: that signal length, signal accuracy, signal are inclined Shifting amount, signal maximum and signal minimum;
If the second comparison result is that first object receives the target property information of signal and the mesh of first object transmission signal It is identical to mark attribute information, it is determined that first object receives signal and first object sends signal as a target forward signal group;
The CAN domain information of signal is received according to first object, first object receives signal and receives signal in first object Position, first object in list receive the CAN domain information of signal and first object sends signal and sends in first object Position in signal list generates Signal Message Address list.
Preferably, method as described above compares when the first object in each target received signal list receives signal To after the completion, method further include:
According to the CAN domain information of the first signal to be received in the every a line of forward signal list, chooses and be located at same CAN Reception signal list in domain is as the second target received signal list;
It is used as the second target to connect with each in the second target received signal list the signal name of the first signal to be received The signal name of second signal to be received of the collection of letters number is successively compared, and obtains third comparison result;
When the main body and the second target received signal list of the signal name that third comparison result is the first signal to be received In one second target received signal signal name main body it is identical when, according to first object send signal CAN domain believe Breath chooses the transmission signal list being located in same CAN domain and sends signal list as the second target;
The signal name of first signal to be sent and the second target are sent each as the second target in signal list The signal name for sending the second signal to be sent of signal is successively compared, and obtains the 4th comparison result;
When the main body for the signal name that the 4th comparison result is the first signal to be sent and the second target send signal list In one second target send signal signal name main body it is identical when, obtain the second target received signal objective attribute target attribute letter Breath and the second target send the target property information of signal;
If the target property information of the second target received signal is identical as the second target transmission target property information of signal, Then determining that the second target received signal and the second target send signal is a target forward signal group;
The CAN domain information of second target received signal, the second target received signal are arranged in the second target received signal The CAN domain information of position, the second signal to be sent in table and the second signal to be sent are in the second target transmission signal train Position in table is stored into Signal Message Address list.
Specifically, first object is successively received in signal list and receives letter as first object by method as described above Number the second signal to be received and first object send in signal list as the one second to be sent of first object transmission signal After the step of signal carries out the comparison of signal name, obtains the first comparison result, further includes:
If the first comparison result is that any first object sends the signal name of signal and the letter of first object reception signal Number title is all different, then chooses next first object and receive signal and successively send signal with first object and carry out signal name It compares.
Further, first object is received the target property information and first object of signal by method as described above After the step of target property information of transmission signal is compared, obtains the second comparison result, further includes:
If the second comparison result is that first object receives the target property information of signal and the mesh of first object transmission signal It is different to mark attribute information, then stops being compared and generating for reminding Test Engineer to check DBC file and place CAN net Whether correct first prompt information of the network protocol in domain.
Specifically, method as described above arranges the signal name of the first signal to be received and the second target received signal After the step of signal name of every one second signal to be received is successively compared, obtains third comparison result in table, also wrap It includes:
If third comparison result is in the signal name and any second target received signal list of the first signal to be received The signal name of the second target received signal when being all different, stopping is compared and generates for reminding Test Engineer to examine Look into the network protocol and whether correct second prompt information of forward signal list of DBC file and place CAN domain.
Further, the signal name of the first signal to be sent and the second target are sent signal by method as described above After the step of signal name of the second signal to be sent in list is successively compared, obtains four comparison results, also wrap It includes:
If the 4th comparison result is that the signal name of the first signal to be sent and the second target send appointing in signal list When the signal name that one second target sends signal is all different, stopping is compared and generates for reminding Test Engineer to examine Look into the network protocol and the whether correct third prompt information of forward signal list of DBC file and place CAN domain.
Specifically, method as described above obtains the target property information and the second target of the second target received signal After the step of sending the target property information of signal, further includes:
If the target property information of the second target received signal and the second target send the target property information of signal not It is identical, then generate the network protocol whether correct for reminding Test Engineer to check DBC file and place CAN domain Four prompt informations.
Preferably, method as described above carries out environmental model parsing to Signal Message Address list, determines each target forwarding Path of the signal group in environmental model, and the step of generating use-case signal list includes:
Environmental model parsing is successively carried out according to the target forward signal group stored by a line every in Signal Message Address list, is obtained The corresponding second signal title of signal is sent to the first signal name corresponding with target received signal and with target, In the routing information of target received signal is carried in the first signal name, carry target in second signal title and send signal Routing information;
The list of use-case signal is generated according to every one first signal name and each second signal title.
Preferably, method as described above, the target line number of test case is according to theoretical line number and default test value Number determines, wherein theoretical line number is true by the first preset algorithm according to signal maximum, signal minimum and signal accuracy It is fixed;
When theoretical line number is less than or equal to default test value number, target line number is theoretical line number, and target at this time The value of reception signal and target transmission signal is all values from signal minimum to signal maximum;
When theoretical line number is greater than default test value number, target line number tests value number, and mesh at this time to be default The value that the tag splice collection of letters number and target send signal includes: signal maximum, signal minimum, the first numerical value and the second number Value, wherein the first numerical value is to be obtained according to signal maximum and signal accuracy by the second preset algorithm, second value is root It is obtained according to signal minimum and signal accuracy by third preset algorithm.
Specifically, method as described above, the first preset algorithm are as follows:
P=(N1-N2)/W+1
Wherein, P is theoretical line number;
N1For signal maximum;
N2For signal minimum;
W is the numerical value of signal accuracy.
Specifically, method as described above, the second preset algorithm are as follows:
Na1=N1-i1W
Third preset algorithm are as follows:
Na2=N2+i2W
Wherein, Na1For the first numerical value;
Na2For second value;
N1For signal maximum;
N2For signal minimum;
W is the numerical value of signal accuracy;
i1It successively takes 1 to the natural number between (n-1)/2;
i2It successively takes 1 to the natural number between (n-2)/2;
N is default test value number.
Preferably, method as described above, every a line of test case include: timestamp, power-on and power-off Signal Message Address, target It receives signal and target sends signal;
Wherein, timestamp sends the sum of the sending cycle of signal since the second row for target received signal and target.
Another preferred embodiment of the invention additionally provides a kind of test device, comprising:
Module is obtained, for obtaining the forwarding of the first signal group to be forwarded for recording forwarding required for target controller The database CAN file DBC of signal list and each controller local area network CAN domain being connected with target controller;
First processing module, for determining target forward signal group simultaneously according to every DBC file and forward signal list Signal Message Address list is generated, target forward signal group includes that target received signal and target send signal;
Second processing module determines each target forwarding letter for carrying out environmental model parsing according to Signal Message Address list Number path of the group in environmental model, and generate use-case signal list;
Third processing module, for generating test case according to use-case signal list.
Preferably, test device as described above, first processing module include:
First processing submodule, for by the second signal to be received relevant to target controller in every DBC file with And second the attribute information of signal to be received store into reception signal list corresponding with DBC file, by every DBC file In the attribute information of the second signal to be sent relevant to target controller and the second signal to be sent store to DBC file In corresponding transmission signal list, attribute information include: signal name, signal sending cycle, signal length, signal accuracy, Signal offset, signal maximum and signal minimum;
Second processing submodule, for successively choosing reception signal list corresponding to every DBC file as the first mesh Tag splice collection of letters list, transmission signal list corresponding to other DBC files in addition to the DBC file being selected is as first Target sends signal list, and successively receives first object in signal list as the second waiting of first object reception signal Number one second signal to be sent sent in signal list as first object transmission signal with first object of collecting mail carries out signal The comparison of title obtains the first comparison result;
Third handle submodule, if for the first comparison result be first object receive signal signal name main body with The main body that first object sends the signal name of signal is identical, then first object is received to the target property information and the of signal The target property information that one target sends signal is compared, and obtains the second comparison result, target property information includes: Chief Signal Boatswain Degree, signal accuracy, signal offset, signal maximum and signal minimum;
Fourth process submodule, if being the target property information and that first object receives signal for the second comparison result The target property information that one target sends signal is identical, it is determined that it is one that first object, which receives signal and first object transmission signal, Target forward signal group;
5th processing submodule, for receiving the CAN domain information of signal according to first object, first object receives signal The position in signal list is received in first object, first object receives the CAN domain information of signal and first object is sent Signal sends the position in signal list in first object and generates Signal Message Address list.
Preferably, test device as described above, first processing module further include:
6th processing submodule, for the CAN domain according to the first signal to be received in the every a line of forward signal list Information chooses the reception signal list being located in same CAN domain as the second target received signal list;
7th processing submodule, by the signal name of the first signal to be received with it is each in the second target received signal list The signal name of the second signal to be received as the second target received signal is successively compared, and obtains third comparison result;
8th processing submodule, for the main body and the when the signal name that third comparison result is the first signal to be received When the main body of the signal name of one second target received signal in two target received signal lists is identical, sent out according to first object The CAN domain information for the number of delivering letters chooses the transmission signal list being located in same CAN domain and sends signal train as the second target Table;
9th processing submodule, for sending the signal name of the first signal to be sent and the second target in signal list Each signal name of the second signal to be sent for sending signal as the second target be successively compared, obtain the 4th comparison As a result;
Tenth processing submodule, for the main body and the when the signal name that the 4th comparison result is the first signal to be sent When the main body for the signal name that one second target in the transmission signal list of two targets sends signal is identical, obtains the second target and connect The target property information and the second target of the collection of letters number send the target property information of signal;
11st processing submodule, believes if sending for the target property information of the second target received signal and the second target Number target property information it is identical, it is determined that it is target forwarding letter that the second target received signal and the second target, which send signal, Number group;
12nd processing submodule, for by the CAN domain information of the second target received signal, the second target received signal The CAN domain information and the second signal to be sent of position, the second signal to be sent in the second target received signal list The position in signal list is sent in the second target to store into Signal Message Address list.
Preferably, test device as described above, Second processing module include:
13rd processing submodule, for successively according to a line every in Signal Message Address list stored by target forward signal Group carries out environmental model parsing, obtains the first signal name corresponding with target received signal and sends signal phase with target Corresponding second signal title, wherein the routing information of target received signal is carried in the first signal name, second signal name The routing information that target sends signal is carried in title;
14th processing submodule, for generating use-case according to every one first signal name and each second signal title Signal list.
Specifically, test device as described above, first processing module further include:
15th processing submodule, if for the first comparison result be any first object send signal signal name with The signal name that first object receives signal is all different, then chooses next first object reception signal and successively send out with first object The comparison of the number of delivering letters progress signal name.
Further, test device as described above, first processing module further include:
16th processing submodule, if for the second comparison result be first object receive signal target property information with The target property information that first object sends signal is different, then stops being compared and generating for reminding Test Engineer to check Whether correct first prompt information of the network protocol of DBC file and place CAN domain.
Specifically, test device as described above, first processing module further include:
17th processing submodule, if for the signal name and any that third comparison result is the first signal to be received When the signal name of the second target received signal in two target received signal lists is all different, stopping is compared and generates For reminding Test Engineer to check whether the network protocol of DBC file and place CAN domain and forward signal list are correct The second prompt information.
Further, test device as described above, first processing module further include:
18th processing submodule, if being the signal name and the second mesh of the first signal to be sent for the 4th comparison result When the signal name that mark sends any second target transmission signal in signal list is all different, stopping is compared and generates For reminding Test Engineer to check whether the network protocol of DBC file and place CAN domain and forward signal list are correct Third prompt information.
Specifically, test device as described above, first processing module further include:
19th processing submodule, if being sent for the target property information of the second target received signal and the second target The target property information of signal is not identical, then generates for reminding Test Engineer to check DBC file and place CAN domain Whether correct 4th prompt information of network protocol.
Further embodiment of the invention additionally provides a kind of computer readable storage medium, computer-readable storage medium It is stored with computer program in matter, realizes that the signal transmitted test as described above that generates is used when computer program is executed by processor The step of method of example.
Another preferred embodiment of the invention additionally provides a kind of test macro, comprising: test device as described above.
Compared with prior art, a kind of method, apparatus generating signal transmitted test use-case provided in an embodiment of the present invention And test macro, at least have the advantages that
In an embodiment of the present invention, test device can obtain the forwarding applied to target controller before being tested The DBC file of signal list and the every CAN domain being connected with target controller, wherein in forwarding list first to Forward signal group is between the signal name before being forwarded but forwarded by target controller and the signal name after forwarding without obvious rule Restrain governed one group of signal;Test device target controller is received according to forward signal list and every DBC file and The signal of transmission is judged, determines the target forward signal group for needing to forward by target controller, and forward according to target Signal group carries out environmental model parsing and generates the list of use-case signal, and then obtains the test case of each target forward signal group, So that technical staff only needs manually to determine without the governed echo signal group of evident regularity, so that it may realize to being applied to target The test case for the target forward signal group that controller is forwarded is write, and is forwarded when avoiding hand-written test case to target Signal group carries out many and diverse labour for determining and writing one by one, and improve test case writes speed and accuracy, and then contracts Short test period.
Detailed description of the invention
Fig. 1 is one of the flow diagram of method of generation signal transmitted test use-case of the invention;
Fig. 2 is the two of the flow diagram of the method for generation signal transmitted test use-case of the invention;
Fig. 3 is the three of the flow diagram of the method for generation signal transmitted test use-case of the invention;
Fig. 4 is the four of the flow diagram of the method for generation signal transmitted test use-case of the invention;
Fig. 5 is the structural schematic diagram of test device of the invention.
Specific embodiment
To keep the technical problem to be solved in the present invention, technical solution and advantage clearer, below in conjunction with attached drawing and tool Body embodiment is described in detail.In the following description, such as specific configuration is provided and the specific detail of component is only In order to help comprehensive understanding the embodiment of the present invention.It therefore, it will be apparent to those skilled in the art that can be to reality described herein Example is applied to make various changes and modifications without departing from scope and spirit of the present invention.In addition, for clarity and brevity, it is omitted pair The description of known function and construction.
It should be understood that " one embodiment " or " embodiment " that specification is mentioned in the whole text mean it is related with embodiment A particular feature, structure, or characteristic is included at least one embodiment of the present invention.Therefore, occur everywhere in the whole instruction " in one embodiment " or " in one embodiment " not necessarily refer to identical embodiment.In addition, these specific features, knot Structure or characteristic can combine in any suitable manner in one or more embodiments.
In various embodiments of the present invention, it should be appreciated that the size of the serial number of following each processes is not meant to execute suitable Sequence it is successive, the execution of each process sequence should be determined by its function and internal logic, the implementation without coping with the embodiment of the present invention Process constitutes any restriction.
It should be understood that the terms "and/or", only a kind of incidence relation for describing affiliated partner, expression can deposit In three kinds of relationships, for example, A and/or B, can indicate: individualism A exists simultaneously A and B, these three situations of individualism B. In addition, character "/" herein, typicallys represent the relationship that forward-backward correlation object is a kind of "or".
In embodiment provided herein, it should be appreciated that " B corresponding with A " indicates that B is associated with A, can be with according to A Determine B.It is also to be understood that determine that B is not meant to determine B only according to A according to A, it can also be according to A and/or other information Determine B.
Referring to Fig. 1, a preferred embodiment of the present invention provides a kind of method for generating signal transmitted test use-case, packet It includes:
Step 1001, the forward signal for recording the first signal group to be forwarded of forwarding required for target controller is obtained The DBC file of list and the every CAN domain being connected with target controller;
Step 1002, it according to every DBC file and forward signal list, determines target forward signal group and generates signal Address list, target forward signal group include that target received signal and target send signal;
Step 1003, environmental model parsing is carried out according to Signal Message Address list, determines each target forward signal group in ring Path in the model of border, and generate use-case signal list;
Step 1004, test case is generated according to use-case signal list.
In an embodiment of the present invention, test device can obtain the forwarding applied to target controller before being tested The DBC file of signal list and the every CAN domain being connected with target controller, wherein in forwarding list first to Forward signal group is between the signal name before being forwarded but forwarded by target controller and the signal name after forwarding without obvious rule Restrain governed one group of signal;Test device target controller is received according to forward signal list and every DBC file and The signal of transmission is judged, determines the target forward signal group for needing to forward by target controller, and forward according to target Signal group carries out environmental model parsing and generates the list of use-case signal, and then obtains the test case of each target forward signal group, So that technical staff only needs manually to determine without the governed echo signal group of evident regularity, so that it may realize to being applied to target The test case for the target forward signal group that controller is forwarded is write, and is forwarded when avoiding hand-written test case to target Signal group carries out many and diverse labour for determining and writing one by one, and improve test case writes speed and accuracy, and then contracts Short test period.
Specifically, method as described above obtains the first letter to be forwarded for recording forwarding required for target controller In the step of forward signal list of number group, the first signal group to be forwarded includes: that the first signal to be received and first are to be sent Signal;
Every a line of forward signal list records the signal message of one first signal group to be forwarded, and signal message at least wraps Include: the signal name of the first signal to be received, the CAN domain information of the first signal to be received, the first signal to be sent signal The CAN domain information of title and the first signal to be sent.
In an embodiment of the present invention, the first signal group to be forwarded includes: that the first signal to be received and first are to be sent Signal, wherein the first signal to be received needs to continue the signal forwarded and after forwarding after receiving the signal for target controller The signal of evident regularity is not present between signal name before title and forwarding, the first signal to be sent is target controller reception Evident regularity is not present between signal name after needing to be forwarded and forward after to a signal and the signal name before forwarding Signal, i.e., target controller, which receives, needs to send the first signal to be sent after the first signal to be received and completes turning for signal Hair, and evident regularity is not present between the first signal to be received and the signal name of the first signal to be sent.
Every a line of forward signal list records the signal message of one first signal group to be forwarded, advantageously ensure that first to The pairing for receiving signal and the first signal to be forwarded avoids the occurrence of the predetermined first signal group to be forwarded and is actually turned The signal group of hair mismatches situation, includes signal name and the CAN domain information of each signal in signal message convenient for determination Domain position locating for first signal to be sent and the first signal to be received simultaneously carries out subsequent comparison.
Referring to fig. 2, it is preferable that method as described above determines mesh according to every DBC file and forward signal list It marks forward signal group and includes: the step of generating Signal Message Address list
Step 2001, the second signal to be received relevant to target controller in every DBC file and second is waiting Collect mail number attribute information store into reception signal list corresponding with DBC file, by every DBC file with target control The attribute information of relevant second signal to be sent of device processed and the second signal to be sent is stored to hair corresponding with DBC file In the number of delivering letters list, attribute information include: signal name, signal sending cycle, signal length, signal accuracy, signal offset, Signal maximum and signal minimum;
Step 2002, reception signal list corresponding to every DBC file, which is successively chosen, as first object receives signal List, transmission signal list corresponding to other DBC files in addition to the DBC file being selected is sent as first object to be believed Number list, and successively receive first object in signal list as the second signal to be received of first object reception signal and the One target sends the comparison that one second signal to be sent for sending signal as first object in signal list carries out signal name, Obtain the first comparison result;
Step 2003, if the first comparison result is that the main body for the signal name that first object receives signal and first object are sent out The main body of the signal name for the number of delivering letters is identical, then first object is received the target property information of signal and first object is sent The target property information of signal is compared, and obtains the second comparison result, and target property information includes: signal length, signal essence Degree, signal offset, signal maximum and signal minimum;
Step 2004, if the second comparison result is that first object receives the target property information of signal and first object is sent The target property information of signal is identical, it is determined that first object receives signal and first object sends signal as target forwarding letter Number group;
Step 2005, the CAN domain information of signal is received according to first object, first object receives signal in first object Receive the position in signal list, first object receives the CAN domain information of signal and first object sends signal first Target sends the position in signal list and generates Signal Message Address list.
In an embodiment of the present invention, it is carried out according to the transmitting-receiving relationship of signal and target controller in every DBC file Classify and store to reception signal list corresponding with DBC file or send in signal list, wherein passes through signal list Title adds prefix or suffix, distinguishes to the corresponding reception signal list of different DBC files or transmission signal list, excellent Selection of land, prefix or suffix can use the abbreviation of the CAN domain where DBC file;After the completion of whole Modulation recognitions, selection wherein one Reception signal list corresponding to DBC file receives signal list, its in addition to the DBC file being selected as first object Transmission signal list corresponding to his DBC file sends signal list as first object, successively chooses first object and receives letter The second signal to be received of signal is received as first object in number list and first object sends and is used as first in signal list One second signal to be sent that target sends signal carries out the comparison of signal name, to selected first object receive signal and Whether the second echo signal is that one group of target forward signal group is tentatively judged, if first object receives the signal name of signal Main body and first object send that the main body of signal name of signal is identical, then the first object receives signal and the first object One group of target forward signal group can be constituted between signal by sending, and receive signal to the first object at this time and the first object is sent out The target property information for the number of delivering letters is judged again, if the target property information of the two is consistent, it is determined that the first object connects It is one group of target forward signal group that the collection of letters number and the first object, which send signal, receives signal and first according to first object Target sends the CAN domain information of information and receives the position life in signal list or first object transmission list in first object At Signal Message Address list, and repeat the above steps, until all DBC files it is corresponding receive in signal list it is second to be received Signal is completed to compare, that is, completes the determination of general category target forward signal group, wherein general category target forward signal group refers to letter Signal name does not change or follows certain apparent rule after number before forwarding, such as: only part prefix or suffix into Row changes.It is such compare one by one by way of can accurately and comprehensively determine that each first object sends signal and first object The target forward signal group of signal composition is received, avoiding the occurrence of omission causes to be subsequently generated test case and according to test case Occur omitting when being tested causing to test incomplete happen.Reduce many and diverse of artificial determining target forward signal group Labour, improve test case writes speed and accuracy, and then shortens test period.
Referring to Fig. 3, it is preferable that method as described above, when the first object in each target received signal list receives After the completion of signal compares, method further include:
Step 3001, according to the CAN domain information of the first signal to be received in the every a line of forward signal list, position is chosen In the reception signal list in same CAN domain as the second target received signal list;
Step 3002, is used as by each in the signal name of the first signal to be received and the second target received signal list The signal name of the signal to be received of the second of two target received signals is successively compared, and obtains third comparison result;
Step 3003, when the main body and the second intended recipient of the signal name that third comparison result is the first signal to be received When the main body of the signal name of one second target received signal in signal list is identical, signal is sent according to first object CAN domain information chooses the transmission signal list being located in same CAN domain and sends signal list as the second target;
Step 3004, the signal name of the first signal to be sent and the second target are sent to each conduct in signal list The signal name that second target sends the second signal to be sent of signal is successively compared, and obtains the 4th comparison result;
Step 3005, when the main body for the signal name that the 4th comparison result is the first signal to be sent and the second target are sent When the main body for the signal name that one second target in signal list sends signal is identical, the mesh of the second target received signal is obtained It marks attribute information and the second target sends the target property information of signal;
Step 3006, if the target property information of the second target received signal and the second target send the objective attribute target attribute of signal Information is identical, it is determined that the second target received signal and the second target send signal as a target forward signal group;
Step 3007, the CAN domain information of the second target received signal, the second target received signal are connect in the second target The CAN domain information of position, the second signal to be sent in collection of letters list and the second signal to be sent are sent out in the second target Position in the number of delivering letters list is stored into Signal Message Address list.
In an embodiment of the present invention, it has been compared when the first object in each target received signal list receives signal After the completion of Cheng Hou, i.e. general category target forward signal group are determined, according to the CAN domain information in a line every in forward signal list And signal successively determines corresponding second signal to be received and the second signal to be sent, and forwards and believe as target Number group is stored into Signal Message Address list, realizes the determination to special defects target forward signal group, and wherein special defects target forwards Signal group refers to that the target forward signal group of evident regularity is not present in the variation of forwarding front and back signal name, and then ensures to pass through mesh The target forward signal group that mark controller is forwarded is stored into Signal Message Address list, is conducive to subsequent obtain test case And the progress for the operation tested according to test case.The artificial many and diverse labour for determining target forward signal group is reduced, Improve test case writes speed and accuracy, and then shortens test period.
Specifically, first object is successively received in signal list and receives letter as first object by method as described above Number the second signal to be received and first object send in signal list as the one second to be sent of first object transmission signal After the step of signal carries out the comparison of signal name, obtains the first comparison result, further includes:
If the first comparison result is that any first object sends the signal name of signal and the letter of first object reception signal Number title is all different, then chooses next first object and receive signal and successively send signal with first object and carry out signal name It compares.
In an embodiment of the present invention, when the signal for choosing a certain first object reception signal and first object reception signal The comparison of title is obstructed out-of-date, determines that the first object receives signal and do not need to be forwarded by target controller, at this time Return step 3001 is chosen the next second signal to be received and is compared as first object reception signal.
Further, first object is received the target property information and first object of signal by method as described above After the step of target property information of transmission signal is compared, obtains the second comparison result, further includes:
If the second comparison result is that first object receives the target property information of signal and the mesh of first object transmission signal It is different to mark attribute information, then stops being compared and generating for reminding Test Engineer to check DBC file and place CAN net Whether correct first prompt information of the network protocol in domain.
In an embodiment of the present invention, the master of the signal name of signal and first object transmission signal is received in first object In the identical situation of body, if first object reception signal is different from the first object transmission target property information of signal, it is determined that First object receives signal and/or first object sends DBC file belonging to signal and the network protocol of place CAN domain is deposited In problem, the first prompt information reminding technology personnel are generated at this time, signal and/or first object transmission letter are received to first object The network protocol of DBC file and place CAN domain belonging to number is checked and is excluded, and just carries out mesh in the test incipient stage The inspection for marking forward signal group and DBC file consistence, is conducive to improve testing efficiency when subsequent tested.
Specifically, method as described above arranges the signal name of the first signal to be received and the second target received signal After the step of signal name of every one second signal to be received is successively compared, obtains third comparison result in table, also wrap It includes:
If third comparison result is in the signal name and any second target received signal list of the first signal to be received The signal name of the second target received signal when being all different, stopping is compared and generates for reminding Test Engineer to examine Look into the network protocol and whether correct second prompt information of forward signal list of DBC file and place CAN domain.
In an embodiment of the present invention, it when determining target forward signal group using forward signal list, needs to believe forwarding The first signal to be received stored in number list is with the presence or absence of being verified, when in the first signal to be received and same CAN domain When the main body of the signal name of every one second signal to be received is not identical in second target received signal list, determine that first is waiting Collect mail and number be not present, determine at this time DBC file corresponding to the first signal to be received and place CAN domain network protocol or There are problems for forward signal list, generate the second prompt information reminding technology personnel at this time to belonging to the first signal to be received The network protocol and/or forward signal list of DBC file and place CAN domain are checked and are excluded, and start rank in test Section is conducive to improve test effect when subsequent tested with regard to the inspection of progress target forward signal group and DBC file consistence Rate.
Further, the signal name of the first signal to be sent and the second target are sent signal by method as described above After the step of signal name of the second signal to be sent in list is successively compared, obtains four comparison results, also wrap It includes:
If the 4th comparison result is that the signal name of the first signal to be sent and the second target send appointing in signal list When the signal name that one second target sends signal is all different, stopping is compared and generates for reminding Test Engineer to examine Look into the network protocol and the whether correct third prompt information of forward signal list of DBC file and place CAN domain.
In an embodiment of the present invention, when determining target forward signal group using forward signal list, it is also necessary to forwarding First stored in signal list signal to be sent is with the presence or absence of being verified, when the first signal to be sent and same CAN domain Interior second target send the signal name of every one second signal to be sent in signal list main body it is not identical when, determine first to It sends signal to be not present, determines the network protocol of DBC file corresponding to the first signal to be sent and place CAN domain at this time Or there are problems for forward signal list, generate third prompt information reminding technology personnel at this time to belonging to the first signal to be sent The network protocol and/or forward signal list of DBC file and place CAN domain are checked and are excluded, and start rank in test Section is conducive to improve test effect when subsequent tested with regard to the inspection of progress target forward signal group and DBC file consistence Rate.
Specifically, method as described above obtains the target property information and the second target of the second target received signal After the step of sending the target property information of signal, further includes:
If the target property information of the second target received signal and the second target send the target property information of signal not It is identical, then generate the network protocol whether correct for reminding Test Engineer to check DBC file and place CAN domain Four prompt informations.
In an embodiment of the present invention, the master of the signal name of signal is sent in the second target received signal and the second target In the identical situation of body, if the second target received signal is different from the second target transmission target property information of signal, it is determined that Second target received signal and/or the second target send DBC file belonging to signal and the network protocol of place CAN domain is deposited In problem, the 4th prompt information reminding technology personnel are generated at this time, letter is sent to the second target received signal and/or the second target The network protocol of DBC file and place CAN domain belonging to number is checked and is excluded, and just carries out mesh in the test incipient stage The inspection for marking forward signal group and DBC file consistence, is conducive to improve testing efficiency when subsequent tested.
Referring to fig. 4, it is preferable that method as described above carries out environmental model parsing to Signal Message Address list, determines each Path of the target forward signal group in environmental model, and the step of generating use-case signal list includes:
Step 4001, environment mould is successively carried out according to the target forward signal group stored by a line every in Signal Message Address list Type parsing obtains the first signal name corresponding with target received signal and the second letter corresponding with target transmission signal Number title carries mesh in second signal title wherein carrying the routing information of target received signal in the first signal name Mark sends the routing information of signal;
Step 4002, the list of use-case signal is generated according to every one first signal name and each second signal title.
In an embodiment of the present invention, environmental model is carried out to the Signal Message Address list generated according to target forward signal group Parsing, passes through working environment when analog signal transmission, obtains opposite with target received signal in each target forward signal group The first signal name answered and second signal title corresponding with target transmission signal, and the first signal name and second Routing information is carried in signal name, convenient for generating the list of use-case signal and generating test according to use-case signal list The operation such as tracking and information extraction is carried out to signal when use-case.
Preferably, method as described above, the target line number of test case is according to theoretical line number and default test value Number determines, wherein theoretical line number is true by the first preset algorithm according to signal maximum, signal minimum and signal accuracy It is fixed;
When theoretical line number is less than or equal to default test value number, target line number is theoretical line number, and target at this time The value of reception signal and target transmission signal is all values from signal minimum to signal maximum;
When theoretical line number is greater than default test value number, target line number tests value number, and mesh at this time to be default The value that the tag splice collection of letters number and target send signal includes: signal maximum, signal minimum, the first numerical value and the second number Value, wherein the first numerical value is to be obtained according to signal maximum and signal accuracy by the second preset algorithm, second value is root It is obtained according to signal minimum and signal accuracy by third preset algorithm.
Specifically, method as described above, the first preset algorithm are as follows:
P=(N1-N2)/W+1
Wherein, P is theoretical line number;
N1For signal maximum;
N2For signal minimum;
W is the numerical value of signal accuracy.
Specifically, method as described above, the second preset algorithm are as follows:
Na1=N1-i1W
Third preset algorithm are as follows:
Na2=N2+i2W
Wherein, Na1For the first numerical value;
Na2For second value;
N1For signal maximum;
N2For signal minimum;
W is the numerical value of signal accuracy;
i1It successively takes 1 to the natural number between (n-1)/2;
i2It successively takes 1 to the natural number between (n-2)/2;
N is default test value number.
It in an embodiment of the present invention, can be according to the theoretical line number of each test case and pre- when generating test case If test value number determines the target line number of test case and sends signal and target received signal progress value to target, Since the objective attribute target attribute that target sends signal and target received signal is identical, so in value, signal maximum and letter Number minimum value sends signal according to target or target received signal is chosen.It is each convenient for accurately determining using above-mentioned determination method The target line number and target of test case send the value of signal and target received signal, advantageously reduce it is artificial determine and The many and diverse labour write, that improves test case writes speed and accuracy, and then shortens test period.
Preferably, method as described above, every a line of test case include: timestamp, power-on and power-off Signal Message Address, target It receives signal and target sends signal;
Wherein, timestamp sends the sum of the sending cycle of signal since the second row for target received signal and target.
In an embodiment of the present invention every a line of test case include but is not limited to timestamp, power-on and power-off Signal Message Address, Target received signal and target send signal, and believe since the second row timestamp, power-on and power-off Signal Message Address, intended recipient Number and target send signal successively carry out assignment until target line number last line.
Referring to Fig. 5, another preferred embodiment of the invention additionally provides a kind of test device, comprising:
Module 501 is obtained, for obtaining the first signal group to be forwarded for recording forwarding required for target controller The database CAN file of forward signal list and each controller local area network CAN domain being connected with target controller DBC;
First processing module 502, for determining target forward signal according to every DBC file and forward signal list Group simultaneously generates Signal Message Address list, and target forward signal group includes that target received signal and target send signal;
Second processing module 503 determines each target forwarding for carrying out environmental model parsing according to Signal Message Address list Path of the signal group in environmental model, and generate use-case signal list;
Third processing module 504, for generating test case according to use-case signal list.
Preferably, test device as described above, first processing module 502 include:
First processing submodule 5021, is used for second collection of letters waiting relevant to target controller in every DBC file Number and the attribute information of the second signal to be received store into reception signal list corresponding with DBC file, by every DBC In file the attribute information of the second signal to be sent relevant to target controller and the second signal to be sent store to DBC In the corresponding transmission signal list of file, attribute information includes: signal name, signal sending cycle, signal length, signal essence Degree, signal offset, signal maximum and signal minimum;
Second processing submodule 5022, for successively choosing reception signal list corresponding to every DBC file as One target received signal list, transmission signal list conduct corresponding to other DBC files in addition to the DBC file being selected First object sends signal list, and successively receives in signal list first object and receive the second of signal as first object Signal to be received and first object send one second signal to be sent for sending signal as first object in signal list and carry out The comparison of signal name obtains the first comparison result;
Third handles submodule 5023, if for the first comparison result being the master for the signal name that first object receives signal Body and first object send that the main body of signal name of signal is identical, then first object is received the target property information of signal with And the target property information of first object transmission signal is compared, and obtains the second comparison result, target property information includes: letter Number length, signal accuracy, signal offset, signal maximum and signal minimum;
Fourth process submodule 5024, if being the target property information that first object receives signal for the second comparison result It is identical that the target property information of signal is sent with first object, it is determined that first object receives signal and first object sends signal For a target forward signal group;
5th processing submodule 5025, for receiving the CAN domain information of signal according to first object, first object receives Signal first object receive signal list in position, first object receive signal CAN domain information and first object It sends signal and generates Signal Message Address list in the position that first object is sent in signal list.
Preferably, test device as described above, first processing module 502 further include:
6th processing submodule 5026, for the CAN according to the first signal to be received in the every a line of forward signal list Domain information chooses the reception signal list being located in same CAN domain as the second target received signal list;
7th processing submodule 5027, will be in the signal name of the first signal to be received and the second target received signal list The signal name of each the second signal to be received as the second target received signal is successively compared, and obtains third and compares knot Fruit;
8th processing submodule 5028, for the main body when the signal name that third comparison result is the first signal to be received When identical as the main body of signal name of one second target received signal in the second target received signal list, according to the first mesh Mark sends the CAN domain information of signal, chooses the transmission signal list being located in same CAN domain and sends as the second target and believes Number list;
9th processing submodule 5029, for the signal name of the first signal to be sent and the second target to be sent signal train The signal name of each the second signal to be sent that signal is sent as the second target in table is successively compared, and obtains the 4th Comparison result;
Tenth processing submodule 50210, for the master when the signal name that the 4th comparison result is the first signal to be sent When body is identical as the one second target transmission main body of signal name of signal in the transmission signal list of the second target, second is obtained The target property information of target received signal and the second target send the target property information of signal;
11st processing submodule 50211, if target property information and the second target for the second target received signal The target property information for sending signal is identical, it is determined that the second target received signal and the second target send signal as a target Forward signal group;
12nd processing submodule 50212, for connecing CAN domain information, the second target of the second target received signal Collect mail position number in the second target received signal list, the CAN domain information of the second signal to be sent and second is pending The number of delivering letters sends the position in signal list in the second target and stores into Signal Message Address list.
Preferably, test device as described above, Second processing module 503 include:
13rd processing submodule 5031, for successively being forwarded according to the target stored by a line every in Signal Message Address list Signal group carries out environmental model parsing, obtains the first signal name corresponding with target received signal and send with target to believe Number corresponding second signal title, wherein the routing information of target received signal is carried in the first signal name, the second letter The routing information that target sends signal is carried in number title;
14th processing submodule 5032, for being generated according to every one first signal name and each second signal title Use-case signal list.
Specifically, test device as described above, first processing module 502 further include:
15th processing submodule 50213, if being the signal that any first object sends signal for the first comparison result The signal name that title and first object receive signal is all different, then chooses next first object and receive signal successively with first Target sends the comparison that signal carries out signal name.
Further, test device as described above, first processing module 502 further include:
16th processing submodule 50214, if being the objective attribute target attribute that first object receives signal for the second comparison result Information is different from the first object transmission target property information of signal, then stops being compared and generating for reminding testing engineering Teacher checks whether correct first prompt information of network protocol of DBC file and place CAN domain.
Specifically, test device as described above, first processing module 502 further include:
17th processing submodule 50215, if for third comparison result be the first signal to be received signal name with When the signal name of the second target received signal in any second target received signal list is all different, stop being compared And the network protocol and forward signal list generated for reminding Test Engineer's inspection DBC file and place CAN domain is No correct second prompt information.
Further, test device as described above, first processing module 502 further include:
18th processing submodule 50216, if for the 4th comparison result be the first signal to be sent signal name with When the signal name that second target sends any second target transmission signal in signal list is all different, stop being compared And the network protocol and forward signal list generated for reminding Test Engineer's inspection DBC file and place CAN domain is No correct third prompt information.
Specifically, test device as described above, first processing module 502 further include:
19th processing submodule 50217, if target property information and the second mesh for the second target received signal The target property information that mark sends signal is not identical, then generates for reminding Test Engineer to check DBC file and place CAN Whether correct 4th prompt information of the network protocol of domain.
Test device embodiment of the invention is corresponding with the embodiment of method of above-mentioned generation signal transmitted test use-case Device, all realization rates in above method embodiment can also reach identical suitable for the embodiment of the device Technical effect.
Further embodiment of the invention additionally provides a kind of computer readable storage medium, computer-readable storage medium It is stored with computer program in matter, realizes that the signal transmitted test as described above that generates is used when computer program is executed by processor The step of method of example.
Another preferred embodiment of the invention additionally provides a kind of test macro, comprising: test device as described above.
In an embodiment of the present invention, by being connected before being tested by detection and target controller in test device Relationship and technical staff in all CAN domains connect in DBC file between signal forward letter according to independently determining target Number group and the forward signal list generated automatically generates test case, avoid and all needed using hand-written test case to target Forward signal group carries out many and diverse labour for determining and writing one by one, and improve test case writes speed and accuracy, into And shorten test period.
In addition, the present invention can in different examples repeat reference numerals and/or letter.This repetition be in order to simplify and Clear purpose itself does not indicate the relationship between discussed various embodiments and/or setting.
It should also be noted that, herein, relational terms such as first and second and the like are used merely to one Entity or operation are distinguished with another entity or operation, without necessarily requiring or implying between these entities or operation There are any actual relationship or orders.Moreover, the terms "include", "comprise" or its any other variant are intended to contain Lid non-exclusive inclusion.
The above is a preferred embodiment of the present invention, it is noted that for those skilled in the art For, without departing from the principles of the present invention, several improvements and modifications can also be made, these improvements and modifications It should be regarded as protection scope of the present invention.

Claims (20)

1. a kind of method for generating signal transmitted test use-case characterized by comprising
Obtain for record the first signal group to be forwarded of forwarding required for target controller forward signal list and with it is described The database CAN file DBC for each controller local area network CAN domain that target controller is connected;
According to every DBC file and the forward signal list, determines target forward signal group and generates Signal Message Address list, The target forward signal group includes that target received signal and target send signal;
Environmental model parsing is carried out according to the Signal Message Address list, determines each target forward signal group in environmental model Interior path, and generate use-case signal list;
Test case is generated according to the use-case signal list.
2. the method according to claim 1 for generating signal transmitted test use-case, which is characterized in that the acquisition is for remembering In the step of recording the forward signal list of the first signal group to be forwarded forwarded required for target controller, described first is to be forwarded Signal group includes: the first signal to be received and the first signal to be sent;
Every a line of the forward signal list records the signal message of a first signal group to be forwarded, the signal message It includes at least: the signal name of first signal to be received, the CAN domain information of first signal to be received, described The CAN domain information of the signal name of one signal to be sent and first signal to be sent.
3. the method according to claim 2 for generating signal transmitted test use-case, which is characterized in that described according to each DBC file and the forward signal list determine target forward signal group and include: the step of generating Signal Message Address list
By the second signal to be received relevant to the target controller in every DBC file and second signal to be received Attribute information store into reception signal list corresponding with DBC file, by every DBC file with the target control The attribute information of relevant second signal to be sent of device and second signal to be sent is stored to opposite with DBC file In the transmission signal list answered, the attribute information include: signal name, signal sending cycle, signal length, signal accuracy, Signal offset, signal maximum and signal minimum;
The reception signal list corresponding to every DBC file is successively chosen as first object and receives signal list, removes quilt The transmission signal list corresponding to other DBC files except the DBC file of selection sends signal train as first object Table, and the first object is successively received to the described second signal to be received for receiving signal in signal list as first object Second signal to be sent for sending signal as first object in signal list, which is sent, with the first object carries out letter The comparison of number title, obtains the first comparison result;
If first comparison result is that the main body for the signal name that the first object receives signal and the first object are sent out The main body of the signal name for the number of delivering letters is identical, then the first object is received to the target property information and described first of signal The target property information that target sends signal is compared, and obtains the second comparison result, the target property information includes: Signal length, signal accuracy, signal offset, signal maximum and signal minimum;
If the target property information and the first object of second comparison result for first object reception signal The target property information for sending signal is identical, it is determined that the first object receives signal and the first object sends letter Number be a target forward signal group;
The CAN domain information of signal is received according to the first object, the first object receives signal in the first object Receive the position in signal list, the first object receives the CAN domain information of signal and the first object sends letter Number sending the position in signal list in the first object generates the Signal Message Address list.
4. the method according to claim 3 for generating signal transmitted test use-case, which is characterized in that when each target After the completion of first object reception signal in reception signal list compares, the method also includes:
According to the CAN domain information of the described first signal to be received in described every a line of forward signal list, chooses and be located at together The reception signal list in one CAN domain is as the second target received signal list;
The second mesh is used as by each in the signal name of the described first signal to be received and the second target received signal list The signal name of described second signal to be received of the tag splice collection of letters number is successively compared, and obtains third comparison result;
Main body and second intended recipient when the signal name that the third comparison result is the described first signal to be received When the main body of the signal name of second target received signal in signal list is identical, sent according to the first object The CAN domain information of signal chooses the transmission signal list being located in same CAN domain and sends signal as the second target List;
Each second is used as what the signal name of the described first signal to be sent and second target sent in signal list The signal name that target sends the described second signal to be sent of signal is successively compared, and obtains the 4th comparison result;
When the main body for the signal name that the 4th comparison result is the described first signal to be sent and second target are sent When the main body for the signal name that second target in signal list sends signal is identical, second intended recipient is obtained The target property information of signal and second target send the target property information of signal;
If the target property information of second target received signal and second target send the target of signal Attribute information is identical, it is determined that second target received signal and second target send signal and turn for a target Signalling group;
The CAN domain information of second target received signal, second target received signal are connect in second target The CAN domain information of position, second signal to be sent in collection of letters list and second signal to be sent are in institute The position that the second target is sent in signal list is stated to store into the Signal Message Address list.
5. the method according to claim 3 for generating signal transmitted test use-case, which is characterized in that it is described successively will be described First object receives the described second signal to be received and the first object for receiving signal in signal list as first object The comparison that second signal to be sent for sending signal as first object in signal list carries out signal name is sent, is obtained After the step of to the first comparison result, further includes:
If first comparison result is that any first object sends the signal name of signal and the first object receives The signal name of signal is all different, then chooses next first object and receive signal and successively send with the first object and believe Number carry out signal name comparison.
6. the method according to claim 3 for generating signal transmitted test use-case, which is characterized in that described by described first The target property information that the target property information of target received signal and the first object send signal carries out After the step of comparing, obtaining the second comparison result, further includes:
If the target property information and the first object of second comparison result for first object reception signal The target property information for sending signal is different, then stops being compared and generating for reminding Test Engineer to check DBC Whether correct first prompt information of the network protocol of file and place CAN domain.
7. the method according to claim 4 for generating signal transmitted test use-case, which is characterized in that described by described first The signal of each second signal to be received in the signal name of signal to be received and the second target received signal list After the step of title is successively compared, and obtains third comparison result, further includes:
If the third comparison result is that the signal name of the described first signal to be received and any second intended recipient are believed When the signal name of second target received signal in number list is all different, stopping is compared and generates for reminding Test Engineer checks the network protocol of DBC file and place CAN domain and the forward signal list whether correct the Two prompt informations.
8. the method according to claim 4 for generating signal transmitted test use-case, which is characterized in that described by described first The signal name of signal to be sent and second target send the signal name of the described second signal to be sent in signal list After the step of title is successively compared, obtains four comparison results, further includes:
If the 4th comparison result is that the signal name of the described first signal to be sent and second target send signal train When the signal name that any second target in table sends signal is all different, stopping is compared and generates for reminding Test Engineer checks the network protocol of DBC file and place CAN domain and the forward signal list whether correct the Three prompt informations.
9. the method according to claim 4 for generating signal transmitted test use-case, which is characterized in that described to obtain described the After the step of target property information of two target received signals and second target send the target property information of signal, Further include:
If the target property information of second target received signal and second target send the objective attribute target attribute letter of signal Breath is not identical, then generates for reminding Test Engineer to check whether the network protocol of DBC file and place CAN domain is correct The 4th prompt information.
10. the method according to claim 1 for generating signal transmitted test use-case, which is characterized in that described to the letter Number address list carries out environmental model parsing, determines path of each target forward signal group in environmental model, and raw Include: at the step of use-case signal list
Successively according to every a line in the Signal Message Address list stored by the target forward signal group carry out environmental model solution Analysis obtains the first signal name corresponding with the target received signal and sends signal corresponding the with the target Binary signal title, wherein the routing information of the target received signal is carried in first signal name, second letter The routing information that the target sends signal is carried in number title;
The use-case signal list is generated according to each first signal name and each second signal title.
11. the method according to claim 3 for generating signal transmitted test use-case, which is characterized in that the test case Target line number determined according to theoretical line number and default test value number, wherein the theory line number is according to the signal Maximum value, the signal minimum and the signal accuracy are determined by the first preset algorithm;
When the theoretical line number is less than or equal to the default test value number, the target line number is the theoretical row Number, and it is from signal minimum to signal maximum that the target received signal and the target, which send the value of signal, at this time All values;
When the theoretical line number is greater than the default test value number, the target line number is the default test value Number, and it includes: signal maximum, signal minimum that the target received signal and the target, which send the value of signal, at this time Value, the first numerical value and second value, wherein first numerical value is to be passed through according to signal maximum and the signal accuracy Second preset algorithm obtains, and the second value is default by third according to the signal minimum and the signal accuracy Algorithm obtains.
12. the method according to claim 11 for generating signal transmitted test use-case, which is characterized in that described first is default Algorithm are as follows:
P=(N1-N2)/W+1
Wherein, P is the theoretical line number;
N1For signal maximum;
N2For signal minimum;
W is the numerical value of signal accuracy.
13. the method according to claim 11 for generating signal transmitted test use-case, which is characterized in that described second is default Algorithm are as follows:
Na1=N1-i1W
The third preset algorithm are as follows:
Na2=N2+i2W
Wherein, Na1For the first numerical value;
Na2For second value;
N1For signal maximum;
N2For signal minimum;
W is the numerical value of signal accuracy;
i1It successively takes 1 to the natural number between (n-1)/2;
i2It successively takes 1 to the natural number between (n-2)/2;
N is default test value number.
14. the method according to claim 10 for generating signal transmitted test use-case, which is characterized in that the test case Every a line include: that timestamp, power-on and power-off Signal Message Address, target received signal and target send signal;
Wherein, the timestamp sends the sending cycle of signal since the second row for the target received signal and the target The sum of.
15. a kind of test device characterized by comprising
Module is obtained, for obtaining the forward signal of the first signal group to be forwarded for recording forwarding required for target controller The database CAN file DBC of list and each controller local area network CAN domain being connected with the target controller;
First processing module, for determining target forward signal group simultaneously according to every DBC file and the forward signal list Signal Message Address list is generated, the target forward signal group includes that target received signal and target send signal;
Second processing module determines that each target turns for carrying out environmental model parsing according to the Signal Message Address list Path of the signalling group in environmental model, and generate use-case signal list;
Third processing module, for generating test case according to the use-case signal list.
16. test device according to claim 15, which is characterized in that the first processing module includes:
First processing submodule, for by the second signal to be received relevant to the target controller in every DBC file with And the attribute information of second signal to be received is stored into reception signal list corresponding with DBC file, by every DBC The attribute of the second signal to be sent relevant to the target controller and second signal to be sent is believed in file Into transmission signal list corresponding with DBC file, the attribute information includes: signal name, signal transmission week for breath storage Phase, signal length, signal accuracy, signal offset, signal maximum and signal minimum;
Second processing submodule, for successively choosing the reception signal list corresponding to every DBC file as the first mesh Tag splice collection of letters list, the transmission signal list conduct corresponding to other DBC files in addition to the DBC file being selected First object sends signal list, and successively receives in signal list the first object and receive signal as first object Second signal to be received and the first object send one described the as first object transmission signal in signal list Two signals to be sent carry out the comparison of signal name, obtain the first comparison result;
Third handles submodule, if for first comparison result being the master for the signal name that the first object receives signal Body is identical as the first object transmission main body of signal name of signal, then the first object is received to the target category of signal Property information and the first object send signal the target property information be compared, obtain the second comparison result, institute Stating target property information includes: signal length, signal accuracy, signal offset, signal maximum and signal minimum;
Fourth process submodule, if being the objective attribute target attribute that the first object receives signal for second comparison result It is identical that information and the first object send the target property information of signal, it is determined that the first object receive signal and It is a target forward signal group that the first object, which sends signal,;
5th processing submodule, for receiving the CAN domain information of signal according to the first object, the first object receives Signal the first object receive signal list in position, the first object receive signal CAN domain information and The first object sends signal and generates the Signal Message Address list in the position that the first object is sent in signal list.
17. test device according to claim 16, which is characterized in that the first processing module further include:
6th processing submodule, for the CAN domain according to the first signal to be received in described every a line of forward signal list Information chooses the reception signal list being located in same CAN domain as the second target received signal list;
7th processing submodule, will be in the signal name of the described first signal to be received and the second target received signal list The signal name of each the described second signal to be received as the second target received signal is successively compared, and obtains third ratio To result;
8th processing submodule, for the main body when the signal name that the third comparison result is the described first signal to be received When identical as the main body of signal name of second target received signal in the second target received signal list, root The CAN domain information of signal is sent according to the first object, is chosen the transmission signal list being located in same CAN domain and is made Signal list is sent for the second target;
9th processing submodule, for sending the signal name of the first signal to be sent and second target in signal list Each signal name of the described second signal to be sent for sending signal as the second target be successively compared, obtain the 4th Comparison result;
Tenth processing submodule, for the main body when the signal name that the 4th comparison result is the described first signal to be sent With second target send second target in signal list send the main body of signal name of signal it is identical when, obtain Take the target property information of second target received signal and the target category of second target transmission signal Property information;
11st processing submodule, if the target property information and second mesh for second target received signal The target property information that mark sends signal is identical, it is determined that second target received signal and second target hair The number of delivering letters is a target forward signal group;
12nd processing submodule, for by the CAN domain information of second target received signal, second intended recipient Position of the signal in the second target received signal list, the CAN domain information of second signal to be sent and institute Position of second signal to be sent in second target transmission signal list is stated to store into the Signal Message Address list.
18. test device according to claim 15, which is characterized in that the Second processing module includes:
13rd processing submodule, for successively being forwarded according to the target stored by every a line in the Signal Message Address list Signal group carry out environmental model parsing, obtain the first signal name corresponding with the target received signal and with the mesh Mark sends the corresponding second signal title of signal, wherein carrying the target received signal in first signal name Routing information carries the routing information that the target sends signal in the second signal title;
14th processing submodule, for being generated according to each first signal name and each second signal title The use-case signal list.
19. a kind of computer readable storage medium, which is characterized in that be stored with computer on the computer readable storage medium Program realizes that the generation signal as described in any one of claims 1 to 14 turns when the computer program is executed by processor The step of sending out the method for test case.
20. a kind of test macro characterized by comprising such as the described in any item test devices of claim 15 to 18.
CN201811157784.3A 2018-09-30 2018-09-30 Method, device and test system for generating signal forwarding test case Active CN109327354B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811157784.3A CN109327354B (en) 2018-09-30 2018-09-30 Method, device and test system for generating signal forwarding test case

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811157784.3A CN109327354B (en) 2018-09-30 2018-09-30 Method, device and test system for generating signal forwarding test case

Publications (2)

Publication Number Publication Date
CN109327354A true CN109327354A (en) 2019-02-12
CN109327354B CN109327354B (en) 2020-09-25

Family

ID=65266722

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811157784.3A Active CN109327354B (en) 2018-09-30 2018-09-30 Method, device and test system for generating signal forwarding test case

Country Status (1)

Country Link
CN (1) CN109327354B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112147967A (en) * 2019-06-27 2020-12-29 北京新能源汽车股份有限公司 Automatic generation method and device for scene test case of automobile controller
CN113518015A (en) * 2021-04-08 2021-10-19 重庆长安汽车股份有限公司 Automatic realization method based on vehicle machine CAN network signal test

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8762784B1 (en) * 2005-12-22 2014-06-24 The Mathworks, Inc. Viewing multi-dimensional metric data from multiple test cases
CN105262644A (en) * 2015-11-03 2016-01-20 株洲南车时代电气股份有限公司 General test system based on protocol configuration and method
CN106294138A (en) * 2016-07-29 2017-01-04 东软集团股份有限公司 Method for generating test case and device
CN106330618A (en) * 2016-09-19 2017-01-11 中国第汽车股份有限公司 Gateway routing automatic test system and test method based on CAN/LIN/MOST hybrid buses
CN106484616A (en) * 2016-09-30 2017-03-08 北京新能源汽车股份有限公司 A kind of automatic interface testing method of entire car controller and device
CN106850372A (en) * 2017-02-22 2017-06-13 重庆长安汽车股份有限公司 A kind of method of testing and system of controller CAN signal
CN107145140A (en) * 2017-05-18 2017-09-08 中国第汽车股份有限公司 Vehicle-mounted electronic control unit CAN interface Auto-Test System and its method of testing
CN107402880A (en) * 2016-05-20 2017-11-28 腾讯科技(北京)有限公司 A kind of method of testing and electronic equipment
CN107977317A (en) * 2017-12-22 2018-05-01 上海庆科信息技术有限公司 A kind of test method of data network, system and relevant apparatus

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8762784B1 (en) * 2005-12-22 2014-06-24 The Mathworks, Inc. Viewing multi-dimensional metric data from multiple test cases
CN105262644A (en) * 2015-11-03 2016-01-20 株洲南车时代电气股份有限公司 General test system based on protocol configuration and method
CN107402880A (en) * 2016-05-20 2017-11-28 腾讯科技(北京)有限公司 A kind of method of testing and electronic equipment
CN106294138A (en) * 2016-07-29 2017-01-04 东软集团股份有限公司 Method for generating test case and device
CN106330618A (en) * 2016-09-19 2017-01-11 中国第汽车股份有限公司 Gateway routing automatic test system and test method based on CAN/LIN/MOST hybrid buses
CN106484616A (en) * 2016-09-30 2017-03-08 北京新能源汽车股份有限公司 A kind of automatic interface testing method of entire car controller and device
CN106850372A (en) * 2017-02-22 2017-06-13 重庆长安汽车股份有限公司 A kind of method of testing and system of controller CAN signal
CN107145140A (en) * 2017-05-18 2017-09-08 中国第汽车股份有限公司 Vehicle-mounted electronic control unit CAN interface Auto-Test System and its method of testing
CN107977317A (en) * 2017-12-22 2018-05-01 上海庆科信息技术有限公司 A kind of test method of data network, system and relevant apparatus

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112147967A (en) * 2019-06-27 2020-12-29 北京新能源汽车股份有限公司 Automatic generation method and device for scene test case of automobile controller
CN113518015A (en) * 2021-04-08 2021-10-19 重庆长安汽车股份有限公司 Automatic realization method based on vehicle machine CAN network signal test
CN113518015B (en) * 2021-04-08 2023-03-14 重庆长安汽车股份有限公司 Automatic realization method based on vehicle machine CAN network signal test

Also Published As

Publication number Publication date
CN109327354B (en) 2020-09-25

Similar Documents

Publication Publication Date Title
CN107423278B (en) Evaluation element identification method, device and system
CN106777335A (en) It is a kind of to be remembered based on shot and long term(LSTM)The multi-tag trade classification method and device of model
CN109327354A (en) A kind of method, apparatus and test macro generating signal transmitted test use-case
CN109919925A (en) Printed circuit board intelligent detecting method, system, electronic device and storage medium
US20170251072A1 (en) System and method for annotating client-server transactions
CN107748744A (en) A kind of method for building up and device for sketching the contours frame knowledge base
CN108268613A (en) Tour schedule generation method, electronic equipment and storage medium based on semantic analysis
CN110334013A (en) Test method, device and the electronic equipment of decision engine
CN110490237B (en) Data processing method and device, storage medium and electronic equipment
CN110008445A (en) Event extraction method and device, electronic equipment
CN110472034A (en) Detection method, device, equipment and the computer readable storage medium of question answering system
CN113807096A (en) Text data processing method and device, computer equipment and storage medium
CN112395858A (en) Multi-knowledge point marking method and system fusing test question data and answer data
CN108133236A (en) A kind of method, integrating device and the system of the classification of city management digital image recognition
CN117217163A (en) Script-based SOC chip testing method
CN107392250A (en) A kind of Method for Discriminating Gas-liquid Two Phase Flow
CN115941538A (en) Testing system, testing method and testing device for multi-party security calculation
Schroeder et al. Comparing the applicability of complexity measurements for simulink models during integration testing--an industrial case study
CN115576834A (en) Software test multiplexing method, system, terminal and medium for supporting fault recovery
CN107590076A (en) Obtain method, the method and device in generation business datum source of business datum
CN108074240A (en) Recognition methods, identification device, computer readable storage medium and program product
CN112464101A (en) Electronic book sorting recommendation method, electronic device and storage medium
CN107305540A (en) Address cutting recognition methods
CN111428016A (en) Method and equipment for detecting rumors
Perdicoúlis et al. The causality premise of EIA in practice

Legal Events

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