diff --git a/backend/src/main/java/io/metersphere/api/dto/definition/request/assertions/MsAssertions.java b/backend/src/main/java/io/metersphere/api/dto/definition/request/assertions/MsAssertions.java index 1ebf31c486..33c0144798 100644 --- a/backend/src/main/java/io/metersphere/api/dto/definition/request/assertions/MsAssertions.java +++ b/backend/src/main/java/io/metersphere/api/dto/definition/request/assertions/MsAssertions.java @@ -59,7 +59,7 @@ public class MsAssertions extends MsTestElement { ); } - if (this.getDuration().isValid()) { + if (this.getDuration() != null && this.getDuration().isValid()) { hashTree.add(durationAssertion(this.getDuration())); } }