CN109800539A - A kind of emulation test method and system - Google Patents
A kind of emulation test method and system Download PDFInfo
- Publication number
- CN109800539A CN109800539A CN201910145507.9A CN201910145507A CN109800539A CN 109800539 A CN109800539 A CN 109800539A CN 201910145507 A CN201910145507 A CN 201910145507A CN 109800539 A CN109800539 A CN 109800539A
- Authority
- CN
- China
- Prior art keywords
- emulation
- moment
- variable
- test script
- data
- 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
Links
Landscapes
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The present invention provides a kind of emulation test method and system, this method are as follows: obtain preset Excel test script, wherein, preset output function region is included at least in Excel test script, output function region includes the emulation moment and emulation data for emulation testing.Excel test script is parsed, emulation moment and emulation data are obtained.Based on emulation moment and emulation data, emulation testing is carried out.In scheme provided by the invention, pre-establish comprising the emulation moment and emulate the Excel test script of data, emulation moment and emulation data are obtained by parsing Excel test script, and emulation testing is carried out based on emulation moment and emulation data, it does not need to take a significant amount of time the grammer of study editor's test script and the application method of learning test scripting editing tool, difficulty, time cost and the human cost of emulation testing can be reduced.
Description
Technical field
The present invention relates to emulation testing technical fields, and in particular to a kind of emulation test method and system.
Background technique
With the development of science and technology, emulation technology is gradually applied in all trades and professions.Emulation refers to be reappeared using model
The essential process that occurs in real system, and had existed or just in the design by studying the experiment of system model
System.
User needs to write emulation testing script when carrying out emulation testing at present.Writing emulation testing foot
This when, user need first to learn the program syntax of emulation testing script, and how study uses the editor's work for writing script
Tool.Therefore, difficulty, time cost and the human cost for realizing emulation testing are increased.
Summary of the invention
In view of this, the embodiment of the present invention provides a kind of emulation test method and system, to solve existing emulation testing
The problems such as difficulty of emulation testing existing for method is big, time cost is high and human cost is high.
To achieve the above object, the embodiment of the present invention provides the following technical solutions:
First aspect of the embodiment of the present invention discloses a kind of emulation test method, which comprises
Obtain preset Excel test script, wherein preset output letter is included at least in the Excel test script
Number region, the output function region include the emulation moment and emulation data for emulation testing;
The Excel test script is parsed, the emulation moment and emulation data are obtained;
Based on the emulation moment and emulation data, emulation testing is carried out.
Preferably, the process that the output function region is divided in the Excel test script includes:
In the first row cell in the output function region setting indicate the output function region range and
Sampling behavior;
Setting emulation moment variable and output variable in the second row cell of the output area;
In the third line cell in every a line cell into L row cell of the output area, described in typing
It is corresponding described imitative at the emulation moment to emulate output variable described in the moment variable corresponding emulation moment and typing
True data, L are the positive integer greater than 3.
Preferably, the parsing Excel test script, obtains the emulation moment and emulation data, comprising:
The storage format for determining the Excel test script is compressed package format, then carries out to the Excel test script
Decompression, and read the emulation moment and emulation data.
Preferably, the Excel test script further includes demand detection variable region, in the Excel test script
The process for dividing demand detection variable region includes:
The demand detection variable region the first row cell in be arranged demand test format, demand detection variable with
And default value processing mode, wherein the demand detection variable is started with REQ_, and the default value processing mode is that closest approach is poor
Value or linear interpolation;
The composition of the demand detection variable is set in the second row cell in demand detection variable region,
In, each demand detection variable includes more than one input variable, next cell step-up error of each input variable
Variable, the content where the error variance in the lastrow cell of cell are the default value processing mode;
The third line cell in variable region is detected in every a line cell into L row cell in the demand,
The input variable is set in corresponding standard value of each emulation moment, and the setting error variance is each described
Moment corresponding error is emulated, L is the integer greater than 3.
Preferably, the parsing Excel test script also wraps after obtaining the emulation moment and emulation data
It includes:
The demand detection variable, default value processing mode, the input variable are obtained at each emulation moment pair
The standard value and error answered.
Preferably, described based on the emulation moment and emulation data, after progress emulation testing, further includes:
Based on the simulation result that emulation testing obtains is carried out to the corresponding data that emulate of each emulation moment, institute is judged
Simulation result is stated whether in the emulation moment corresponding standard section, the standard section is corresponding by the emulation moment
Standard value and error are constituted;
If so, value of the demand detection variable at the emulation moment is 0;
If it is not, then value of the demand detection variable at the emulation moment is -1.
Preferably, it is described judge the simulation result whether in the emulation moment corresponding standard section after, also
Include:
The demand detection variable is stored in the value at each emulation moment;
If value of the demand detection variable at each emulation moment is all 0, the information that instruction detection passes through is fed back.
Second aspect of the embodiment of the present invention discloses a kind of emulation test system, the system comprises:
Acquiring unit, for obtaining preset Excel test script, wherein included at least in the Excel test script
Preset output function region, the output function region include the emulation moment and emulation data for emulation testing;
Resolution unit obtains the emulation moment and emulation data for parsing the Excel test script;
Simulation unit, for carrying out emulation testing based on the emulation moment and emulation data.
Preferably, the acquiring unit includes:
First setup module, for the setting instruction output letter in the first row cell in the output function region
The range and sampling behavior in number region;
Second setup module, for the setting emulation moment variable and defeated in the second row cell of the output area
Variable out;
Third setup module, for the every a line of the third line cell in the output area into L row cell
In cell, the emulation moment variable corresponding emulation moment and typing described in typing are corresponding with the emulation moment
The emulation data, L are the positive integer greater than 3.
Preferably, the resolution unit includes:
Determining module, for determining that the storage format of the Excel test script is compressed package format;
Decompression module for unziping it to the Excel test script, and reads the emulation moment and emulation
Data.
A kind of emulation test method and system provided based on the embodiments of the present invention, this method are as follows: obtain preset
Excel test script, wherein preset output function region is included at least in Excel test script, output function region includes
Emulation moment and emulation data for emulation testing.Excel test script is parsed, emulation moment and emulation data are obtained.Base
In emulation moment and emulation data, emulation testing is carried out.In the present solution, pre-establishing comprising the emulation moment and emulating data
Excel test script is obtained by parsing Excel test script to the emulation of the variable progress assignment in GCAir Simulation Engineering
Moment, and obtain the emulation data that variable assignments is corresponded to Simulation Engineering.And it is imitated based on emulation moment and emulation data
True test does not need the use for taking a significant amount of time the grammer and learning test scripting editing tool of study editor's test script
Method can reduce difficulty, time cost and the human cost of emulation testing.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below
There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this
The embodiment of invention for those of ordinary skill in the art without creative efforts, can also basis
The attached drawing of offer obtains other attached drawings.
Fig. 1 is a kind of flow chart of emulation test method provided in an embodiment of the present invention;
Fig. 2 is the flow chart provided in an embodiment of the present invention for dividing output function region;
Fig. 3 is the flow chart that division demand provided in an embodiment of the present invention detects variable region;
Fig. 4 is the configuration diagram of Excel test script provided in an embodiment of the present invention;
Fig. 5 is a kind of structural block diagram of emulation test system provided in an embodiment of the present invention;
Fig. 6 is a kind of structural block diagram of emulation test system provided in an embodiment of the present invention;
Fig. 7 is a kind of structural block diagram of emulation test system provided in an embodiment of the present invention;
Fig. 8 is a kind of structural block diagram of emulation test system provided in an embodiment of the present invention;
Fig. 9 is a kind of structural block diagram of emulation test system provided in an embodiment of the present invention;
Figure 10 is a kind of structural block diagram of emulation test system provided in an embodiment of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on
Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other
Embodiment shall fall within the protection scope of the present invention.
In this application, the terms "include", "comprise" or any other variant thereof is intended to cover non-exclusive inclusion,
So that the process, method, article or equipment for including a series of elements not only includes those elements, but also including not having
The other element being expressly recited, or further include for elements inherent to such a process, method, article, or device.Do not having
There is the element limited in the case where more limiting by sentence "including a ...", it is not excluded that in the mistake including the element
There is also other identical elements in journey, method, article or equipment.
It can be seen from background technology that user needs to write emulation testing script when carrying out emulation testing at present.?
When writing emulation testing script, user needs first to learn the program syntax of emulation testing script, and how study uses volume
Write the edit tool of script.Increase difficulty, time cost and the human cost for realizing emulation testing.
Therefore, the embodiment of the present invention provides a kind of emulation test method and system, pre-establishes comprising emulation moment and imitative
The Excel test script of true data obtains emulation moment and emulation data by parsing Excel test script, and based on emulation
Moment and emulation data carry out emulation testing, to reduce emulation testing difficulty, time cost and human cost.
With reference to Fig. 1, a kind of flow chart of emulation test method provided in an embodiment of the present invention is shown, the method includes
Following steps:
Step S101: preset Excel test script is obtained.
During implementing step S101, the Excel test script is pre-created based on Excel, and in institute
Division output function region in Excel test script is stated, filling is used for the emulation of emulation testing in the output function region
Moment and emulation data.
It should be noted that in emulation testing, emulate the output that most of source of data is other engineerings as a result, and
The preservation form of the output result of most of engineerings is Excel format.Therefore described imitative to output function region filling
When true data, it can be used in output function region described in the output result typings of the modes by other engineerings such as duplication stickup.
Step S102: parsing the Excel test script, obtains the emulation moment and emulation data.
During implementing step S102, determine that the storage format of the Excel test script is compressed package lattice
Formula then unzips it the Excel test script, then reads the emulation moment and emulation data.
Step S103: based on the emulation moment and emulation data, emulation testing is carried out.
During implementing step S103, it is based on the emulation moment, emulation survey is carried out to the emulation data
Examination, obtains simulation result.
In embodiments of the present invention, the Excel test script for pre-establishing comprising the emulation moment and emulating data, passes through solution
Analysis Excel test script obtains the emulation moment that assignment is carried out to the variable in GCAir Simulation Engineering, and obtains and give emulation work
Journey corresponds to the emulation data of variable assignments.And emulation testing is carried out based on emulation moment and emulation data, it does not need to spend a large amount of
Time removes the grammer of study editor's test script and the application method of learning test scripting editing tool, can reduce emulation testing
Difficulty, time cost and human cost.
What is be related in above-mentioned steps S101 divides the mistake in the output function region in the Excel test script
Journey shows the flow chart provided in an embodiment of the present invention for dividing output function region with reference to Fig. 2, comprising the following steps:
Step S201: setting indicates the output function region in the first row cell in the output function region
Range and sampling behavior.
During implementing step S201, instruction is set in the first row cell in the output function region
The range in the output function region, such as first cell in the first row cell indicate the output with " ### "
The beginning of function area, the n-th cell in the first row cell indicate the output function region with " ### "
Terminate, N is the positive integer greater than 1.In the first cell in the first row cell and between n-th cell, if
The sampling behavior is set, the sampling behavior is step or linear.
Step S202: setting emulation moment variable and output variable in the second row cell of the output area.
During implementing step S202, when the setting in the second row cell of the output area emulates
Variable is carved, such as the first cell setting emulation moment variable in the second row cell, in the second row list
The more than one output variable is set in first lattice, for example second cell in the second row cell is to N
0 or more the output variable is arranged in a cell.
Step S203: in the third line cell in every a line cell into L row cell of the output area,
Output variable described in the emulation moment variable corresponding emulation moment and typing described in typing is corresponding at the emulation moment
The emulation data, L is positive integer greater than 3.
During implementing step S203, the emulation data are specific input variable in GCAir Simulation Engineering
Data source, i.e., the described GCAir Simulation Engineering be based on the emulation data progress emulation testing.
It should be noted that GCAir is the emulation tool suitable for multi-source heterogeneous model integrated, it can be in identical platform
Complete architecture design, Functional Design, performance design, virtual test and virtual operation.
For the composition for preferably illustrating the output function region, illustrate below with reference to the content in table 1
It is bright.
Table 1:
### | step/linear | Blank ... | ### |
T | Output variable 1 | Output variable ... | Output variable n |
Emulate the moment | Emulate data | … | Emulate data |
… | … | … | … |
Emulate the moment | Emulate data | … | Emulate data |
In the table 1, the first row cell is the range and sampling behavior in the output function region.Second row list
First lattice are the emulation moment variable t and n output variable, and n is positive integer.The third line cell is into last line cell
Every a line cell in be respectively the emulation moment variable t corresponding emulation moment and each output variable each
Emulate moment corresponding emulation data.
It should be noted that in table 1 above, for the same output variable, sampling behavior can only select step or
linear.And the content being related in above-mentioned table 1 is only used for illustrating.
In embodiments of the present invention, output function region is divided in the Excel test script pre-established, in output letter
Typing emulation moment and emulation data in number region, and emulation testing is carried out based on emulation moment and emulation data, it does not need to spend
The expense plenty of time removes the grammer of study editor's test script and the application method of learning test scripting editing tool, can reduce emulation
Difficulty, time cost and the human cost of test.
Preferably, the Excel test script further includes demand detection variable region, is shown in conjunction with Fig. 1 with reference to Fig. 3
The flow chart in division demand detection provided in an embodiment of the present invention variable region, comprising the following steps:
Step S301: demand test format, demand are set in the first row cell in demand detection variable region
Detect variable and default value processing mode.
During implementing step S301, the demand detection variable is started with REQ_, the default value processing
Mode is closest approach difference or linear interpolation.The demand test format is that single argument detects or multivariable " with door " detects.
Step S302: the demand detection variable is set in the second row cell in demand detection variable region
It constitutes.
During implementing step S302, each demand detection variable includes more than one input variable, often
Next cell step-up error variable of a input variable, where the error variance in the lastrow cell of cell
Content is the default value processing mode.
Step S303: the every a line of the third line cell in variable region into L row cell is detected in the demand
In cell, the input variable is set in corresponding standard value of each emulation moment, and the setting error variance
In corresponding error of each emulation moment, L is the integer greater than 3.
Preferably, during executing the step S102 that above-mentioned Fig. 1 is related to, also obtain the demand detection variable,
Default value processing mode, the input variable are in corresponding standard value of each emulation moment and error.
Preferably, after executing the step S103 that above-mentioned Fig. 1 is related to, based on corresponding to each emulation moment
Whether emulation data carry out the simulation result that emulation testing obtains, judge the simulation result in the emulation moment corresponding mark
In quasi- section.If so, value of the demand detection variable at the emulation moment is 0.If it is not, then the demand detection becomes
Measuring the value at the emulation moment is -1.Wherein, the standard section is by the emulation moment corresponding standard value and error
It constitutes.
In the concrete realization, judge the simulation result whether in the emulation moment corresponding standard section at least
Two ways, a kind of mode are single argument detection, and another way is that multivariable " with door " is detected.
The single argument detection are as follows: demand detection variable is made of single input variable, at a certain emulation moment, judges institute
State single input variable it is described emulation the moment simulation result whether in the emulation moment corresponding standard section.Such as
Variable R EQ_A is detected for demand, it is assumed that REQ_A is made of input variable input A, and input A is corresponding at a emulation moment
Standard value be 1, error 0.1, if input A a emulation moment corresponding simulation result [0.9,1.1] section
It is interior, then illustrate that detection passes through, the REQ_A is 0 in a emulation moment corresponding value;If not in the area of [0.9,1.1]
In, then illustrate that detection does not pass through, the REQ_A is -1 in a emulation moment corresponding value.
Multivariable " with the door " detection are as follows: demand detection variable is made of more than two input variables, in a certain emulation
Whether the moment judges all input variables in the simulation result for emulating the moment in the emulation moment corresponding standard section
It is interior.For example variable R EQ_B_C being detected for demand, it is assumed that REQ_B_C is made of input variable input B and input C,
Input B is 1 in a emulation moment corresponding standard value, error 0.2, and input C is in a emulation moment corresponding standard
Value is 1, error 0.1.If a emulate the moment, the corresponding simulation result of input B in the range of [0.8,1.2] and
The corresponding simulation result of input C then illustrates that detection passes through, REQ_B_C emulates the moment in a in the range of [0.9,1.1]
Corresponding value is 0;Otherwise illustrate that detection does not pass through, REQ_B_C is -1 in a emulation moment corresponding value.
It should be noted that when input variable is when there is default value at a certain emulation moment, according to preset to scarce
The processing mode of province's value handles the default value.The default value processing mode is closest approach differential technique or linearly inserts
Value method.
Processing mode of the closest approach differential technique to default value are as follows: the preceding of default value is used to assign after determining value for default value
Value, if preceding be not present after determining value, default value fills out 0.
Processing mode of the linear interpolation method to default value are as follows: corresponding preceding after determining value and subsequent true based on default value
Definite value carries out linear interpolation to default value.
Preferably, after executing the step S103 that above-mentioned Fig. 1 is related to, the demand detection variable is stored each imitative
The value at true moment, if the demand detects variable, the value at each emulation moment is all 0, feeds back what instruction detection passed through
Information, otherwise feedback instruction detect unsanctioned information.
Preferably to illustrate the composition that the demand detects variable region, carried out below with reference to the content shown in table 2
It illustrates.
Table 2:
REQ_xxx | point | Blank | linear | |
Input variable 1 | tolerance | Other input variables ... | Input variable n | tolerance |
Data | Data | Data ... | Data | Data |
… | … | … | … | … |
Data | Data | Data | Data | Data |
In the table 2, the REQ_xxx in the first row cell is the title that demand detects variable, point/linear
For default value processing mode, respectively closest approach difference and linear interpolation.Second row cell is that composition demand detects variable
Input variable and error variance tolerance.The third line cell to last line cell is the corresponding mark of input variable
Quasi- value and error.
It should be noted that for same demand detect variable, to the tupe of default value can only select point or
linear.When default value processing mode is point, default place does not execute demand detection, when default value processing mode is
When linear, default place carries out demand detection.
It should be noted that the content being related in above-mentioned table 2 is only used for illustrating.
In embodiments of the present invention, demand is divided in the Excel test script pre-established and detect variable region, be based on
Simulation result is detected in demand detection variable region, and judges whether emulation testing passes through detection based on testing result, drops
The time cost and human cost of low emulation testing.
The framework signal of Excel test script provided in an embodiment of the present invention is shown with reference to Fig. 4 in conjunction with Fig. 2 and Fig. 3
Figure, in the Excel test script shown in described Fig. 4, the 1st column unit lattice to the 4th column unit lattice are the Excel test script
Output function region, the 5th column unit lattice to the 10th column unit lattice be the Excel test script demand detect variable range
Domain.
In the first row cell in the output function region, indicate described defeated with " ### " in first cell
The beginning of function area out, " ### " in the last one cell indicate the end in the output function region.Second unit
Step in lattice indicates sampling behavior.In the second row cell in the output function region, first cell indicates imitative
At true moment variable t, second cell to the 4th cell is respectively output variable var A, var B and var MME.Institute
The third line cell in output function region is stated into last line cell, first cell is the t corresponding specific
The moment is emulated, second cell to the 4th cell is respectively the corresponding emulation data of the output variable.
In the first row cell in demand detection variable region, REQ_A and REQ_B_C are that demand detects variable,
Point and linear is default value processing mode.In the second row cell in demand detection variable region, input A
For the input variable for constituting REQ_A, the corresponding tolerance of input A is error variance, and input B and input C are to constitute
The input variable of REQ_B_C is error variance in the latter cell of input B and input A.Variable is detected in the demand
The third line cell in region is into last line cell, respectively input A, input B and the corresponding standard of input C
Value and the corresponding error of each input variable.
It should be noted that the configuration diagram of Excel test script shown in above-mentioned Fig. 4 be only used for for example,
The specific framework of Excel test script is configured according to the actual situation by technical staff.
In embodiments of the present invention, output function region and demand are marked off in the excel test script pre-established
Detect variable region.Typing emulation moment and emulation data in output function region, when GCAir Simulation Engineering being made to be based on emulation
It carves and emulation data carries out emulation testing, and the simulation results are detected based on demand detection variable region, judgement is imitative
Really test whether to pass through detection.Making for study edit script grammer and learning test wscript.exe is not needed to take a significant amount of time
With method, emulation difficulty, time cost and human cost are reduced.
Corresponding with a kind of above-mentioned emulation test method being related to, with reference to Fig. 5, the embodiment of the invention also provides one kind
The structural block diagram of emulation test system, the system comprises: acquiring unit 501, resolution unit 502 and simulation unit 503.
Acquiring unit 501, for obtaining preset Excel test script, wherein in the Excel test script at least
Including preset output function region, the output function region includes the emulation moment and emulation data for emulation testing.
The corresponding content of step S101 that particular content is disclosed referring to embodiments of the present invention Fig. 1.
Resolution unit 502 obtains the emulation moment and emulation data for parsing the Excel test script.Specifically
The corresponding content of step S102 that content is disclosed referring to embodiments of the present invention Fig. 1.
Simulation unit 503, for carrying out emulation testing based on the emulation moment and emulation data.Particular content referring to
The corresponding content of step S103 that embodiments of the present invention Fig. 1 is disclosed.
With reference to Fig. 6, a kind of structural block diagram of emulation test system provided in an embodiment of the present invention is shown, the acquisition is single
Member 501 includes: the first setup module 5011, the second setup module 5012 and third setup module 5013.
First setup module 5011, it is described defeated for instruction to be arranged in the first row cell in the output function region
The range of function area and sampling behavior out.The step S201 phase that particular content is disclosed referring to embodiments of the present invention Fig. 2
Corresponding content.
Second setup module 5012, in the second row cell of the output area setting emulation moment variable with
And output variable.The corresponding content of step S202 that particular content is disclosed referring to embodiments of the present invention Fig. 2.
Third setup module 5013, it is every into L row cell for the third line cell in the output area
In a line cell, the emulation moment variable corresponding emulation moment and typing and the emulation moment pair described in typing
The emulation data answered, L are the positive integer greater than 3.The step that particular content is disclosed referring to embodiments of the present invention Fig. 2
The corresponding content of S203.
With reference to Fig. 7, a kind of structural block diagram of emulation test system provided in an embodiment of the present invention is shown, the parsing is single
Member 502 comprises determining that module 5021, the first read module 5022 and the second read module 5023.
Determining module 5021, for determining that the storage format of the Excel test script is compressed package format;
Decompression module 5022, for being unziped it to the Excel test script, and read the emulation moment and
Emulate data.
Preferably, a kind of structure of emulation test system provided in an embodiment of the present invention is shown with reference to Fig. 8 in conjunction with Fig. 6
Block diagram, the Excel test script further include demand detection variable region, the acquiring unit 501 further include: the 4th setting mould
Block 5014, the 5th setup module 5015 and the 6th setup module 5016.
4th setup module 5014, for the setting demand inspection in the first row cell in demand detection variable region
Survey form, detection variable and default value processing mode default value processing mode, wherein the demand detection variable is opened with REQ_
Head, the default value processing mode are closest approach difference or linear interpolation.In the concrete realization, the demand test format is
Single argument detection or " with door " detection, particular content are corresponding referring to the step S301 that embodiments of the present invention Fig. 3 is disclosed
Content.
5th setup module 5015, for the need to be arranged in the second row cell in demand detection variable region
Seek the composition of detection variable, wherein each demand detection variable includes one or more input variable, each input variable
Next cell step-up error variable, the content where the error variance in the lastrow cell of cell are default value
Processing mode.The corresponding content of step S302 that particular content is disclosed referring to embodiments of the present invention Fig. 3.
6th setup module 5016, for the third line cell in demand detection variable region to L row unit
In every a line cell in lattice, the input variable is set in corresponding standard value of each emulation moment, and setting
For the error variance in corresponding error of each emulation moment, L is the integer greater than 3.Particular content is sent out referring to above-mentioned
The open corresponding content of step S303 of bright implementation example figure 3.
Preferably, the resolution unit 502 is also used to obtain the demand detection variable, the input variable in each institute
State emulation moment corresponding standard value and error, default value processing mode.
Preferably, with reference to Fig. 9, a kind of structural block diagram of emulation test system provided in an embodiment of the present invention, institute are shown
State system further include:
Judging unit 504, for based on being obtained to the corresponding emulation data progress emulation testing of each emulation moment
Simulation result, the simulation result is judged whether in the emulation moment corresponding standard section, if so, the demand
Detecting value of the variable at the emulation moment is 0, if it is not, then value of the demand detection variable at the emulation moment
It is -1.Wherein, the standard section is made of the emulation moment corresponding standard value and error.
Preferably, a kind of knot of emulation test system provided in an embodiment of the present invention is shown with reference to Figure 10 in conjunction with Fig. 9
Structure block diagram, the system also includes:
Storage unit 505, for storing the demand detection variable in the value at each emulation moment.
Feedback unit 506, if the value for demand detection variable at each emulation moment is all 0, feedback refers to
Show the information that detection passes through, otherwise feedback instruction detects unacceptable information.If being not carried out demand detection, feedback instruction is not carried out
The information of demand detection.
In conclusion the embodiment of the present invention provides a kind of emulation test method and system, this method are as follows: obtain preset
Excel test script, wherein preset output function region is included at least in Excel test script, output function region includes
Emulation moment and emulation data for emulation testing.Excel test script is parsed, emulation moment and emulation data are obtained.Base
In emulation moment and emulation data, emulation testing is carried out.In the present solution, preparatory Excel test script, tests foot in Excel
Output function region is divided in this and demand detects variable region.Typing emulation moment and emulation number in output function region
According to, when GCAir Simulation Engineering be based on emulation the moment and emulation data carry out emulation testing.And variable region pair is detected by demand
The simulation results are detected to judge whether emulation testing passes through detection.It does not need to take a significant amount of time study editor's foot
The application method of this grammer and learning test wscript.exe reduces emulation difficulty, time cost and human cost.
All the embodiments in this specification are described in a progressive manner, same and similar portion between each embodiment
Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.Especially for system or
For system embodiment, since it is substantially similar to the method embodiment, so describing fairly simple, related place is referring to method
The part of embodiment illustrates.System and system embodiment described above is only schematical, wherein the conduct
The unit of separate part description may or may not be physically separated, component shown as a unit can be or
Person may not be physical unit, it can and it is in one place, or may be distributed over multiple network units.It can root
According to actual need that some or all of the modules therein is selected to achieve the purpose of the solution of this embodiment.Ordinary skill
Personnel can understand and implement without creative efforts.
Professional further appreciates that, unit described in conjunction with the examples disclosed in the embodiments of the present disclosure
And algorithm steps, can be realized with electronic hardware, computer software, or a combination of the two, in order to clearly demonstrate hardware and
The interchangeability of software generally describes each exemplary composition and step according to function in the above description.These
Function is implemented in hardware or software actually, the specific application and design constraint depending on technical solution.Profession
Technical staff can use different methods to achieve the described function each specific application, but this realization is not answered
Think beyond the scope of this invention.
The foregoing description of the disclosed embodiments enables those skilled in the art to implement or use the present invention.
Various modifications to these embodiments will be readily apparent to those skilled in the art, as defined herein
General Principle can be realized in other embodiments without departing from the spirit or scope of the present invention.Therefore, of the invention
It is not intended to be limited to the embodiments shown herein, and is to fit to and the principles and novel features disclosed herein phase one
The widest scope of cause.
Claims (10)
1. a kind of emulation test method, which is characterized in that the described method includes:
Obtain preset Excel test script, wherein preset output function area is included at least in the Excel test script
Domain, the output function region include the emulation moment and emulation data for emulation testing;
The Excel test script is parsed, the emulation moment and emulation data are obtained;
Based on the emulation moment and emulation data, emulation testing is carried out.
2. the method according to claim 1, wherein dividing the output letter in the Excel test script
Number regions process include:
Setting indicates the range and sampling in the output function region in the first row cell in the output function region
Behavior;
Setting emulation moment variable and output variable in the second row cell of the output area;
In the third line cell in every a line cell into L row cell of the output area, emulated described in typing
Output variable described in the moment variable corresponding emulation moment and typing is in the emulation moment corresponding emulation number
According to L is the positive integer greater than 3.
3. the method according to claim 1, wherein the parsing Excel test script, obtains described imitative
True moment and emulation data, comprising:
The storage format for determining the Excel test script is compressed package format, then decompresses to the Excel test script
Contracting, and read the emulation moment and emulation data.
4. the method according to claim 1, wherein the Excel test script further includes demand detection variable
Region, the process that demand detection variable region is divided in the Excel test script include:
Demand test format, demand detection variable are set in the first row cell in demand detection variable region and lacked
Province is worth processing mode, wherein demand detection variable is started with REQ_, the default value processing mode be closest approach difference or
Person's linear interpolation;
The composition of the demand detection variable is set in the second row cell in demand detection variable region, wherein every
A demand detection variable includes more than one input variable, next cell step-up error variable of each input variable,
Content where the error variance in the lastrow cell of cell is the default value processing mode;
The third line cell in variable region is detected in every a line cell into L row cell in the demand, setting
The input variable is in corresponding standard value of each emulation moment, and the setting error variance is in each emulation
Moment corresponding error, L are the integer greater than 3.
5. according to the method described in claim 4, it is characterized in that, the parsing Excel test script, obtains described imitative
After true moment and emulation data, further includes:
It is corresponding at each emulation moment to obtain the demand detection variable, default value processing mode, the input variable
Standard value and error.
6. according to the method described in claim 5, it is characterized in that, described based on the emulation moment and emulation data, progress
After emulation testing, further includes:
Based on the simulation result that emulation testing obtains is carried out to the corresponding data that emulate of each emulation moment, judge described imitative
Whether true result is in the emulation moment corresponding standard section, and the standard section is by the emulation moment corresponding standard
Value and error are constituted;
If so, value of the demand detection variable at the emulation moment is 0;
If it is not, then value of the demand detection variable at the emulation moment is -1.
7. according to the method described in claim 6, it is characterized in that, whether described judge the simulation result in the emulation
After carving in corresponding standard section, further includes:
The demand detection variable is stored in the value at each emulation moment;
If value of the demand detection variable at each emulation moment is all 0, the information that instruction detection passes through is fed back.
8. a kind of emulation test system, which is characterized in that the system comprises:
Acquiring unit, for obtaining preset Excel test script, wherein included at least in the Excel test script default
Output function region, the output function region include for emulation testing the emulation moment and emulation data;
Resolution unit obtains the emulation moment and emulation data for parsing the Excel test script;
Simulation unit, for carrying out emulation testing based on the emulation moment and emulation data.
9. system according to claim 8, which is characterized in that the acquiring unit includes:
First setup module, for the setting instruction output function area in the first row cell in the output function region
The range and sampling behavior in domain;
Second setup module, for the setting emulation moment variable in the second row cell of the output area and output change
Amount;
Third setup module, for every a line unit of the third line cell in the output area into L row cell
In lattice, the emulation moment variable corresponding emulation moment and typing described in typing are corresponding with the emulation moment described
Data are emulated, L is the positive integer greater than 3.
10. system according to claim 8, which is characterized in that the resolution unit includes:
Determining module, for determining that the storage format of the Excel test script is compressed package format;
Decompression module for unziping it to the Excel test script, and reads the emulation moment and emulation number
According to.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910145507.9A CN109800539B (en) | 2019-02-27 | 2019-02-27 | Simulation test method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910145507.9A CN109800539B (en) | 2019-02-27 | 2019-02-27 | Simulation test method and system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109800539A true CN109800539A (en) | 2019-05-24 |
CN109800539B CN109800539B (en) | 2020-06-05 |
Family
ID=66561395
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910145507.9A Active CN109800539B (en) | 2019-02-27 | 2019-02-27 | Simulation test method and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109800539B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113761745A (en) * | 2021-09-08 | 2021-12-07 | 北京世冠金洋科技发展有限公司 | Joint simulation method and device, storage medium and electronic equipment |
CN114925516A (en) * | 2022-05-16 | 2022-08-19 | 北京世冠金洋科技发展有限公司 | Method and device for automatic modeling and simulation |
Citations (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5282128A (en) * | 1991-11-25 | 1994-01-25 | Braude Eric J | Apparatus and method for determining gradients of process variables |
CN101533261A (en) * | 2007-09-28 | 2009-09-16 | 费舍-柔斯芒特系统股份有限公司 | Method and apparatus for intelligent control and monitoring in a process control system |
US20100262900A1 (en) * | 2009-04-13 | 2010-10-14 | Honeywell International Inc. | Utilizing spreadsheet user interfaces with flowsheets of a cpi simulation system |
CN102184297A (en) * | 2011-05-12 | 2011-09-14 | 天津大学 | Electrical/control system decoupling prediction method suitable for transient parallel simulation of micro-nets |
CN102270262A (en) * | 2011-08-23 | 2011-12-07 | 复旦大学 | Method and device for compressing and decompressing analog waveform of integrated circuit |
JP4889523B2 (en) * | 2007-02-27 | 2012-03-07 | 國松 星畑 | Simulation system for state quantities in complex rivers |
CN103198168A (en) * | 2012-01-10 | 2013-07-10 | 上海汽车集团股份有限公司 | Off-line simulation method |
CN105893667A (en) * | 2016-03-30 | 2016-08-24 | 浙江大学 | Heterogeneous simulation data unified integrated visual method |
CN105955887A (en) * | 2016-05-04 | 2016-09-21 | 重庆长安汽车股份有限公司 | Test data generation method and system |
CN106257367A (en) * | 2015-06-18 | 2016-12-28 | 中核控制系统工程有限公司 | A kind of nuclear power DCS platform test device based on analogue system and method for testing |
CN106610895A (en) * | 2015-10-27 | 2017-05-03 | 北汽福田汽车股份有限公司 | Simulation model evaluation method and apparatus |
CN106989939A (en) * | 2017-03-29 | 2017-07-28 | 江铃汽车股份有限公司 | A kind of method and system of suspension K&C test bed testing comparative analyses |
CN107045567A (en) * | 2017-01-24 | 2017-08-15 | 同济大学 | A kind of window frame structure design method based on the fine equivalent model of door sealing |
-
2019
- 2019-02-27 CN CN201910145507.9A patent/CN109800539B/en active Active
Patent Citations (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5282128A (en) * | 1991-11-25 | 1994-01-25 | Braude Eric J | Apparatus and method for determining gradients of process variables |
JP4889523B2 (en) * | 2007-02-27 | 2012-03-07 | 國松 星畑 | Simulation system for state quantities in complex rivers |
CN101533261A (en) * | 2007-09-28 | 2009-09-16 | 费舍-柔斯芒特系统股份有限公司 | Method and apparatus for intelligent control and monitoring in a process control system |
US20100262900A1 (en) * | 2009-04-13 | 2010-10-14 | Honeywell International Inc. | Utilizing spreadsheet user interfaces with flowsheets of a cpi simulation system |
CN102184297A (en) * | 2011-05-12 | 2011-09-14 | 天津大学 | Electrical/control system decoupling prediction method suitable for transient parallel simulation of micro-nets |
CN102270262A (en) * | 2011-08-23 | 2011-12-07 | 复旦大学 | Method and device for compressing and decompressing analog waveform of integrated circuit |
CN103198168A (en) * | 2012-01-10 | 2013-07-10 | 上海汽车集团股份有限公司 | Off-line simulation method |
CN106257367A (en) * | 2015-06-18 | 2016-12-28 | 中核控制系统工程有限公司 | A kind of nuclear power DCS platform test device based on analogue system and method for testing |
CN106610895A (en) * | 2015-10-27 | 2017-05-03 | 北汽福田汽车股份有限公司 | Simulation model evaluation method and apparatus |
CN105893667A (en) * | 2016-03-30 | 2016-08-24 | 浙江大学 | Heterogeneous simulation data unified integrated visual method |
CN105955887A (en) * | 2016-05-04 | 2016-09-21 | 重庆长安汽车股份有限公司 | Test data generation method and system |
CN107045567A (en) * | 2017-01-24 | 2017-08-15 | 同济大学 | A kind of window frame structure design method based on the fine equivalent model of door sealing |
CN106989939A (en) * | 2017-03-29 | 2017-07-28 | 江铃汽车股份有限公司 | A kind of method and system of suspension K&C test bed testing comparative analyses |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113761745A (en) * | 2021-09-08 | 2021-12-07 | 北京世冠金洋科技发展有限公司 | Joint simulation method and device, storage medium and electronic equipment |
CN113761745B (en) * | 2021-09-08 | 2023-08-15 | 北京世冠金洋科技发展有限公司 | Joint simulation method and device, storage medium and electronic equipment |
CN114925516A (en) * | 2022-05-16 | 2022-08-19 | 北京世冠金洋科技发展有限公司 | Method and device for automatic modeling and simulation |
CN114925516B (en) * | 2022-05-16 | 2024-01-26 | 北京世冠金洋科技发展有限公司 | Automatic modeling and simulating method and device |
Also Published As
Publication number | Publication date |
---|---|
CN109800539B (en) | 2020-06-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106502896B (en) | A kind of generation method and device of function test code | |
CN103885341B (en) | Performance analysis system based on automotive performance simulator and method | |
CN109800539A (en) | A kind of emulation test method and system | |
US7680636B2 (en) | System and method of generating equation-level diagnostic error messages for use in circuit simulation | |
CN116090403A (en) | Command processing system supporting multiple simulators | |
CN109032947A (en) | Test method, device, equipment and storage medium for operating system | |
CN108877806A (en) | System is verified in the test for testing instruction type speech control system | |
Cisco | Product Overview | |
Cisco | Product Overview | |
Cisco | Product Overview | |
Cisco | Overview | |
Cisco | Overview | |
Cisco | Overview | |
Cisco | Overview | |
Cisco | Product Overview | |
Cisco | Overview | |
Cisco | Product Overview | |
Cisco | Product Overview | |
Cisco | Product Overview | |
Cisco | Product Overview | |
Cisco | Overview | |
Cisco | Overview | |
Cisco | Overview | |
Cisco | Overview | |
CN114185781A (en) | Logic test case automatic generation method and device based on control logic diagram |
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 | ||
PE01 | Entry into force of the registration of the contract for pledge of patent right | ||
PE01 | Entry into force of the registration of the contract for pledge of patent right |
Denomination of invention: A simulation test method and system Effective date of registration: 20201230 Granted publication date: 20200605 Pledgee: Beijing ustron Tongsheng financing Company limited by guarantee Pledgor: BEIJING SHI GUAN JIN YANG TECHNOLOGY DEVELOPMENT Co.,Ltd. Registration number: Y2020990001530 |