diff --git a/backend/src/main/java/io/metersphere/api/jmeter/APIBackendListenerClient.java b/backend/src/main/java/io/metersphere/api/jmeter/APIBackendListenerClient.java index 87bf1cb7e1..66f71dc3f3 100644 --- a/backend/src/main/java/io/metersphere/api/jmeter/APIBackendListenerClient.java +++ b/backend/src/main/java/io/metersphere/api/jmeter/APIBackendListenerClient.java @@ -195,14 +195,23 @@ public class APIBackendListenerClient extends AbstractBackendListenerClient impl } else { String[] sceneNameArr = scenaName.split("-"); if (sceneNameArr.length >= 4) { + //如果以yyyy-MM-dd 时间类型结尾 String endStr = "-" + sceneNameArr[sceneNameArr.length - 3] + "-" + sceneNameArr[sceneNameArr.length - 2] + "-" + sceneNameArr[sceneNameArr.length - 1]; scenaName = scenaName.split(endStr)[0]; } else { + //如果以时间戳结尾 scenaName = scenaName.split("-")[0]; } } + ApiScenarioReport savedReport = apiScenarioReportService.get(testId); + String scenarioID = null; + if(savedReport!=null){ + scenarioID = savedReport.getScenarioId(); + } + if(scenarioID==null){ + scenarioID = apiScenarioReportService.getApiScenarioId(scenaName, scenarioReport.getProjectId()); + } - String scenarioID = apiScenarioReportService.getApiScenarioId(scenaName, scenarioReport.getProjectId()); testResult.setTestId(scenarioID); } else { apiTestService.changeStatus(testId, APITestStatus.Completed); diff --git a/frontend/src/business/components/api/automation/scenario/ScenarioExtendBtns.vue b/frontend/src/business/components/api/automation/scenario/ScenarioExtendBtns.vue index c055c7c657..087f701c38 100644 --- a/frontend/src/business/components/api/automation/scenario/ScenarioExtendBtns.vue +++ b/frontend/src/business/components/api/automation/scenario/ScenarioExtendBtns.vue @@ -5,7 +5,7 @@ {{ $t('api_test.automation.view_ref') }} - {{ $t('api_test.automation.schedule') }} + {{ $t('api_test.automation.schedule') }} diff --git a/frontend/src/business/components/api/automation/schedule/ScheduleMaintain.vue b/frontend/src/business/components/api/automation/schedule/ScheduleMaintain.vue index af72b48a36..d29ce8a103 100644 --- a/frontend/src/business/components/api/automation/schedule/ScheduleMaintain.vue +++ b/frontend/src/business/components/api/automation/schedule/ScheduleMaintain.vue @@ -10,7 +10,7 @@ prop="cronValue"> - {{ + {{ $t('commons.save') }} diff --git a/frontend/src/business/components/api/homepage/ApiTestHomePage.vue b/frontend/src/business/components/api/homepage/ApiTestHomePage.vue index 5bd7b78104..1c54476b84 100644 --- a/frontend/src/business/components/api/homepage/ApiTestHomePage.vue +++ b/frontend/src/business/components/api/homepage/ApiTestHomePage.vue @@ -6,10 +6,10 @@ 🤔️天凉了,保温杯买了吗?
- 😔觉得MeterSphere不好用就来https://github.com/metersphere/metersphere/issues吐个槽吧! + 😔觉得MeterSphere不好用就来 https://github.com/metersphere/metersphere/issues 吐个槽吧!
- 😄觉得MeterSphere好用就来 https://github.com/metersphere/metersphere 点个star吧! + 😄觉得MeterSphere好用就来 https://github.com/metersphere/metersphere 点个star吧!
😊 MeterSphere温馨提醒 —— 多喝热水哟!