Commit c087ba63 authored by wdy's avatar wdy

Merge branch 'dev' into 'master'

dev - master 23

See merge request !361
parents ebfed467 6393bbf2
...@@ -14,12 +14,12 @@ public class UseCaseVO { ...@@ -14,12 +14,12 @@ public class UseCaseVO {
private String name; private String name;
// 测试场景 // 测试场景
// private String scenario; private String scenarioName;
private ScenarioKEVO scenario; private ScenarioKEVO scenario;
// 测试方法 // 测试方法
// private String test_type; private String test_type;
private MethodVo method; private MethodVo method;
/** /**
...@@ -27,7 +27,9 @@ public class UseCaseVO { ...@@ -27,7 +27,9 @@ public class UseCaseVO {
* @return * @return
*/ */
public String getCoordinates() { public String getCoordinates() {
return scenario.getClass().getName() + method.getClass().getName(); scenarioName = scenario.getName();
test_type = method.getName();
return scenarioName + test_type;
} }
} }
...@@ -73,8 +73,6 @@ public class MatrixServiceImpl implements MatrixService { ...@@ -73,8 +73,6 @@ public class MatrixServiceImpl implements MatrixService {
} }
} }
// String caseResult= HttpUtil.post("https://10.12.48.78:8090/DescribeCaseList","");
OkHttpClient client = new OkHttpClient().newBuilder().build(); OkHttpClient client = new OkHttpClient().newBuilder().build();
MediaType mediaType = MediaType.parse("application/json"); MediaType mediaType = MediaType.parse("application/json");
...@@ -106,15 +104,9 @@ public class MatrixServiceImpl implements MatrixService { ...@@ -106,15 +104,9 @@ public class MatrixServiceImpl implements MatrixService {
String string = responseR.body().string(); String string = responseR.body().string();
JSONObject jsonO = JSONObject.parseObject(string); JSONObject jsonO = JSONObject.parseObject(string);
// JSONObject object = JSONObject.parseObject(caseResult);
// 获取测试用例列表 // 获取测试用例列表
List<UseCaseVO> caseList = jsonO.getJSONObject("data").getJSONObject("useCases").getList("nodes", UseCaseVO.class); List<UseCaseVO> caseList = jsonO.getJSONObject("data").getJSONObject("useCases").getList("nodes", UseCaseVO.class);
// List<UseCaseVO> caseList = object.getList("case_list", UseCaseVO.class);
MatrixResponse response = new MatrixResponse(); MatrixResponse response = new MatrixResponse();
setHeaderName(response, testTypeList); setHeaderName(response, testTypeList);
setRowsName(response, scenarioList, testTypeList, caseList); setRowsName(response, scenarioList, testTypeList, caseList);
...@@ -213,21 +205,4 @@ public class MatrixServiceImpl implements MatrixService { ...@@ -213,21 +205,4 @@ public class MatrixServiceImpl implements MatrixService {
} }
return null; return null;
} }
@Data
public static class CaseVO {
private String id;
private String name;
private ScenarioKEVO scenario;
private MethodVo method;
public String getCoordinates() {
return scenario.getClass().getName() + method.getClass().getName();
}
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment