How to create a duplicate test case programmatically, just like copy/paste in the test manager under the same test suite.
17 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Peddi Satish Babu
am 18 Dez. 2025 um 10:24
Kommentiert: Peddi Satish Babu
am 19 Dez. 2025 um 4:34
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 Kommentare
Akzeptierte Antwort
Fangjun Jiang
am 18 Dez. 2025 um 15:41
4 Kommentare
Fangjun Jiang
am 18 Dez. 2025 um 18:41
'PreloadCallback'
'PostloadCallback'
'CleanupCallback'
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Test Execution finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!