How to add relative path file in Simulink Test Manager?

6 次查看(过去 30 天)
Hi all,
I use Simulink Test Manager for model testing.
But when copy test project folder to other path or other PC, we need to change path of test file.
ex: Input test file
So, I want to ask how to fix this problem?
Thank you so much

回答(1 个)

Altaïr
Altaïr 2025-3-19
Hey @galaxy,
Using a MATLAB project is an elegant approach for organizing work. A project can be created from a folder using the "From Folder" option.
In the subsequent steps, the wizard allows configuration of folders to be added to the path when the project opens and removed when it closes. The project also supports startup and shutdown scripts.
Create a project with all the files to be shared, and add all the necessary folders to the path using the wizard. This setup allows specifying just the input file name instead of the full path as shown below.
Alternatively, the PRE-LOAD callback can be used for each test case.
More details can be found in this MATLAB Answer: https://www.mathworks.com/matlabcentral/answers/2137798
To access the documentation for MATLAB projects, use the following command:
web(fullfile(docroot, 'matlab/projects.html'))

类别

Help CenterFile Exchange 中查找有关 Results, Reporting, and Test File Management 的更多信息

标签

产品


版本

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by