How to achieve test automation using a test harness in Simulink Test?
9 views (last 30 days)
I am a novice in Simulink, and I am trying to test a subsystem of a Simulink model using a test harness. I have created a test harness in which I manipulate manually the inputs of the component under test, then I observe and record manually the outputs in an Excel spreadsheet. The inputs are basically constant blocks, while the outputs are display blocks. Given some inputs, if the outputs are those expected, then the test has passed.
My question is how can I automate this manual testing?
I gather from the Simulink Test documentation that the Test Manager allows test automation. I see that a baseline/simulation test allows parameter overrides, which can be used in iterations. However, I wasn't able to figure out how to automate the use my of test harness.
Jon Lobo on 6 Dec 2016
In the test manager, you will create a test case. Generally speaking, a test case is created to test a specific functionality. The simulink model may have several desired functionalities / requirements, and therefore you may have several test cases eventually.
To do automated testing of parameter sweeps or maybe run through a set of pre-defined parameters, you can use the iterations approach (scripted or manual). This you would set up in the test manager. From the test manager you can click run all to run all iterations of the test, which will pass/fail the different iterations based on the criteria you provided.