diff --git a/performance-test/backend/src/main/java/io/metersphere/engine/EngineFactory.java b/performance-test/backend/src/main/java/io/metersphere/engine/EngineFactory.java index d543a3529f..5c0cafe153 100644 --- a/performance-test/backend/src/main/java/io/metersphere/engine/EngineFactory.java +++ b/performance-test/backend/src/main/java/io/metersphere/engine/EngineFactory.java @@ -192,6 +192,10 @@ public class EngineFactory { if (CollectionUtils.isNotEmpty(resourceFiles)) { resourceFiles.forEach(cf -> { InputStream in = fileMetadataService.getFileAsStream(cf.getId()); + if (in == null) { + byte[] bytes = fileMetadataService.loadFileAsBytes(cf.getId()); + in = new ByteArrayInputStream(bytes); + } testResourceFiles.put(cf.getName(), in); }); }