diff --git a/src/api/API.cpp b/src/api/API.cpp index 60fc9d8471..63b4a9fda8 100644 --- a/src/api/API.cpp +++ b/src/api/API.cpp @@ -83,7 +83,12 @@ SimulationResults APIInternal::execute( study_->folderOutput, ioQueueService, durationCollector); - study_->saveAboutTheStudy(*resultWriter); + + // In some cases (e.g tests) we don't want to write anything + if (!output.empty()) + { + study_->saveAboutTheStudy(*resultWriter); + } SimulationObserver simulationObserver;