[SoapUI] 判断工程下某个文件是否存在,存在就删除
def excelName = "AllTests-Fails" String projectPath = context.expand( '${projectDir}' ) String filePath = projectPath+ "/TestResult/" + excelName + ".xlsx" //删除已存在的错误报告 File testResultFile = new File(filePath) if(testResultFile.exists()){ testResultFile.delete() }