MATLAB: How to use Simulink Test with ‘nodisplay’ option enabled

simulink

When I use Simulink Test with 'nodisplay' option enabled, I am getting the following error :
"Harness operations are not supported because MATLAB was started with -nodisplay option. Please restart MATLAB without this option to enable harness operations". So is there any workaround so that Simulink Test can be used with 'nodisplay' option on?

Best Answer

The only harness operations that are not supported with the -nodisplay option are:
1. harness creation with Signal Builder source
2. harness open (can do load instead of open)
3. push and rebuild
Everything else should work with this option. To work around this,
1. Create harnesses with other types of source (Inport, Test Sequence, etc)
2. Use sltest.harness.load instead of sltest.harness.open in scripts.
3. When creating harnesses, pass in the name/value pair ('RebuildOnOpen', false) as follows:
>> sltest.harness.create(harnessOwner, 'Name', 'h1', 'Source', 'Inport', 'RebuildOnOpen', false)