Can we save certain workspace data in Matlab into mat-file by running Test Manager?
Welcome to the forum. If I understand correctly you are using TestManager to execute CarMaker 4 Simulink. Is this correct?
Simulink offers Model Callbacks which might provide the hooks you need. You could, for example, use the StopFcn callback and execute some custom MATLAB code to save some variables to a mat file.