How to convert test case to 'Real-Time Test(Simulation Test)' programmatically?

5 views (last 30 days)
多诺万麦格劳
多诺万麦格劳 on 14 Jun 2021
Answered: Alex Howard on 13 Aug 2021
I am trying to write a script to run a series of test cases and would like to open Test Manager as little as possible. I have found that you can programmatically create a test case and specify the type as either 'baseline','equivalence', or 'simulation'. However, I have not been able to find a type to create a test case for real-time simulation without having to open Test Manager. Is there a way to do this?

Answers (1)

Alex Howard
Alex Howard on 13 Aug 2021
Hi Donovan,
It sounds like you would like to be able to programmatically 1) create a real-time test or 2) convert an existing test case to a real-time test case.
Looking at the documentation for the sltest.testmanager.TestCase class, the TestType property does not appear to support real-time tests. Additionally, the RunOnTarget property, which indicates if a test case is configured to run on a target, cannot be changed, as the set access is private. The convertTestType function does not appear to support real-time tests, and I do not see another function to convert the test type.
The above leads me to believe that this is not currently possible. I've passed this feedback on to the development team so that they might consider implementing this functionality in a future release.
Best,
Alex

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!