导入数据创建测试用例.docx

导入数据创建测试用例.docx

ID:59357115

大小:235.98 KB

页数:9页

时间:2020-09-04

导入数据创建测试用例.docx_第1页
导入数据创建测试用例.docx_第2页
导入数据创建测试用例.docx_第3页
导入数据创建测试用例.docx_第4页
导入数据创建测试用例.docx_第5页
资源描述:

《导入数据创建测试用例.docx》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库

1、ImportingDatatoCreateanInputTestCase以下介绍两种方法1.从workspace2.从signalbuliderOnthispage…GuidelinesforImportingaTestCaseExampleofTestCaseDataUsingaFromWorkspaceBlocktoImportanInputTestCaseUsingaSignalBuilderBlocktoImportanInputTestCaseGuidelinesforImportingaTestCaseTypicallywhenimp

2、ortingatestcaseinSimulink,youwantto:·Createasignalthathasrampsandsteps.Inotherwords,thesignalhasoneormorediscontinuities.·Createthesignalusingthefewestpointspossible.以最少的点创建测试用例。·HavetheSimulinksolverexecuteatthespecifieddiscontinuities.使simulink在非连续点求解。ToimportthissignalinSi

3、mulink,useaFromWorkspace,FromFile,orSignalBuilderblock,allofwhichsupportzero-crossingdetection.ExampleofTestCaseDataThefollowingisanexampleoftestcasedata:Thefollowingtwoexamplesusethistestcasedata.UsingaFromWorkspaceBlocktoImportanInputTestCase1.Opentheex_data_import_test_cas

4、e_from_workspace.mdlmodel.2.Enablezero-crossingdetection.IntheFromWorkspaceblockdialog,selectEnablezero-crossingdetection.3.Createasignalstructureforthetestcase.Ateachdiscontinuity,enteraduplicateentryinthetimevector.AsdescribedintheFromWorkspaceblockdocumentation,thisgenerat

5、esazero-crossingandforcesthevariable-stepsolvertotakeatimestepatthisexacttime.创建结构体测试用例,每个断点,重复一次时间向量Definethevarstructurerepresentingthetestcase:var.time=[011558810];var.signals.values=[00222333]';var.signals.dimensions=1;4.Toimportthetestcasestructure,intheFromWorkspacebloc

6、kdialog,intheDataparameter,specifyvar.5.Simulatethemodel.TheScopeblockreflectsthetestcasedata.UsingaSignalBuilderBlocktoImportanInputTestCaseAsanalternativetousingaFromWorkspaceblock,youcanuseaSignalBuilderblocktoeithercreateasignalinteractivelyortoimportasignalfromaMAT-file.

7、1.Opentheex_data_import_signal_buildermodel.2.CreateastructureandsaveitinaMAT-file:3.var.time=[011558810];4.var.signals.values=[00222333]';5.var.signals.dimensions=1;6.var.signals.label='var';7.savevar.matvar8.Double-clicktheSignalBuilderblocktoopenitsdialogbox.9.SelectFile>I

8、mportFromFilemenuitem,andselectthevar.matfile.10.IntheSelectparamete

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。