Automatically run Live Editor
12 views (last 30 days)
Marco Bottani on 7 Apr 2021
I am using Live Editor to generate reports for some tests.
So far I have written almost 50 test cases and for each one I have to click the "Run" button to compile the Live Editor report, and it would be great to automatically generate the report when the test is complete.
Is there any way to run the Live editor with commands? Or at least in an automated manner?
That would be really helpful.
Thanks a lot.
Hrishikesh Borate on 23 Apr 2021
It’s my understanding that you are trying to automate the execution of live scripts. Assuming that all the live scripts are located in a particular directory, say sampleDirectory, following code demonstrates the automatic execution of live scripts, saving the live scrips and publishing the results as PDF files :-
% specify path to the live scripts
filePath = fullfile(pwd,'sampleDirectory\');
% set the options according to the use case
options = struct('format','pdf','outputDir',filePath);
fileNames = dir(filePath);
for j = 1:size(fileNames,1)
For more information, refer to publish.