refactor(测试跟踪): 优化拼写错误

This commit is contained in:
chenjianxing 2022-10-21 17:46:39 +08:00 committed by jianxing
parent e3531d5ee2
commit f718ced7e8
59 changed files with 128 additions and 241 deletions

View File

@ -24,7 +24,7 @@ public class CronUtils {
if (!CronExpression.isValidExpression(cron)) { if (!CronExpression.isValidExpression(cron)) {
throw new RuntimeException("cron :" + cron + "表达式解析错误"); throw new RuntimeException("cron :" + cron + "表达式解析错误");
} }
return TriggerBuilder.newTrigger().withIdentity("Caclulate Date").withSchedule(CronScheduleBuilder.cronSchedule(cron)).build(); return TriggerBuilder.newTrigger().withIdentity("Calculate Date").withSchedule(CronScheduleBuilder.cronSchedule(cron)).build();
} }
/** /**

View File

@ -7,5 +7,5 @@ import lombok.Setter;
@Getter @Getter
public class PlatformStatusDTO { public class PlatformStatusDTO {
protected String value; protected String value;
protected String lable; protected String label;
} }

View File

@ -110,4 +110,4 @@
</if> </if>
</select> </select>
</mapper> </mapper>

View File

@ -1,8 +1,6 @@
package io.metersphere.base.mapper.ext; package io.metersphere.base.mapper.ext;
import io.metersphere.base.domain.ApiScenarioWithBLOBs;
import io.metersphere.base.domain.TestCaseReviewScenario; import io.metersphere.base.domain.TestCaseReviewScenario;
//import io.metersphere.reuqest.TestPlanScenarioRequest;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.util.List; import java.util.List;
@ -10,9 +8,6 @@ import java.util.List;
public interface ExtTestCaseReviewScenarioCaseMapper { public interface ExtTestCaseReviewScenarioCaseMapper {
void insertIfNotExists(@Param("request") TestCaseReviewScenario request); void insertIfNotExists(@Param("request") TestCaseReviewScenario request);
// todo check
// List<ApiScenarioWithBLOBs> list(@Param("request") TestPlanScenarioRequest request);
List<String> getExecResultByReviewId(String reviewId); List<String> getExecResultByReviewId(String reviewId);
List<String> getIdsByReviewId(String reviewId); List<String> getIdsByReviewId(String reviewId);

View File

@ -13,78 +13,6 @@
) )
</insert> </insert>
<!-- <select id="list" resultType="io.metersphere.api.dto.automation.ApiScenarioDTO">-->
<!-- select-->
<!-- t.id, t.environment, t.create_time, t.update_time, t.last_result, t.pass_rate, t.report_id, c.scenario_definition,-->
<!-- c.id as case_id, c.project_id, c.user_id,c.api_scenario_module_id, c.module_path, c.name, c.level,-->
<!-- c.status, c.principal, c.step_total, c.schedule, c.description, c.tags, c.num,-->
<!-- p.name as project_name, p.id as project_id, u.name as user_name-->
<!-- from-->
<!-- test_case_review_scenario t-->
<!-- inner join-->
<!-- api_scenario c-->
<!-- on t.api_scenario_id = c.id and c.status != 'Trash'-->
<!-- <if test="request.reviewId != null and request.reviewId!=''">-->
<!-- and t.test_case_review_id = #{request.reviewId}-->
<!-- </if>-->
<!-- left join project p-->
<!-- on c.project_id = p.id-->
<!-- left join user u-->
<!-- on c.user_id = u.id-->
<!-- where 1-->
<!-- <if test="request.ids != null and request.ids.size() > 0">-->
<!-- <if test="request.projectId != null and request.projectId!=''">-->
<!-- and-->
<!-- </if>-->
<!-- t.id in-->
<!-- <foreach collection="request.ids" item="caseId" separator="," open="(" close=")">-->
<!-- #{caseId}-->
<!-- </foreach>-->
<!-- </if>-->
<!-- <if test="request.name != null and request.name!=''">-->
<!-- and (c.name like CONCAT('%', #{request.name},'%')-->
<!-- or c.num like CONCAT('%', #{request.name},'%')-->
<!-- or c.tags like CONCAT('%', #{request.name},'%'))-->
<!-- </if>-->
<!-- <if test="request.status != null and request.status!=''">-->
<!-- and t.last_result like CONCAT('%', #{request.status},'%')-->
<!-- </if>-->
<!-- <if test="request.moduleIds != null and request.moduleIds.size() > 0">-->
<!-- and c.api_scenario_module_id in-->
<!-- <foreach collection="request.moduleIds" item="nodeId" separator="," open="(" close=")">-->
<!-- #{nodeId}-->
<!-- </foreach>-->
<!-- </if>-->
<!-- <if test="request.filters != null and request.filters.size() > 0">-->
<!-- <foreach collection="request.filters.entrySet()" index="key" item="values">-->
<!-- <if test="values != null and values.size() > 0">-->
<!-- <choose>-->
<!-- <when test="key == 'priority'">-->
<!-- and c.priority in-->
<!-- <foreach collection="values" item="value" separator="," open="(" close=")">-->
<!-- #{value}-->
<!-- </foreach>-->
<!-- </when>-->
<!-- </choose>-->
<!-- </if>-->
<!-- </foreach>-->
<!-- </if>-->
<!-- <if test="request.orders != null and request.orders.size() > 0">-->
<!-- order by-->
<!-- <foreach collection="request.orders" separator="," item="order">-->
<!-- <choose>-->
<!-- <when test="order.name == 'update_time'">-->
<!-- t.${order.name} ${order.type}-->
<!-- </when>-->
<!-- <otherwise>-->
<!-- ${order.name} ${order.type}-->
<!-- </otherwise>-->
<!-- </choose>-->
<!-- </foreach>-->
<!-- </if>-->
<!-- </select>-->
<select id="getExecResultByReviewId" resultType="java.lang.String"> <select id="getExecResultByReviewId" resultType="java.lang.String">
select last_result select last_result
from from

View File

@ -5,7 +5,7 @@ import io.metersphere.base.domain.TestPlan;
import io.metersphere.dto.ParamsDTO; import io.metersphere.dto.ParamsDTO;
import io.metersphere.dto.TestPlanDTOWithMetric; import io.metersphere.dto.TestPlanDTOWithMetric;
import io.metersphere.plan.dto.TestPlanDTO; import io.metersphere.plan.dto.TestPlanDTO;
import io.metersphere.plan.reuest.QueryTestPlanRequest; import io.metersphere.plan.request.QueryTestPlanRequest;
import org.apache.ibatis.annotations.MapKey; import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;

View File

@ -149,7 +149,7 @@
</sql> </sql>
<select id="list" resultType="io.metersphere.dto.TestPlanDTOWithMetric" <select id="list" resultType="io.metersphere.dto.TestPlanDTOWithMetric"
parameterType="io.metersphere.plan.reuest.QueryTestPlanRequest"> parameterType="io.metersphere.plan.request.QueryTestPlanRequest">
select DISTINCT test_plan.*, project.name as projectName,schedule.id as scheduleId, select DISTINCT test_plan.*, project.name as projectName,schedule.id as scheduleId,
(select name from user where user.id = test_plan.creator) as createUser, (select name from user where user.id = test_plan.creator) as createUser,
IF(schedule.enable = true,true,false) as scheduleOpen IF(schedule.enable = true,true,false) as scheduleOpen
@ -264,7 +264,7 @@
</sql> </sql>
<select id="planList" resultMap="BaseResultMap" <select id="planList" resultMap="BaseResultMap"
parameterType="io.metersphere.plan.reuest.QueryTestPlanRequest"> parameterType="io.metersphere.plan.request.QueryTestPlanRequest">
SELECT * FROM test_plan p LEFT JOIN test_plan_project t ON t.test_plan_id=p.ID SELECT * FROM test_plan p LEFT JOIN test_plan_project t ON t.test_plan_id=p.ID
<where> <where>
<if test="request.workspaceId != null"> <if test="request.workspaceId != null">
@ -307,7 +307,7 @@
</select> </select>
<select id="selectTestPlanByRelevancy" resultMap="BaseResultMap" <select id="selectTestPlanByRelevancy" resultMap="BaseResultMap"
parameterType="io.metersphere.plan.reuest.QueryTestPlanRequest"> parameterType="io.metersphere.plan.request.QueryTestPlanRequest">
SELECT * FROM test_plan p SELECT * FROM test_plan p
<where> <where>
<if test="request.scenarioId != null"> <if test="request.scenarioId != null">

View File

@ -2,10 +2,10 @@ package io.metersphere.base.mapper.ext;
import io.metersphere.dto.PlanReportCaseDTO; import io.metersphere.dto.PlanReportCaseDTO;
import io.metersphere.plan.dto.TestCaseReportStatusResultDTO; import io.metersphere.plan.dto.TestCaseReportStatusResultDTO;
import io.metersphere.plan.reuest.function.QueryTestPlanCaseRequest; import io.metersphere.plan.request.function.QueryTestPlanCaseRequest;
import io.metersphere.request.BaseQueryRequest; import io.metersphere.request.BaseQueryRequest;
import io.metersphere.dto.*; import io.metersphere.dto.*;
import io.metersphere.plan.reuest.function.TestPlanFuncCaseConditions; import io.metersphere.plan.request.function.TestPlanFuncCaseConditions;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.util.List; import java.util.List;

View File

@ -7,7 +7,7 @@ import io.metersphere.log.annotation.MsAuditLog;
import io.metersphere.request.testcase.DragNodeRequest; import io.metersphere.request.testcase.DragNodeRequest;
import io.metersphere.request.testcase.QueryNodeRequest; import io.metersphere.request.testcase.QueryNodeRequest;
import io.metersphere.request.testcase.QueryTestCaseRequest; import io.metersphere.request.testcase.QueryTestCaseRequest;
import io.metersphere.plan.reuest.function.QueryTestPlanCaseRequest; import io.metersphere.plan.request.function.QueryTestPlanCaseRequest;
import io.metersphere.request.testreview.QueryCaseReviewRequest; import io.metersphere.request.testreview.QueryCaseReviewRequest;
import io.metersphere.dto.TestCaseNodeDTO; import io.metersphere.dto.TestCaseNodeDTO;
import io.metersphere.service.BaseCheckPermissionService; import io.metersphere.service.BaseCheckPermissionService;

View File

@ -14,12 +14,12 @@ import io.metersphere.notice.annotation.SendNotice;
import io.metersphere.plan.dto.TestCaseReportStatusResultDTO; import io.metersphere.plan.dto.TestCaseReportStatusResultDTO;
import io.metersphere.plan.dto.TestPlanDTO; import io.metersphere.plan.dto.TestPlanDTO;
import io.metersphere.plan.dto.TestPlanSimpleReportDTO; import io.metersphere.plan.dto.TestPlanSimpleReportDTO;
import io.metersphere.plan.reuest.AddTestPlanRequest; import io.metersphere.plan.request.AddTestPlanRequest;
import io.metersphere.plan.reuest.QueryTestPlanRequest; import io.metersphere.plan.request.QueryTestPlanRequest;
import io.metersphere.plan.reuest.ScheduleInfoRequest; import io.metersphere.plan.request.ScheduleInfoRequest;
import io.metersphere.plan.reuest.api.TestPlanRunRequest; import io.metersphere.plan.request.api.TestPlanRunRequest;
import io.metersphere.plan.reuest.function.PlanCaseRelevanceRequest; import io.metersphere.plan.request.function.PlanCaseRelevanceRequest;
import io.metersphere.plan.reuest.function.TestCaseRelevanceRequest; import io.metersphere.plan.request.function.TestCaseRelevanceRequest;
import io.metersphere.plan.service.TestPlanProjectService; import io.metersphere.plan.service.TestPlanProjectService;
import io.metersphere.plan.service.TestPlanRerunService; import io.metersphere.plan.service.TestPlanRerunService;
import io.metersphere.plan.service.TestPlanService; import io.metersphere.plan.service.TestPlanService;

View File

@ -14,7 +14,7 @@ import io.metersphere.notice.annotation.SendNotice;
import io.metersphere.dto.TestPlanReportDTO; import io.metersphere.dto.TestPlanReportDTO;
import io.metersphere.dto.TestPlanScheduleReportInfoDTO; import io.metersphere.dto.TestPlanScheduleReportInfoDTO;
import io.metersphere.plan.dto.TestPlanSimpleReportDTO; import io.metersphere.plan.dto.TestPlanSimpleReportDTO;
import io.metersphere.plan.reuest.TestPlanReportSaveRequest; import io.metersphere.plan.request.TestPlanReportSaveRequest;
import io.metersphere.request.report.QueryTestPlanReportRequest; import io.metersphere.request.report.QueryTestPlanReportRequest;
import io.metersphere.plan.service.TestPlanReportService; import io.metersphere.plan.service.TestPlanReportService;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;

View File

@ -9,10 +9,10 @@ import io.metersphere.commons.utils.PageUtils;
import io.metersphere.commons.utils.Pager; import io.metersphere.commons.utils.Pager;
import io.metersphere.dto.TestPlanCaseDTO; import io.metersphere.dto.TestPlanCaseDTO;
import io.metersphere.log.annotation.MsAuditLog; import io.metersphere.log.annotation.MsAuditLog;
import io.metersphere.plan.reuest.function.QueryTestPlanCaseRequest; import io.metersphere.plan.request.function.QueryTestPlanCaseRequest;
import io.metersphere.plan.reuest.function.TestPlanCaseBatchRequest; import io.metersphere.plan.request.function.TestPlanCaseBatchRequest;
import io.metersphere.plan.reuest.function.TestPlanFuncCaseBatchRequest; import io.metersphere.plan.request.function.TestPlanFuncCaseBatchRequest;
import io.metersphere.plan.reuest.function.TestPlanFuncCaseEditRequest; import io.metersphere.plan.request.function.TestPlanFuncCaseEditRequest;
import io.metersphere.plan.service.TestPlanTestCaseService; import io.metersphere.plan.service.TestPlanTestCaseService;
import io.metersphere.request.ResetOrderRequest; import io.metersphere.request.ResetOrderRequest;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;

View File

@ -2,7 +2,7 @@ package io.metersphere.controller;
import io.metersphere.base.domain.TestCase; import io.metersphere.base.domain.TestCase;
import io.metersphere.dto.BugStatustics; import io.metersphere.dto.BugStatistics;
import io.metersphere.dto.TrackCountResult; import io.metersphere.dto.TrackCountResult;
import io.metersphere.dto.TrackStatisticsDTO; import io.metersphere.dto.TrackStatisticsDTO;
import io.metersphere.i18n.Translator; import io.metersphere.i18n.Translator;
@ -89,7 +89,7 @@ public class TrackController {
} }
@GetMapping("/bug/count/{projectId}") @GetMapping("/bug/count/{projectId}")
public BugStatustics getBugStatistics(@PathVariable String projectId) { public BugStatistics getBugStatistics(@PathVariable String projectId) {
return trackService.getBugStatistics(projectId); return trackService.getBugStatistics(projectId);
} }
} }

View File

@ -8,7 +8,7 @@ import java.util.List;
@Getter @Getter
@Setter @Setter
public class BugStatustics { public class BugStatistics {
private long bugTotalSize; private long bugTotalSize;
private String rage; private String rage;

View File

@ -1,4 +1,4 @@
package io.metersphere.plan.reuest; package io.metersphere.plan.request;
import io.metersphere.base.domain.TestPlanWithBLOBs; import io.metersphere.base.domain.TestPlanWithBLOBs;
import lombok.Getter; import lombok.Getter;

View File

@ -1,6 +1,6 @@
package io.metersphere.plan.reuest; package io.metersphere.plan.request;
import io.metersphere.plan.reuest.performance.LoadCaseRequest; import io.metersphere.plan.request.performance.LoadCaseRequest;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; import lombok.Setter;

View File

@ -1,4 +1,4 @@
package io.metersphere.plan.reuest; package io.metersphere.plan.request;
import io.metersphere.base.domain.TestPlan; import io.metersphere.base.domain.TestPlan;
import io.metersphere.request.OrderRequest; import io.metersphere.request.OrderRequest;

View File

@ -1,4 +1,4 @@
package io.metersphere.plan.reuest; package io.metersphere.plan.request;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; import lombok.Setter;

View File

@ -1,4 +1,4 @@
package io.metersphere.plan.reuest; package io.metersphere.plan.request;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; import lombok.Setter;

View File

@ -1,4 +1,4 @@
package io.metersphere.plan.reuest.api; package io.metersphere.plan.request.api;
import io.metersphere.dto.TestPlanExecuteReportDTO; import io.metersphere.dto.TestPlanExecuteReportDTO;

View File

@ -1,4 +1,4 @@
package io.metersphere.plan.reuest.api; package io.metersphere.plan.request.api;
import io.metersphere.dto.RunModeConfigDTO; import io.metersphere.dto.RunModeConfigDTO;
import lombok.Getter; import lombok.Getter;
@ -43,7 +43,7 @@ public class RunScenarioRequest {
private boolean isTestPlanScheduleJob = false; private boolean isTestPlanScheduleJob = false;
//生成测试报告当isTestPlanScheduleJob为ture时使用 //生成测试报告当isTestPlanScheduleJob为true时使用
private String testPlanReportId; private String testPlanReportId;
private String requestOriginator; private String requestOriginator;

View File

@ -1,4 +1,4 @@
package io.metersphere.plan.reuest.api; package io.metersphere.plan.request.api;
import io.metersphere.dto.RunModeConfigDTO; import io.metersphere.dto.RunModeConfigDTO;
import lombok.Getter; import lombok.Getter;

View File

@ -1,6 +1,6 @@
package io.metersphere.plan.reuest.api; package io.metersphere.plan.request.api;
import io.metersphere.plan.reuest.QueryTestPlanRequest; import io.metersphere.plan.request.QueryTestPlanRequest;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; import lombok.Setter;

View File

@ -1,4 +1,4 @@
package io.metersphere.plan.reuest.function; package io.metersphere.plan.request.function;
import io.metersphere.request.testcase.QueryTestCaseRequest; import io.metersphere.request.testcase.QueryTestCaseRequest;
import lombok.Getter; import lombok.Getter;

View File

@ -1,4 +1,4 @@
package io.metersphere.plan.reuest.function; package io.metersphere.plan.request.function;
import io.metersphere.request.BaseQueryRequest; import io.metersphere.request.BaseQueryRequest;
import lombok.Getter; import lombok.Getter;

View File

@ -1,4 +1,4 @@
package io.metersphere.plan.reuest.function; package io.metersphere.plan.request.function;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; import lombok.Setter;

View File

@ -1,4 +1,4 @@
package io.metersphere.plan.reuest.function; package io.metersphere.plan.request.function;
import io.metersphere.base.domain.TestPlanTestCase; import io.metersphere.base.domain.TestPlanTestCase;
import lombok.Getter; import lombok.Getter;

View File

@ -1,4 +1,4 @@
package io.metersphere.plan.reuest.function; package io.metersphere.plan.request.function;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; import lombok.Setter;

View File

@ -1,4 +1,4 @@
package io.metersphere.plan.reuest.function; package io.metersphere.plan.request.function;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; import lombok.Setter;

View File

@ -1,4 +1,4 @@
package io.metersphere.plan.reuest.function; package io.metersphere.plan.request.function;
import io.metersphere.base.domain.TestPlanTestCaseWithBLOBs; import io.metersphere.base.domain.TestPlanTestCaseWithBLOBs;
import lombok.Getter; import lombok.Getter;

View File

@ -1,4 +1,4 @@
package io.metersphere.plan.reuest.performance; package io.metersphere.plan.request.performance;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; import lombok.Setter;

View File

@ -1,4 +1,4 @@
package io.metersphere.plan.reuest.performance; package io.metersphere.plan.request.performance;
import io.metersphere.base.domain.TestPlanLoadCase; import io.metersphere.base.domain.TestPlanLoadCase;
import io.metersphere.request.OrderRequest; import io.metersphere.request.OrderRequest;

View File

@ -1,4 +1,4 @@
package io.metersphere.plan.reuest.performance; package io.metersphere.plan.request.performance;
import io.metersphere.dto.TestPlanLoadCaseDTO; import io.metersphere.dto.TestPlanLoadCaseDTO;

View File

@ -1,4 +1,4 @@
package io.metersphere.plan.reuest.performance; package io.metersphere.plan.request.performance;
import io.metersphere.dto.RunModeConfigDTO; import io.metersphere.dto.RunModeConfigDTO;

View File

@ -1,7 +1,7 @@
package io.metersphere.plan.reuest.ui; package io.metersphere.plan.request.ui;
import io.metersphere.dto.RunModeConfigDTO; import io.metersphere.dto.RunModeConfigDTO;
import io.metersphere.plan.reuest.api.RunScenarioRequest; import io.metersphere.plan.request.api.RunScenarioRequest;
import lombok.Data; import lombok.Data;
import java.util.List; import java.util.List;

View File

@ -4,7 +4,7 @@ import io.metersphere.base.domain.*;
import io.metersphere.base.mapper.ProjectMapper; import io.metersphere.base.mapper.ProjectMapper;
import io.metersphere.base.mapper.TestPlanMapper; import io.metersphere.base.mapper.TestPlanMapper;
import io.metersphere.base.mapper.TestPlanProjectMapper; import io.metersphere.base.mapper.TestPlanProjectMapper;
import io.metersphere.plan.reuest.function.TestCaseRelevanceRequest; import io.metersphere.plan.request.function.TestCaseRelevanceRequest;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;

View File

@ -14,9 +14,9 @@ import io.metersphere.excel.constants.TestPlanTestCaseStatus;
import io.metersphere.log.vo.OperatingLogDetails; import io.metersphere.log.vo.OperatingLogDetails;
import io.metersphere.plan.constant.ApiReportStatus; import io.metersphere.plan.constant.ApiReportStatus;
import io.metersphere.plan.dto.*; import io.metersphere.plan.dto.*;
import io.metersphere.plan.reuest.QueryTestPlanRequest; import io.metersphere.plan.request.QueryTestPlanRequest;
import io.metersphere.plan.reuest.TestPlanReportSaveRequest; import io.metersphere.plan.request.TestPlanReportSaveRequest;
import io.metersphere.plan.reuest.api.TestPlanRunRequest; import io.metersphere.plan.request.api.TestPlanRunRequest;
import io.metersphere.plan.service.remote.api.*; import io.metersphere.plan.service.remote.api.*;
import io.metersphere.plan.service.remote.performance.PlanLoadTestReportService; import io.metersphere.plan.service.remote.performance.PlanLoadTestReportService;
import io.metersphere.plan.service.remote.performance.PlanTestPlanLoadCaseService; import io.metersphere.plan.service.remote.performance.PlanTestPlanLoadCaseService;
@ -1301,7 +1301,7 @@ public class TestPlanReportService {
} }
} }
} catch (Exception e) { } catch (Exception e) {
LogUtil.error("Parse test plan report cenario case error!", e); LogUtil.error("Parse test plan report scenario case error!", e);
} }
} }

View File

@ -22,17 +22,17 @@ import io.metersphere.log.vo.OperatingLogDetails;
import io.metersphere.log.vo.track.TestPlanReference; import io.metersphere.log.vo.track.TestPlanReference;
import io.metersphere.plan.dto.*; import io.metersphere.plan.dto.*;
import io.metersphere.plan.job.TestPlanTestJob; import io.metersphere.plan.job.TestPlanTestJob;
import io.metersphere.plan.reuest.AddTestPlanRequest; import io.metersphere.plan.request.AddTestPlanRequest;
import io.metersphere.plan.reuest.QueryTestPlanRequest; import io.metersphere.plan.request.QueryTestPlanRequest;
import io.metersphere.plan.reuest.ScheduleInfoRequest; import io.metersphere.plan.request.ScheduleInfoRequest;
import io.metersphere.plan.reuest.api.ApiPlanReportRequest; import io.metersphere.plan.request.api.ApiPlanReportRequest;
import io.metersphere.plan.reuest.api.RunScenarioRequest; import io.metersphere.plan.request.api.RunScenarioRequest;
import io.metersphere.plan.reuest.api.SchedulePlanScenarioExecuteRequest; import io.metersphere.plan.request.api.SchedulePlanScenarioExecuteRequest;
import io.metersphere.plan.reuest.api.TestPlanRunRequest; import io.metersphere.plan.request.api.TestPlanRunRequest;
import io.metersphere.plan.reuest.function.PlanCaseRelevanceRequest; import io.metersphere.plan.request.function.PlanCaseRelevanceRequest;
import io.metersphere.plan.reuest.function.QueryTestPlanCaseRequest; import io.metersphere.plan.request.function.QueryTestPlanCaseRequest;
import io.metersphere.plan.reuest.performance.LoadPlanReportDTO; import io.metersphere.plan.request.performance.LoadPlanReportDTO;
import io.metersphere.plan.reuest.ui.RunUiScenarioRequest; import io.metersphere.plan.request.ui.RunUiScenarioRequest;
import io.metersphere.plan.service.remote.api.PlanApiAutomationService; import io.metersphere.plan.service.remote.api.PlanApiAutomationService;
import io.metersphere.plan.service.remote.api.PlanTestPlanApiCaseService; import io.metersphere.plan.service.remote.api.PlanTestPlanApiCaseService;
import io.metersphere.plan.service.remote.api.PlanTestPlanScenarioCaseService; import io.metersphere.plan.service.remote.api.PlanTestPlanScenarioCaseService;
@ -581,9 +581,9 @@ public class TestPlanService {
return; return;
} }
List<TestCaseTest> list; List<TestCaseTest> list;
TestCaseTestExample exam = new TestCaseTestExample(); TestCaseTestExample example = new TestCaseTestExample();
exam.createCriteria().andTestCaseIdIn(testCaseIds); example.createCriteria().andTestCaseIdIn(testCaseIds);
list = testCaseTestMapper.selectByExample(exam); list = testCaseTestMapper.selectByExample(example);
if (CollectionUtils.isEmpty(list)) { if (CollectionUtils.isEmpty(list)) {
return; return;
} }
@ -1648,7 +1648,7 @@ public class TestPlanService {
if (!CronExpression.isValidExpression(cron)) { if (!CronExpression.isValidExpression(cron)) {
return 0; return 0;
} }
CronTrigger trigger = TriggerBuilder.newTrigger().withIdentity("Caclulate Date").withSchedule(CronScheduleBuilder.cronSchedule(cron)).build(); CronTrigger trigger = TriggerBuilder.newTrigger().withIdentity("Calculate Date").withSchedule(CronScheduleBuilder.cronSchedule(cron)).build();
Date time0 = trigger.getStartTime(); Date time0 = trigger.getStartTime();
Date time1 = trigger.getFireTimeAfter(time0); Date time1 = trigger.getFireTimeAfter(time0);
return time1 == null ? 0 : time1.getTime(); return time1 == null ? 0 : time1.getTime();

View File

@ -21,7 +21,7 @@ import io.metersphere.plan.dto.TestCaseReportStatusResultDTO;
import io.metersphere.plan.dto.TestPlanSimpleReportDTO; import io.metersphere.plan.dto.TestPlanSimpleReportDTO;
import io.metersphere.log.vo.DetailColumn; import io.metersphere.log.vo.DetailColumn;
import io.metersphere.log.vo.OperatingLogDetails; import io.metersphere.log.vo.OperatingLogDetails;
import io.metersphere.plan.reuest.function.*; import io.metersphere.plan.request.function.*;
import io.metersphere.plan.service.remote.api.PlanApiAutomationService; import io.metersphere.plan.service.remote.api.PlanApiAutomationService;
import io.metersphere.plan.service.remote.api.PlanApiTestCaseService; import io.metersphere.plan.service.remote.api.PlanApiTestCaseService;
import io.metersphere.plan.service.remote.api.PlanTestPlanApiCaseService; import io.metersphere.plan.service.remote.api.PlanTestPlanApiCaseService;

View File

@ -2,7 +2,7 @@ package io.metersphere.plan.service.remote.api;
import io.metersphere.base.domain.ApiScenarioWithBLOBs; import io.metersphere.base.domain.ApiScenarioWithBLOBs;
import io.metersphere.dto.MsExecResponseDTO; import io.metersphere.dto.MsExecResponseDTO;
import io.metersphere.plan.reuest.api.RunScenarioRequest; import io.metersphere.plan.request.api.RunScenarioRequest;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PathVariable;

View File

@ -6,7 +6,7 @@ import io.metersphere.commons.utils.LogUtil;
import io.metersphere.dto.*; import io.metersphere.dto.*;
import io.metersphere.plan.constant.ApiReportStatus; import io.metersphere.plan.constant.ApiReportStatus;
import io.metersphere.plan.dto.*; import io.metersphere.plan.dto.*;
import io.metersphere.plan.reuest.api.ApiPlanReportRequest; import io.metersphere.plan.request.api.ApiPlanReportRequest;
import io.metersphere.plan.utils.TestPlanStatusCalculator; import io.metersphere.plan.utils.TestPlanStatusCalculator;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;

View File

@ -1,7 +1,7 @@
package io.metersphere.plan.service.remote.performance; package io.metersphere.plan.service.remote.performance;
import io.metersphere.dto.RunModeConfigDTO; import io.metersphere.dto.RunModeConfigDTO;
import io.metersphere.plan.reuest.performance.PlanPerformanceExecRequest; import io.metersphere.plan.request.performance.PlanPerformanceExecRequest;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.Map; import java.util.Map;

View File

@ -8,9 +8,9 @@ import io.metersphere.dto.TestPlanLoadCaseDTO;
import io.metersphere.dto.TestPlanLoadResultReportDTO; import io.metersphere.dto.TestPlanLoadResultReportDTO;
import io.metersphere.plan.dto.TestCaseReportStatusResultDTO; import io.metersphere.plan.dto.TestCaseReportStatusResultDTO;
import io.metersphere.plan.dto.TestPlanSimpleReportDTO; import io.metersphere.plan.dto.TestPlanSimpleReportDTO;
import io.metersphere.plan.reuest.api.ApiPlanReportRequest; import io.metersphere.plan.request.api.ApiPlanReportRequest;
import io.metersphere.plan.reuest.performance.LoadCaseRequest; import io.metersphere.plan.request.performance.LoadCaseRequest;
import io.metersphere.plan.reuest.performance.LoadPlanReportDTO; import io.metersphere.plan.request.performance.LoadPlanReportDTO;
import io.metersphere.plan.utils.TestPlanStatusCalculator; import io.metersphere.plan.utils.TestPlanStatusCalculator;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Propagation;

View File

@ -9,7 +9,7 @@ import io.metersphere.plan.dto.TestCaseReportStatusResultDTO;
import io.metersphere.plan.dto.TestPlanScenarioStepCountSimpleDTO; import io.metersphere.plan.dto.TestPlanScenarioStepCountSimpleDTO;
import io.metersphere.plan.dto.TestPlanSimpleReportDTO; import io.metersphere.plan.dto.TestPlanSimpleReportDTO;
import io.metersphere.plan.dto.UiPlanReportDTO; import io.metersphere.plan.dto.UiPlanReportDTO;
import io.metersphere.plan.reuest.api.ApiPlanReportRequest; import io.metersphere.plan.request.api.ApiPlanReportRequest;
import io.metersphere.plan.service.remote.api.PlanTestPlanScenarioCaseService; import io.metersphere.plan.service.remote.api.PlanTestPlanScenarioCaseService;
import io.metersphere.plan.service.remote.api.PlanUiScenarioReportService; import io.metersphere.plan.service.remote.api.PlanUiScenarioReportService;
import io.metersphere.plan.utils.TestPlanStatusCalculator; import io.metersphere.plan.utils.TestPlanStatusCalculator;

View File

@ -1,7 +1,7 @@
package io.metersphere.plan.service.remote.ui; package io.metersphere.plan.service.remote.ui;
import io.metersphere.dto.MsExecResponseDTO; import io.metersphere.dto.MsExecResponseDTO;
import io.metersphere.plan.reuest.api.RunScenarioRequest; import io.metersphere.plan.request.api.RunScenarioRequest;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.List; import java.util.List;

View File

@ -28,7 +28,7 @@ import io.metersphere.dto.TestCaseDTO;
import io.metersphere.dto.TestCaseNodeDTO; import io.metersphere.dto.TestCaseNodeDTO;
import io.metersphere.plan.service.TestPlanProjectService; import io.metersphere.plan.service.TestPlanProjectService;
import io.metersphere.request.testcase.*; import io.metersphere.request.testcase.*;
import io.metersphere.plan.reuest.function.QueryTestPlanCaseRequest; import io.metersphere.plan.request.function.QueryTestPlanCaseRequest;
import io.metersphere.request.testreview.QueryCaseReviewRequest; import io.metersphere.request.testreview.QueryCaseReviewRequest;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.ibatis.session.ExecutorType; import org.apache.ibatis.session.ExecutorType;

View File

@ -438,7 +438,7 @@ public class TestCaseService {
} }
/** /**
* 根据前后端 verionId 判定是编辑旧数据还是创建新版本 * 根据前后端 versionId 判定是编辑旧数据还是创建新版本
* *
* @param testCase * @param testCase
* @param example * @param example
@ -589,7 +589,7 @@ public class TestCaseService {
} }
/** /**
* 根据id和pojectId查询id是否在数据库中存在 * 根据id和projectId查询id是否在数据库中存在
* 在数据库中单id的话是可重复的,id与projectId的组合是唯一的 * 在数据库中单id的话是可重复的,id与projectId的组合是唯一的
*/ */
public String checkIdExist(Integer id, String projectId) { public String checkIdExist(Integer id, String projectId) {
@ -747,7 +747,7 @@ public class TestCaseService {
if (StringUtils.isNotBlank(request.getProjectId())) { if (StringUtils.isNotBlank(request.getProjectId())) {
buildProjectInfo(request.getProjectId(), list); buildProjectInfo(request.getProjectId(), list);
} else { } else {
buildProjectInfoWidthoutProject(list); buildProjectInfoWithoutProject(list);
} }
buildCustomField(list); buildCustomField(list);
} }
@ -778,7 +778,7 @@ public class TestCaseService {
data.setFields(fields); data.setFields(fields);
} }
private void buildProjectInfoWidthoutProject(List<TestCaseDTO> resList) { private void buildProjectInfoWithoutProject(List<TestCaseDTO> resList) {
resList.forEach(i -> { resList.forEach(i -> {
Project project = projectMapper.selectByPrimaryKey(i.getProjectId()); Project project = projectMapper.selectByPrimaryKey(i.getProjectId());
i.setProjectName(project.getName()); i.setProjectName(project.getName());
@ -2619,19 +2619,19 @@ public class TestCaseService {
projectVersions = projectVersionMapper.selectByExample(versionExample); projectVersions = projectVersionMapper.selectByExample(versionExample);
} }
Map<String, String> verisonNameMap = projectVersions.stream().collect(Collectors.toMap(ProjectVersion::getId, ProjectVersion::getName)); Map<String, String> versionNameMap = projectVersions.stream().collect(Collectors.toMap(ProjectVersion::getId, ProjectVersion::getName));
List<TestCaseTestDao> testCaseTestList = new ArrayList<>(); List<TestCaseTestDao> testCaseTestList = new ArrayList<>();
apiCases.forEach(item -> { apiCases.forEach(item -> {
getTestCaseTestDaoList(TestCaseTestType.testcase.name(), item.getNum(), item.getName(), item.getId(), projectNameMap.get(item.getProjectId()), verisonNameMap.get(item.getVersionId()), getTestCaseTestDaoList(TestCaseTestType.testcase.name(), item.getNum(), item.getName(), item.getId(), projectNameMap.get(item.getProjectId()), versionNameMap.get(item.getVersionId()),
testCaseTestList, testCaseTestsMap); testCaseTestList, testCaseTestsMap);
}); });
apiScenarios.forEach(item -> { apiScenarios.forEach(item -> {
getTestCaseTestDaoList(TestCaseTestType.automation.name(), item.getNum(), item.getName(), item.getId(), projectNameMap.get(item.getProjectId()), verisonNameMap.get(item.getVersionId()), getTestCaseTestDaoList(TestCaseTestType.automation.name(), item.getNum(), item.getName(), item.getId(), projectNameMap.get(item.getProjectId()), versionNameMap.get(item.getVersionId()),
testCaseTestList, testCaseTestsMap); testCaseTestList, testCaseTestsMap);
}); });
apiLoadTests.forEach(item -> { apiLoadTests.forEach(item -> {
getTestCaseTestDaoList(TestCaseTestType.performance.name(), item.getNum(), item.getName(), item.getId(), projectNameMap.get(item.getProjectId()), verisonNameMap.get(item.getVersionId()), getTestCaseTestDaoList(TestCaseTestType.performance.name(), item.getNum(), item.getName(), item.getId(), projectNameMap.get(item.getProjectId()), versionNameMap.get(item.getVersionId()),
testCaseTestList, testCaseTestsMap); testCaseTestList, testCaseTestsMap);
}); });
return testCaseTestList; return testCaseTestList;
@ -2782,13 +2782,13 @@ public class TestCaseService {
Map<String, String> userNameMap = ServiceUtils.getUserNameMap(testCaseList.stream().map(TestCaseWithBLOBs::getCreateUser).collect(Collectors.toList())); Map<String, String> userNameMap = ServiceUtils.getUserNameMap(testCaseList.stream().map(TestCaseWithBLOBs::getCreateUser).collect(Collectors.toList()));
Map<String, String> verionNameMap = new HashMap<>(); Map<String, String> versionNameMap = new HashMap<>();
List<String> versionIds = testCaseList.stream().map(TestCase::getVersionId).collect(Collectors.toList()); List<String> versionIds = testCaseList.stream().map(TestCase::getVersionId).collect(Collectors.toList());
if (CollectionUtils.isNotEmpty(versionIds)) { if (CollectionUtils.isNotEmpty(versionIds)) {
ProjectVersionRequest pvr = new ProjectVersionRequest(); ProjectVersionRequest pvr = new ProjectVersionRequest();
pvr.setProjectId(testCaseList.get(0).getProjectId()); pvr.setProjectId(testCaseList.get(0).getProjectId());
List<ProjectVersionDTO> projectVersions = baseProjectVersionMapper.selectProjectVersionList(pvr); List<ProjectVersionDTO> projectVersions = baseProjectVersionMapper.selectProjectVersionList(pvr);
verionNameMap = projectVersions.stream().collect(Collectors.toMap(ProjectVersionDTO::getId, ProjectVersionDTO::getName)); versionNameMap = projectVersions.stream().collect(Collectors.toMap(ProjectVersionDTO::getId, ProjectVersionDTO::getName));
} }
Map<String, TestCase> caseMap = testCaseList.stream().collect(Collectors.toMap(TestCase::getId, i -> i)); Map<String, TestCase> caseMap = testCaseList.stream().collect(Collectors.toMap(TestCase::getId, i -> i));
List<RelationshipEdgeDTO> results = new ArrayList<>(); List<RelationshipEdgeDTO> results = new ArrayList<>();
@ -2809,7 +2809,7 @@ public class TestCaseService {
relationshipEdgeDTO.setTargetNum(testCase.getNum()); relationshipEdgeDTO.setTargetNum(testCase.getNum());
relationshipEdgeDTO.setTargetCustomNum(testCase.getCustomNum()); relationshipEdgeDTO.setTargetCustomNum(testCase.getCustomNum());
relationshipEdgeDTO.setStatus(testCase.getStatus()); relationshipEdgeDTO.setStatus(testCase.getStatus());
relationshipEdgeDTO.setVersionName(verionNameMap.get(testCase.getVersionId())); relationshipEdgeDTO.setVersionName(versionNameMap.get(testCase.getVersionId()));
results.add(relationshipEdgeDTO); results.add(relationshipEdgeDTO);
} }
return results; return results;

View File

@ -5,7 +5,7 @@ import io.metersphere.base.domain.TestPlanExample;
import io.metersphere.base.mapper.TestPlanMapper; import io.metersphere.base.mapper.TestPlanMapper;
import io.metersphere.base.mapper.ext.ExtTestCaseMapper; import io.metersphere.base.mapper.ext.ExtTestCaseMapper;
import io.metersphere.commons.utils.DateUtils; import io.metersphere.commons.utils.DateUtils;
import io.metersphere.dto.BugStatustics; import io.metersphere.dto.BugStatistics;
import io.metersphere.dto.TestPlanBugCount; import io.metersphere.dto.TestPlanBugCount;
import io.metersphere.dto.TestPlanDTOWithMetric; import io.metersphere.dto.TestPlanDTOWithMetric;
import io.metersphere.dto.TrackCountResult; import io.metersphere.dto.TrackCountResult;
@ -104,12 +104,12 @@ public class TrackService {
return charts; return charts;
} }
public BugStatustics getBugStatistics(String projectId) { public BugStatistics getBugStatistics(String projectId) {
TestPlanExample example = new TestPlanExample(); TestPlanExample example = new TestPlanExample();
example.createCriteria().andProjectIdEqualTo(projectId); example.createCriteria().andProjectIdEqualTo(projectId);
List<TestPlan> plans = testPlanMapper.selectByExample(example); List<TestPlan> plans = testPlanMapper.selectByExample(example);
List<TestPlanBugCount> list = new ArrayList<>(); List<TestPlanBugCount> list = new ArrayList<>();
BugStatustics bugStatustics = new BugStatustics(); BugStatistics bugStatistics = new BugStatistics();
int index = 1; int index = 1;
int totalCaseSize = 0; int totalCaseSize = 0;
int totalBugSize = 0; int totalBugSize = 0;
@ -138,12 +138,12 @@ public class TrackService {
totalCaseSize += planCaseSize; totalCaseSize += planCaseSize;
} }
bugStatustics.setList(list); bugStatistics.setList(list);
float rage = totalCaseSize == 0 ? 0 : (float) totalBugSize * 100 / totalCaseSize; float rage = totalCaseSize == 0 ? 0 : (float) totalBugSize * 100 / totalCaseSize;
DecimalFormat df = new DecimalFormat("0.0"); DecimalFormat df = new DecimalFormat("0.0");
bugStatustics.setRage(df.format(rage) + "%"); bugStatistics.setRage(df.format(rage) + "%");
bugStatustics.setBugTotalSize(totalBugSize); bugStatistics.setBugTotalSize(totalBugSize);
return bugStatustics; return bugStatistics;
} }
private int getPlanCaseSize(String planId) { private int getPlanCaseSize(String planId) {

View File

@ -14,41 +14,6 @@ public class GetUserResponse {
@Setter @Setter
public static class User { public static class User {
private String id; private String id;
// private String dept;
private String account; private String account;
// private String type;
// private String role;
// private String realname;
// private String nickname;
// private String commiter;
// private String avatar;
// private String birthday;
// private String gender;
// private String email;
// private String skype;
// private String qq;
// private String mobile;
// private String phone;
// private String weixin;
// private String dingding;
// private String slack;
// private String whatsapp;
// private String address;
// private String zipcode;
// private String join;
// private String visits;
// private String ip;
// private String last;
// private String fails;
// private String ranzhi;
// private String score;
// private String scoreLevel;
// private String clientStatus;
// private String clientLang;
// private String lastTime;
// private boolean admin;
// private boolean modifyPassword;
// private String company;
// private String token;
} }
} }

View File

@ -622,7 +622,7 @@ public class JiraPlatform extends AbstractIssuePlatform {
if (CollectionUtils.isNotEmpty(transitions)) { if (CollectionUtils.isNotEmpty(transitions)) {
transitions.forEach(item -> { transitions.forEach(item -> {
PlatformStatusDTO platformStatusDTO = new PlatformStatusDTO(); PlatformStatusDTO platformStatusDTO = new PlatformStatusDTO();
platformStatusDTO.setLable(item.getTo().getName()); platformStatusDTO.setLabel(item.getTo().getName());
platformStatusDTO.setValue(item.getTo().getName()); platformStatusDTO.setValue(item.getTo().getName());
platformStatusDTOS.add(platformStatusDTO); platformStatusDTOS.add(platformStatusDTO);
}); });

View File

@ -206,8 +206,8 @@ public class TapdPlatform extends AbstractIssuePlatform {
while (index < ids.size()) { while (index < ids.size()) {
List<String> subIds = ids.subList(index, (index + limit) > ids.size() ? ids.size() : (index + limit)); List<String> subIds = ids.subList(index, (index + limit) > ids.size() ? ids.size() : (index + limit));
TapdGetIssueResponse result = tapdClient.getIssueForPageByIds(project.getTapdId(), 1, limit, subIds); TapdGetIssueResponse result = tapdClient.getIssueForPageByIds(project.getTapdId(), 1, limit, subIds);
List<Map> datas = result.getData(); List<Map> data = result.getData();
datas.forEach(issue -> { data.forEach(issue -> {
Map bug = (Map) issue.get("Bug"); Map bug = (Map) issue.get("Bug");
String platformId = bug.get("id").toString(); String platformId = bug.get("id").toString();
String id = idMap.get(platformId); String id = idMap.get(platformId);
@ -322,7 +322,7 @@ public class TapdPlatform extends AbstractIssuePlatform {
for (String key : statusMap.keySet()) { for (String key : statusMap.keySet()) {
PlatformStatusDTO platformStatusDTO = new PlatformStatusDTO(); PlatformStatusDTO platformStatusDTO = new PlatformStatusDTO();
platformStatusDTO.setValue(key); platformStatusDTO.setValue(key);
platformStatusDTO.setLable(statusMap.get(key)); platformStatusDTO.setLabel(statusMap.get(key));
platformStatusDTOS.add(platformStatusDTO); platformStatusDTOS.add(platformStatusDTO);
} }

View File

@ -234,7 +234,7 @@ public class ZentaoPlatform extends AbstractIssuePlatform {
// 用例与第三方缺陷平台中的缺陷关联 // 用例与第三方缺陷平台中的缺陷关联
handleTestCaseIssues(issuesRequest); handleTestCaseIssues(issuesRequest);
} else { } else {
MSException.throwException("请确认该Zentao账号是否开启超级modle调用接口权限"); MSException.throwException("请确认该Zentao账号是否开启超级model调用接口权限");
} }
// 如果是复制新增, 同步MS附件到Zentao // 如果是复制新增, 同步MS附件到Zentao
@ -645,7 +645,7 @@ public class ZentaoPlatform extends AbstractIssuePlatform {
for (ZentaoIssuePlatformStatus status : ZentaoIssuePlatformStatus.values()) { for (ZentaoIssuePlatformStatus status : ZentaoIssuePlatformStatus.values()) {
PlatformStatusDTO platformStatusDTO = new PlatformStatusDTO(); PlatformStatusDTO platformStatusDTO = new PlatformStatusDTO();
platformStatusDTO.setValue(status.name()); platformStatusDTO.setValue(status.name());
platformStatusDTO.setLable(status.getName()); platformStatusDTO.setLabel(status.getName());
platformStatusDTOS.add(platformStatusDTO); platformStatusDTOS.add(platformStatusDTO);
} }

View File

@ -48,7 +48,7 @@ public class XmindCaseParser {
/** /**
* 案例详情重写了hashCode方法去重用 * 案例详情重写了hashCode方法去重用
*/ */
private List<TestCaseExcelData> compartDatas; private List<TestCaseExcelData> compartData;
/** /**
* 记录没有用例的目录 * 记录没有用例的目录
*/ */
@ -65,7 +65,7 @@ public class XmindCaseParser {
this.request = request; this.request = request;
testCases = new LinkedList<>(); testCases = new LinkedList<>();
updateTestCases = new LinkedList<>(); updateTestCases = new LinkedList<>();
compartDatas = new ArrayList<>(); compartData = new ArrayList<>();
process = new DetailUtil(); process = new DetailUtil();
nodePaths = new ArrayList<>(); nodePaths = new ArrayList<>();
continueValidatedCase = new ArrayList<>(); continueValidatedCase = new ArrayList<>();
@ -79,7 +79,7 @@ public class XmindCaseParser {
private static final String TAG_REGEX = "(?:tag:|tag)"; private static final String TAG_REGEX = "(?:tag:|tag)";
public void clear() { public void clear() {
compartDatas.clear(); compartData.clear();
testCases.clear(); testCases.clear();
updateTestCases.clear(); updateTestCases.clear();
request.getTestCaseNames().clear(); request.getTestCaseNames().clear();
@ -204,13 +204,13 @@ public class XmindCaseParser {
} }
// 重复用例校验 // 重复用例校验
TestCaseExcelData compartData = new TestCaseExcelData(); TestCaseExcelData dataItem = new TestCaseExcelData();
BeanUtils.copyBean(compartData, data); BeanUtils.copyBean(compartData, data);
if (compartDatas.contains(compartData)) { if (compartData.contains(dataItem)) {
validatePass = false; validatePass = false;
process.add(Translator.get("test_case_already_exists_excel"), nodePath + "/" + compartData.getName()); process.add(Translator.get("test_case_already_exists_excel"), nodePath + "/" + dataItem.getName());
} }
compartDatas.add(compartData); compartData.add(dataItem);
String importType = request.getImportType(); String importType = request.getImportType();
@ -220,11 +220,11 @@ public class XmindCaseParser {
//自定义ID判断 //自定义ID判断
if (StringUtils.isEmpty(data.getCustomNum())) { if (StringUtils.isEmpty(data.getCustomNum())) {
if (StringUtils.equals(importType, ExcelImportType.Update.name())) { if (StringUtils.equals(importType, ExcelImportType.Update.name())) {
process.add(Translator.get("id_required"), nodePath + "/" + compartData.getName()); process.add(Translator.get("id_required"), nodePath + "/" + dataItem.getName());
return false; return false;
} else { } else {
if (isUseCustomId) { if (isUseCustomId) {
process.add(Translator.get("custom_num_is_not_exist"), nodePath + "/" + compartData.getName()); process.add(Translator.get("custom_num_is_not_exist"), nodePath + "/" + dataItem.getName());
return false; return false;
} }
} }
@ -247,7 +247,7 @@ public class XmindCaseParser {
data.setId(checkResult); data.setId(checkResult);
updateTestCases.add(data); updateTestCases.add(data);
} else { } else {
process.add(Translator.get("custom_num_is_not_exist"), nodePath + "/" + compartData.getName()); process.add(Translator.get("custom_num_is_not_exist"), nodePath + "/" + dataItem.getName());
validatePass = false; validatePass = false;
} }
} }
@ -259,7 +259,7 @@ public class XmindCaseParser {
if (isUseCustomId) { if (isUseCustomId) {
checkResult = testCaseService.checkCustomIdExist(data.getCustomNum(), projectId); checkResult = testCaseService.checkCustomIdExist(data.getCustomNum(), projectId);
if (null != checkResult) { //该ID在当前项目中存在 if (null != checkResult) { //该ID在当前项目中存在
process.add(Translator.get("custom_num_is_exist"), nodePath + "/" + compartData.getName()); process.add(Translator.get("custom_num_is_exist"), nodePath + "/" + dataItem.getName());
return false; return false;
} }
} }

View File

@ -3,7 +3,7 @@
<div class="card-content"> <div class="card-content">
<div class="ms-main-div" @click="showAll"> <div class="ms-main-div" @click="showAll">
<ms-container v-loading="loading" style="overflow: auto"> <ms-container v-loading="loading" style="overflow: auto">
<ms-aside-container :height="pageHight"> <ms-aside-container :height="pageHeight">
<test-case-base-info <test-case-base-info
:form="form" :form="form"
:is-form-alive="isFormAlive" :is-form-alive="isFormAlive"
@ -20,7 +20,7 @@
ref="testCaseBaseInfo" ref="testCaseBaseInfo"
/> />
</ms-aside-container> </ms-aside-container>
<ms-main-container :style="{height: pageHight + 'px'}"> <ms-main-container :style="{height: pageHeight + 'px'}">
<el-form :model="form" :rules="rules" ref="caseFrom" class="case-form"> <el-form :model="form" :rules="rules" ref="caseFrom" class="case-form">
<!--操作按钮--> <!--操作按钮-->
@ -225,7 +225,7 @@ export default {
isPublic: false, isPublic: false,
isXpack: false, isXpack: false,
testCaseTemplate: {}, testCaseTemplate: {},
pageHight: document.documentElement.clientHeight - 150 + '', pageHeight: document.documentElement.clientHeight - 150 + '',
projectList: [], projectList: [],
comments: [], comments: [],
loading: false, loading: false,
@ -479,7 +479,7 @@ export default {
return getCurrentUser(); return getCurrentUser();
}, },
resizeContainer() { resizeContainer() {
this.pageHight = document.documentElement.clientHeight - 150 + ''; this.pageHeight = document.documentElement.clientHeight - 150 + '';
}, },
openHis() { openHis() {
this.$refs.changeHistory.open(this.form.id, ["测试用例", "測試用例", "Test case", "TRACK_TEST_CASE"]); this.$refs.changeHistory.open(this.form.id, ["测试用例", "測試用例", "Test case", "TRACK_TEST_CASE"]);

View File

@ -43,7 +43,7 @@
prop="platformStatus"> prop="platformStatus">
<el-select v-model="form.platformStatus" filterable <el-select v-model="form.platformStatus" filterable
:placeholder="$t('test_track.issue.please_choose_platform_status')"> :placeholder="$t('test_track.issue.please_choose_platform_status')">
<el-option v-for="(transition, index) in platformTransitions" :key="index" :label="transition.lable" <el-option v-for="(transition, index) in platformTransitions" :key="index" :label="transition.label"
:value="transition.value"/> :value="transition.value"/>
</el-select> </el-select>
</el-form-item> </el-form-item>

View File

@ -13,7 +13,7 @@
<el-button type="primary" @click="handleConfirm" size="small" :style="btnStyle" class="env-confirm"> <el-button type="primary" @click="handleConfirm" size="small" :style="btnStyle" class="env-confirm">
{{ $t('workspace.env_group.confirm') }} {{ $t('workspace.env_group.confirm') }}
</el-button> </el-button>
<el-dialog :visible="visble" append-to-body :title="$t('workspace.env_group.name')" @close="visble = false" <el-dialog :visible="visible" append-to-body :title="$t('workspace.env_group.name')" @close="visible = false"
style="height: 800px;"> style="height: 800px;">
<template> <template>
<environment-group style="overflow-y: auto;" <environment-group style="overflow-y: auto;"
@ -36,7 +36,7 @@ export default {
return { return {
groups: [], groups: [],
envGroupId: this.groupId, envGroupId: this.groupId,
visble: false visible: false
} }
}, },
props: { props: {
@ -73,7 +73,7 @@ export default {
}) })
}, },
viewGroup() { viewGroup() {
this.visble = true; this.visible = true;
}, },
async handleConfirm() { async handleConfirm() {
const sign = await this.checkEnv(); const sign = await this.checkEnv();

View File

@ -22,7 +22,7 @@
<el-button type="primary" @click="handleConfirm" size="small" class="env-confirm"> <el-button type="primary" @click="handleConfirm" size="small" class="env-confirm">
{{ $t('workspace.env_group.confirm') }} {{ $t('workspace.env_group.confirm') }}
</el-button> </el-button>
<el-dialog :visible="visble" append-to-body :title="$t('workspace.env_group.name')" @close="visble = false" <el-dialog :visible="visible" append-to-body :title="$t('workspace.env_group.name')" @close="visible = false"
style="height: 800px;"> style="height: 800px;">
<template> <template>
<environment-group style="overflow-y: auto;" <environment-group style="overflow-y: auto;"
@ -45,7 +45,7 @@ export default {
return { return {
groups: [], groups: [],
envGroupId: this.groupId, envGroupId: this.groupId,
visble: false, visible: false,
disabledGroups: [], disabledGroups: [],
notDisabledGroups: [], notDisabledGroups: [],
result: false result: false
@ -88,7 +88,7 @@ export default {
}) })
}, },
viewGroup() { viewGroup() {
this.visble = true; this.visible = true;
}, },
async handleConfirm() { async handleConfirm() {
const sign = await this.checkEnv(); const sign = await this.checkEnv();

View File

@ -198,9 +198,9 @@ export default {
} }
}); });
}, },
format(cases, datas) { format(cases, data) {
if (this.report && datas) { if (this.report && data) {
datas.forEach(item => { data.forEach(item => {
if (item) { if (item) {
let obj = {id: item.id, reportId: item.reportId, userId: item.createUser}; let obj = {id: item.id, reportId: item.reportId, userId: item.createUser};
cases.push(obj); cases.push(obj);

View File

@ -51,7 +51,6 @@ export default {
data() { data() {
return { return {
result: {}, result: {},
loadCommenItem: true,
labelWidth: '120px', labelWidth: '120px',
showEditor: true, showEditor: true,
isReadOnly: false, isReadOnly: false,