How to create a duplicate test case programmatically, just like copy/paste in the test manager under the same test suite.
15 ビュー (過去 30 日間)
古いコメントを表示
Hello,
I am currently working with the Simulink Test Manager and need assistance with programmatically duplicating test cases within the same test suite, similar to the "copy/paste" functionality available in the Test Manager interface.
I have a test suite loaded, and I want to create new test cases by duplicating existing ones. The goal is to maintain all properties (including the scripts and variable definitions in the callback sections) and settings of the original test case in the new duplicates.
So far, I have tried to retrieve the existing test case I wish to duplicate into the workspace and used dot operations like copy and duplicate, but these methods did not work as expected. For example:
newTestCase = existingTestCase.copy;
newTestCase = existingTestCase.duplicate;
A follow-up question, is it possible to programmatically edit or modify the scripts written in the callback sections of test cases? I am looking to automate the process of creating multiple test cases based on an existing one that was manually created in the Test Manager.
If anyone has experience with this or can provide guidance on how to achieve this programmatically, I would greatly appreciate your help!
Thank you
0 件のコメント
採用された回答
Fangjun Jiang
約4時間 前
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!