refactor(接口测试): 执行步骤补充项目id

This commit is contained in:
fit2-zhao 2024-02-03 16:21:02 +08:00 committed by Craftsman
parent 9269aba07b
commit 64b22a6d9a
2 changed files with 3 additions and 1 deletions

View File

@ -1,5 +1,5 @@
package io.metersphere.plugin.api.constants;
public enum ElementProperty {
MS_RESOURCE_ID, MS_STEP_ID, MS_FAKE_ERROR, MS_REPORT_ID
MS_RESOURCE_ID, MS_STEP_ID, MS_FAKE_ERROR, MS_REPORT_ID, PROJECT_ID
}

View File

@ -47,6 +47,8 @@ public class MsHTTPElementConverter extends AbstractJmeterElementConverter<MsHTT
sampler.setProperty(ElementProperty.MS_RESOURCE_ID.name(), msHTTPElement.getResourceId());
sampler.setProperty(ElementProperty.MS_STEP_ID.name(), msHTTPElement.getStepId());
sampler.setProperty(ElementProperty.MS_REPORT_ID.name(), config.getReportId());
sampler.setProperty(ElementProperty.PROJECT_ID.name(), msHTTPElement.getProjectId());
sampler.setMethod(msHTTPElement.getMethod());
// todo 根据环境设置
sampler.setDomain(msHTTPElement.getUrl());