feat(测试计划): 补充计划组报告明细汇总逻辑

This commit is contained in:
song-cc-rock 2024-06-18 16:01:00 +08:00 committed by Craftsman
parent 081776445f
commit afe2687fdb
11 changed files with 118 additions and 120 deletions

View File

@ -25,13 +25,6 @@ public interface ExtTestPlanReportApiCaseMapper {
*/
List<TestPlanReportApiCase> getPlanExecuteCases(@Param("id") String planId);
/**
* 获取计划关联的接口用例
* @param planIds 计划ID集合
* @return 接口用例列表
*/
List<TestPlanReportApiCase> getGroupExecuteCases(@Param("ids") List<String> planIds);
/**
* 获取项目下接口用例所属模块集合
* @param projectId 计划ID

View File

@ -19,21 +19,6 @@
group by tpac.id
</select>
<select id="getGroupExecuteCases" resultType="io.metersphere.plan.domain.TestPlanReportApiCase">
select tpac.id as testPlanApiCaseId, atc.id as apiCaseId, atc.num as apiCaseNum, atc.name as apiCaseName, atc.priority as apiCasePriority,
tpac.test_plan_collection_id testPlanCollectionId, tpac.environment_id as environmentId,
if(ad.module_id = 'root','未规划用例', ad.module_id) as apiCaseModule, tpac.execute_user as apiCaseExecuteUser,
ifnull(tpac.last_exec_result, 'PENDING') as apiCaseExecuteResult, tpac.last_exec_report_id apiCaseExecuteReportId, tpac.pos pos
from test_plan_api_case tpac join api_test_case atc on atc.id = tpac.api_case_id
left join api_definition ad on atc.api_definition_id = ad.id
left join api_definition_module adm on ad.module_id = adm.id
where atc.deleted = false and tpac.test_plan_id in
<foreach collection="ids" item="id" open="(" separator="," close=")">
#{id}
</foreach>
group by tpac.id
</select>
<select id="getPlanExecuteCaseModules" resultType="io.metersphere.plan.dto.TestPlanBaseModule">
select adm.id, adm.name, adm.parent_id as parentId from api_definition_module adm
where adm.project_id = #{id}

View File

@ -25,13 +25,6 @@ public interface ExtTestPlanReportApiScenarioMapper {
*/
List<TestPlanReportApiScenario> getPlanExecuteCases(@Param("id") String planId);
/**
* 获取计划关联的场景用例
* @param planIds 计划ID集合
* @return 场景用例列表
*/
List<TestPlanReportApiScenario> getGroupExecuteCases(@Param("ids") List<String> planIds);
/**
* 获取项目下场景用例所属模块集合
* @param projectId 计划ID

View File

@ -18,20 +18,6 @@
group by tpas.id
</select>
<select id="getGroupExecuteCases" resultType="io.metersphere.plan.domain.TestPlanReportApiScenario">
select tpas.id as testPlanApiScenarioId, aso.id as apiScenarioId, aso.num as apiScenarioNum, aso.name as apiScenarioName, aso.priority as apiScenarioPriority,
tpas.test_plan_collection_id testPlanCollectionId, tpas.grouped grouped, tpas.environment_id environmentId,
if(aso.module_id = 'root','未规划用例', aso.module_id) as apiScenarioModule, tpas.execute_user as apiScenarioExecuteUser,
ifnull(tpas.last_exec_result, 'PENDING') as apiScenarioExecuteResult, tpas.last_exec_report_id apiScenarioExecuteReportId, tpas.pos pos
from test_plan_api_scenario tpas join api_scenario aso on aso.id = tpas.api_scenario_id
left join api_scenario_module asm on aso.module_id = asm.id
where aso.deleted = false and tpas.test_plan_id in
<foreach collection="ids" item="id" open="(" separator="," close=")">
#{id}
</foreach>
group by tpas.id
</select>
<select id="getPlanExecuteCaseModules" resultType="io.metersphere.plan.dto.TestPlanBaseModule">
select asm.id, asm.name, asm.parent_id as parentId from api_scenario_module asm
where asm.project_id = #{id}

View File

@ -16,13 +16,6 @@ public interface ExtTestPlanReportBugMapper {
*/
List<TestPlanReportBug> getPlanBugs(@Param("id") String planId);
/**
* 获取计划的缺陷集合
* @param planIds 计划ID集合
* @return 缺陷集合
*/
List<TestPlanReportBug> getGroupBugs(@Param("ids") List<String> planIds);
/**
* 分页查询报告关联的缺陷
* @param request 请求参数

View File

@ -10,17 +10,6 @@
group by brc.bug_id
</select>
<select id="getGroupBugs" resultType="io.metersphere.plan.domain.TestPlanReportBug">
select distinct brc.bug_id as bugId, b.num as bugNum, b.title as bugTitle, b.status bugStatus,
b.handle_user bugHandleUser, count(brc.id) bugCaseCount
from bug_relation_case brc join bug b on brc.bug_id = b.id
where brc.test_plan_id in
<foreach collection="ids" item="id" open="(" separator="," close=")">
#{id}
</foreach>
group by brc.bug_id
</select>
<select id="list" resultType="io.metersphere.bug.dto.response.BugDTO">
select distinct tprb.bug_id as id, tprb.bug_num as num, tprb.bug_title as title, tprb.bug_status as status, tprb.bug_handle_user as handleUserName,
ifnull(tprb.bug_case_count, 0) as relationCaseCount

View File

@ -19,13 +19,6 @@ public interface ExtTestPlanReportFunctionalCaseMapper {
*/
List<TestPlanReportFunctionCase> getPlanExecuteCases(@Param("id") String planId);
/**
* 获取计划关联的功能用例
* @param planIds 计划ID集合
* @return 功能用例列表
*/
List<TestPlanReportFunctionCase> getGroupPlanExecuteCases(@Param("ids") List<String> planIds);
/**
* 获取项目下功能用例所属模块集合
* @param projectId 计划ID

View File

@ -13,20 +13,6 @@
group by tpfc.id
</select>
<select id="getGroupPlanExecuteCases" resultType="io.metersphere.plan.domain.TestPlanReportFunctionCase">
select tpfc.id as testPlanFunctionCaseId, fc.id as functionCaseId, fc.num as functionCaseNum, fc.name as functionCaseName, tpfc.test_plan_collection_id testPlanCollectionId,
if(fc.module_id = 'root','未规划用例', fc.module_id) as functionCaseModule, tpfc.execute_user as functionCaseExecuteUser,
count(brc.id) as functionCaseBugCount, ifnull(tpfc.last_exec_result, 'PENDING') as functionCaseExecuteResult, tpfc.pos pos
from test_plan_functional_case tpfc join functional_case fc on tpfc.functional_case_id = fc.id
left join functional_case_module fcm on fcm.id = fc.module_id
left join bug_relation_case brc on brc.test_plan_case_id = tpfc.id
where fc.deleted = false and tpfc.test_plan_id in
<foreach collection="ids" item="id" open="(" separator="," close=")">
#{id}
</foreach>
group by tpfc.id
</select>
<select id="getPlanExecuteCaseModules" resultType="io.metersphere.plan.dto.TestPlanBaseModule">
select fcm.id, fcm.name, fcm.parent_id as parentId from functional_case_module fcm
where fcm.project_id = #{id}

View File

@ -306,8 +306,14 @@ public class TestPlanReportService {
report.setParentId(genParam.getGroupReportId());
testPlanReportMapper.insertSelective(report);
// 报告关联数据
TestPlanReportDetailCaseDTO reportCaseDetail = genReportDetail(genParam, moduleParam, report, childPlanIds);
TestPlanReportDetailCaseDTO reportCaseDetail;
if (!genParam.getIntegrated()) {
// 生成独立报告的关联数据
reportCaseDetail = genReportDetail(genParam, moduleParam, report);
} else {
// 计划组报告暂不统计各用例类型, 汇总时再入库
reportCaseDetail = TestPlanReportDetailCaseDTO.builder().build();
}
// 报告统计内容
TestPlanReportSummary reportSummary = new TestPlanReportSummary();
reportSummary.setId(IDGenerator.nextStr());
@ -325,20 +331,15 @@ public class TestPlanReportService {
}
/**
* 生成报告的关联数据
* 生成独立报告的关联数据
* @param genParam 报告生成的参数
* @param moduleParam 模块参数
* @param report 报告
*/
private TestPlanReportDetailCaseDTO genReportDetail(TestPlanReportGenPreParam genParam, TestPlanReportModuleParam moduleParam, TestPlanReport report, List<String> childPlanIds) {
private TestPlanReportDetailCaseDTO genReportDetail(TestPlanReportGenPreParam genParam, TestPlanReportModuleParam moduleParam, TestPlanReport report) {
SqlSession sqlSession = sqlSessionFactory.openSession(ExecutorType.BATCH);
// 功能用例
List<TestPlanReportFunctionCase> reportFunctionCases;
if (genParam.getIntegrated()) {
reportFunctionCases = CollectionUtils.isEmpty(childPlanIds) ? new ArrayList<>() : extTestPlanReportFunctionalCaseMapper.getGroupPlanExecuteCases(childPlanIds);
} else {
reportFunctionCases = extTestPlanReportFunctionalCaseMapper.getPlanExecuteCases(genParam.getTestPlanId());
}
List<TestPlanReportFunctionCase> reportFunctionCases = extTestPlanReportFunctionalCaseMapper.getPlanExecuteCases(genParam.getTestPlanId());
if (CollectionUtils.isNotEmpty(reportFunctionCases)) {
// 用例等级
List<String> ids = reportFunctionCases.stream().map(TestPlanReportFunctionCase::getFunctionCaseId).distinct().toList();
@ -372,12 +373,7 @@ public class TestPlanReportService {
}
// 接口用例
List<TestPlanReportApiCase> reportApiCases;
if (genParam.getIntegrated()) {
reportApiCases = CollectionUtils.isEmpty(childPlanIds) ? new ArrayList<>() : extTestPlanReportApiCaseMapper.getGroupExecuteCases(childPlanIds);
} else {
reportApiCases = extTestPlanReportApiCaseMapper.getPlanExecuteCases(genParam.getTestPlanId());
}
List<TestPlanReportApiCase> reportApiCases = extTestPlanReportApiCaseMapper.getPlanExecuteCases(genParam.getTestPlanId());
if (CollectionUtils.isNotEmpty(reportApiCases)) {
reportApiCases.forEach(reportApiCase -> {
reportApiCase.setId(IDGenerator.nextStr());
@ -397,12 +393,7 @@ public class TestPlanReportService {
}
// 场景用例
List<TestPlanReportApiScenario> reportApiScenarios;
if (genParam.getIntegrated()) {
reportApiScenarios = CollectionUtils.isEmpty(childPlanIds) ? new ArrayList<>() : extTestPlanReportApiScenarioMapper.getGroupExecuteCases(childPlanIds);
} else {
reportApiScenarios = extTestPlanReportApiScenarioMapper.getPlanExecuteCases(genParam.getTestPlanId());
}
List<TestPlanReportApiScenario> reportApiScenarios = extTestPlanReportApiScenarioMapper.getPlanExecuteCases(genParam.getTestPlanId());
if (CollectionUtils.isNotEmpty(reportApiScenarios)) {
reportApiScenarios.forEach(reportApiScenario -> {
reportApiScenario.setId(IDGenerator.nextStr());
@ -422,12 +413,7 @@ public class TestPlanReportService {
}
// 计划报告缺陷内容
List<TestPlanReportBug> reportBugs;
if (genParam.getIntegrated()) {
reportBugs = CollectionUtils.isEmpty(childPlanIds) ? new ArrayList<>() : extTestPlanReportBugMapper.getGroupBugs(childPlanIds);
} else {
reportBugs = extTestPlanReportBugMapper.getPlanBugs(genParam.getTestPlanId());
}
List<TestPlanReportBug> reportBugs = extTestPlanReportBugMapper.getPlanBugs(genParam.getTestPlanId());
if (CollectionUtils.isNotEmpty(reportBugs)) {
// MS处理人会与第三方的值冲突, 分开查询
List<SelectOption> headerOptions = bugCommonService.getHeaderHandlerOption(genParam.getProjectId());
@ -639,7 +625,6 @@ public class TestPlanReportService {
* @param reportId 报告ID
*/
public void summaryGroupReport(String reportId) {
// TODO: 更新计划组的用例明细执行结果
TestPlanReportSummaryExample summaryExample = new TestPlanReportSummaryExample();
summaryExample.createCriteria().andTestPlanReportIdEqualTo(reportId);
List<TestPlanReportSummary> testPlanReportSummaries = testPlanReportSummaryMapper.selectByExample(summaryExample);
@ -653,9 +638,73 @@ public class TestPlanReportService {
example.createCriteria().andParentIdEqualTo(reportId).andIntegratedEqualTo(false);
List<TestPlanReport> testPlanReports = testPlanReportMapper.selectByExample(example);
if(CollectionUtils.isEmpty(testPlanReports)){
// 不存在子报告, 不需要汇总数据
return;
}
// 汇总子报告关联的数据并入库
SqlSession sqlSession = sqlSessionFactory.openSession(ExecutorType.BATCH);
List<String> ids = testPlanReports.stream().map(TestPlanReport::getId).toList();
// 功能用例
TestPlanReportFunctionCaseExample functionCaseExample = new TestPlanReportFunctionCaseExample();
functionCaseExample.createCriteria().andTestPlanReportIdIn(ids);
List<TestPlanReportFunctionCase> reportFunctionCases = testPlanReportFunctionCaseMapper.selectByExample(functionCaseExample);
if (CollectionUtils.isNotEmpty(reportFunctionCases)) {
groupSummary.setFunctionalCaseCount((long) reportFunctionCases.size());
reportFunctionCases.forEach(reportFunctionCase -> {
reportFunctionCase.setId(IDGenerator.nextStr());
reportFunctionCase.setTestPlanReportId(reportId);
});
// 插入计划组报告, 功能用例关联数据
TestPlanReportFunctionCaseMapper batchMapper = sqlSession.getMapper(TestPlanReportFunctionCaseMapper.class);
batchMapper.batchInsert(reportFunctionCases);
}
// 接口用例
TestPlanReportApiCaseExample apiCaseExample = new TestPlanReportApiCaseExample();
apiCaseExample.createCriteria().andTestPlanReportIdIn(ids);
List<TestPlanReportApiCase> reportApiCases = testPlanReportApiCaseMapper.selectByExample(apiCaseExample);
if (CollectionUtils.isNotEmpty(reportApiCases)) {
groupSummary.setApiCaseCount((long) reportApiCases.size());
reportApiCases.forEach(reportApiCase -> {
reportApiCase.setId(IDGenerator.nextStr());
reportApiCase.setTestPlanReportId(reportId);
});
// 插入计划组报告, 接口用例关联数据
TestPlanReportApiCaseMapper batchMapper = sqlSession.getMapper(TestPlanReportApiCaseMapper.class);
batchMapper.batchInsert(reportApiCases);
}
// 场景用例
TestPlanReportApiScenarioExample scenarioExample = new TestPlanReportApiScenarioExample();
scenarioExample.createCriteria().andTestPlanReportIdIn(ids);
List<TestPlanReportApiScenario> reportApiScenarios = testPlanReportApiScenarioMapper.selectByExample(scenarioExample);
if (CollectionUtils.isNotEmpty(reportApiScenarios)) {
groupSummary.setApiScenarioCount((long) reportApiScenarios.size());
reportApiScenarios.forEach(reportApiScenario -> {
reportApiScenario.setId(IDGenerator.nextStr());
reportApiScenario.setTestPlanReportId(reportId);
});
// 插入计划组报告, 场景用例关联数据
TestPlanReportApiScenarioMapper batchMapper = sqlSession.getMapper(TestPlanReportApiScenarioMapper.class);
batchMapper.batchInsert(reportApiScenarios);
}
// 缺陷明细
TestPlanReportBugExample bugExample = new TestPlanReportBugExample();
bugExample.createCriteria().andTestPlanReportIdIn(ids);
List<TestPlanReportBug> reportBugs = testPlanReportBugMapper.selectByExample(bugExample);
if (CollectionUtils.isNotEmpty(reportBugs)) {
groupSummary.setBugCount((long) reportBugs.size());
reportBugs.forEach(reportBug -> {
reportBug.setId(IDGenerator.nextStr());
reportBug.setTestPlanReportId(reportId);
});
// 插入计划组关联用例缺陷数据
TestPlanReportBugMapper batchMapper = sqlSession.getMapper(TestPlanReportBugMapper.class);
batchMapper.batchInsert(reportBugs);
}
sqlSession.flushStatements();
SqlSessionUtils.closeSqlSession(sqlSession, sqlSessionFactory);
// 汇总并计算子报告执行的数据
summaryExample.clear();
summaryExample.createCriteria().andTestPlanReportIdIn(ids);
List<TestPlanReportSummary> summaryList = testPlanReportSummaryMapper.selectByExampleWithBLOBs(summaryExample);

View File

@ -278,7 +278,7 @@ public class TestPlanReportControllerTests extends BaseTest {
this.requestPost(GEN_PLAN_REPORT, genRequest);
genRequest.setTestPlanId("plan_id_for_gen_report");
this.requestPost(GEN_PLAN_REPORT, genRequest);
GEN_REPORT_ID = getGenReportId("plan_id_for_gen_report");
GEN_REPORT_ID = getGenReportId();
}
@Test
@ -336,6 +336,14 @@ public class TestPlanReportControllerTests extends BaseTest {
this.requestPostWithOk(EDIT_PLAN_REPORT, request);
}
@Test
@Order(18)
void testSummaryGroupReport() {
testPlanReportService.summaryGroupReport("test-plan-report-id-5");
testPlanReportService.summaryGroupReport("test-plan-report-id-7");
testPlanReportService.summaryGroupReport("test-plan-report-id-9");
}
@Resource
private TestPlanReportSummaryMapper testPlanReportSummaryMapper;
@Resource
@ -392,12 +400,11 @@ public class TestPlanReportControllerTests extends BaseTest {
/**
* 获取生成的报告ID
*
* @param planId 计划ID
* @return 报告ID
*/
private String getGenReportId(String planId) {
private String getGenReportId() {
TestPlanReportExample example = new TestPlanReportExample();
example.createCriteria().andTestPlanIdEqualTo(planId);
example.createCriteria().andTestPlanIdEqualTo("plan_id_for_gen_report");
return testPlanReportMapper.selectByExample(example).get(0).getId();
}
}

View File

@ -7,11 +7,35 @@ INSERT INTO `test_plan`(`id`, `num`, `project_id`, `group_id`, `module_id`, `nam
VALUES ('test-plan-id-for992', 100003, '100001100001', 'NONE', '1', '测试一下计划-992', 'PREPARED', 'TEST_PLAN', NULL, CURRENT_TIMESTAMP, 'admin', CURRENT_TIMESTAMP, 'admin', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, '11');
-- 计划报告测试数据
INSERT INTO `test_plan_report`(`id`, `test_plan_id`, `name`, `create_user`, `create_time`, `start_time`, `end_time`, `trigger_mode`, `exec_status`, `result_status`, `pass_threshold`, `pass_rate`, `project_id`, `integrated`, `deleted`) VALUES
('test-plan-report-id-1', 'test-plan-id-for991', '测试一下计划报告1', 'admin', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'MANUAL', 'PENDING', 'SUCCESS', '99.99', 100.00, '100001100001', 0, 0),
('test-plan-report-id-2', 'test-plan-id-for991', '测试一下计划报告1', 'admin', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'MANUAL', 'PENDING', '-', '99.99', 100.00, '100001100001', 0, 0),
('test-plan-report-id-3', 'test-plan-id-for992', '测试一下计划报告3', 'admin', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'MANUAL', 'PENDING', '-', '99.99', 100.00, '100001100001',1, 0),
('test-plan-report-id-4', 'test-plan-id-for992', '测试一下计划报告4', 'admin', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'MANUAL', 'PENDING', '-', '99.99', 100.00, '100001100001', 1, 0);
INSERT INTO `test_plan_report`(`id`, `test_plan_id`, `name`, `create_user`, `create_time`, `start_time`, `end_time`, `trigger_mode`, `exec_status`, `result_status`, `pass_threshold`, `pass_rate`, `project_id`, `integrated`, `deleted`, `parent_id`) VALUES
('test-plan-report-id-1', 'test-plan-id-for991', '测试一下计划报告1', 'admin', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'MANUAL', 'PENDING', 'SUCCESS', '99.99', 100.00, '100001100001', 0, 0, null),
('test-plan-report-id-2', 'test-plan-id-for991', '测试一下计划报告1', 'admin', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'MANUAL', 'PENDING', '-', '99.99', 100.00, '100001100001', 0, 0, null),
('test-plan-report-id-3', 'test-plan-id-for992', '测试一下计划报告3', 'admin', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'MANUAL', 'PENDING', '-', '99.99', 100.00, '100001100001',1, 0, null),
('test-plan-report-id-4', 'test-plan-id-for992', '测试一下计划报告4', 'admin', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'MANUAL', 'PENDING', '-', '99.99', 100.00, '100001100001', 1, 0, null),
('test-plan-report-id-5', 'test-plan-id-for992', '测试一下计划报告5', 'admin', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'MANUAL', 'PENDING', '-', '99.99', 100.00, '100001100001', 1, 0, null),
('test-plan-report-id-6', 'test-plan-id-for992', '测试一下计划报告6', 'admin', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'MANUAL', 'PENDING', '-', '99.99', 100.00, '100001100001', 0, 0, 'test-plan-report-id-5'),
('test-plan-report-id-7', 'test-plan-id-for992', '测试一下计划报告7', 'admin', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'MANUAL', 'PENDING', '-', '99.99', 100.00, '100001100001', 1, 0, null),
('test-plan-report-id-8', 'test-plan-id-for992', '测试一下计划报告8', 'admin', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'MANUAL', 'PENDING', '-', '99.99', 100.00, '100001100001', 0, 0, 'test-plan-report-id-7'),
('test-plan-report-id-9', 'test-plan-id-for992', '测试一下计划报告9', 'admin', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'MANUAL', 'PENDING', '-', '99.99', 100.00, '100001100001', 0, 1, null);
INSERT INTO `test_plan_report_summary` (`id`, `functional_case_count`, `api_case_count`, `api_scenario_count`, `bug_count`, `test_plan_report_id`, `summary`, `plan_count`) VALUES
('test-plan-report-summary-1', 0, 0, 0, 0, 'test-plan-report-id-5', '', 0),
('test-plan-report-summary-2', 0, 0, 0, 0, 'test-plan-report-id-6', '', 0),
('test-plan-report-summary-3', 0, 0, 0, 0, 'test-plan-report-id-7', '', 0),
('test-plan-report-summary-4', 0, 0, 0, 0, 'test-plan-report-id-8', '', 0),
('test-plan-report-summary-5', 0, 0, 0, 0, 'test-plan-report-id-9', '', 0);
INSERT INTO `test_plan_report_function_case` (`id`, `test_plan_report_id`, `test_plan_function_case_id`, `function_case_id`, `function_case_num`, `function_case_name`, `function_case_execute_result`, `test_plan_collection_id`, `pos`) VALUES
('report-function-case-1', 'test-plan-report-id-6', 'plan-function-case-1', 'function-case-1', 10000, 'function-case-oasis', 'PENDING', 'NONE', 4096);
INSERT INTO `test_plan_report_api_case` (`id`, `test_plan_report_id`, `test_plan_collection_id`, `test_plan_api_case_id`, `api_case_id`, `api_case_num`, `api_case_name`, `pos`) VALUES
('report-api-case-1', 'test-plan-report-id-6', 'NONE', 'plan-api-case-1', 'api-case-1', 10000, 'api-case-oasis', 4096);
INSERT INTO `test_plan_report_api_scenario` (`id`, `test_plan_report_id`, `test_plan_collection_id`, `test_plan_api_scenario_id`, `api_scenario_id`, `api_scenario_num`, `api_scenario_name`, `pos`) VALUES
('report-api-scenario-1', 'test-plan-report-id-6', 'NONE', 'plan-api-scenario-1', 'api-scenario-1', 10000, 'api-scenario-oasis', 4096);
INSERT INTO `test_plan_report_bug` (`id`, `test_plan_report_id`, `bug_id`, `bug_num`, `bug_title`, `bug_case_count`) VALUES
('report-bug-1', 'test-plan-report-id-6', 'plan-bug-1', 10000, 'bug-1', 1);
-- 计划报告分享信息
INSERT INTO project_application (`project_id`, `type`, `type_value`) VALUES