REM:
1. 增加测试用例名称字段
This commit is contained in:
HuangXin 2020-09-11 15:57:32 +08:00
parent 90ee2946f0
commit 581cd429a1
4 changed files with 18 additions and 5 deletions

View File

@ -21,6 +21,10 @@ public class QATestItem {
* The Id. * The Id.
*/ */
private Integer id; private Integer id;
/**
* The Name.
*/
private String name;
/** /**
* The Priority. * The Priority.
*/ */

View File

@ -111,8 +111,8 @@ public class JsonTestCaseRun extends CommonRestfulJson implements TestCaseRun {
@Test @Test
public void runQaJsonTestCase() throws Exception { public void runQaJsonTestCase() throws Exception {
log.info("[{}] Run {} json test: {} {}", rspObject.getPriority(), rspObject.getId(), rspObject.getMethod(), log.info("[{}] Run json test: ({}) [{}] '{}' {} ", rspObject.getPriority(), rspObject.getId(),
rspObject.getUrlPath()); rspObject.getMethod(), rspObject.getUrlPath(), rspObject.getName());
if (rspObject.getPrepareCallback() != null) { if (rspObject.getPrepareCallback() != null) {
rspObject.getPrepareCallback().prepareCallback(this); rspObject.getPrepareCallback().prepareCallback(this);

View File

@ -110,9 +110,8 @@ public class ObjectTestCaseRun extends CommonRestful implements TestCaseRun {
*/ */
@Test @Test
public void runQaObjectTestCase() throws Exception { public void runQaObjectTestCase() throws Exception {
log.info("[{}] Run object test: ({}) [{}] '{}' {} ", rspObject.getPriority(), rspObject.getId(),
log.info("[{}] Run {} json test: {} {}", rspObject.getPriority(), rspObject.getId(), rspObject.getMethod(), rspObject.getMethod(), rspObject.getUrlPath(), rspObject.getName());
rspObject.getUrlPath());
if (rspObject.getPrepareCallback() != null) { if (rspObject.getPrepareCallback() != null) {
rspObject.getPrepareCallback().prepareCallback(this); rspObject.getPrepareCallback().prepareCallback(this);

View File

@ -40,6 +40,7 @@ public class P1 {
private static final QATestItem[] testItemArray = new QATestItem[]{ private static final QATestItem[] testItemArray = new QATestItem[]{
QATestItem.builder() QATestItem.builder()
.id(BASE_P1_ID) .id(BASE_P1_ID)
.name("登陆")
.priority(TestPriority.P1_PRIORITY) .priority(TestPriority.P1_PRIORITY)
.urlPath("/auth/login") .urlPath("/auth/login")
.method(RequestMethod.POST) .method(RequestMethod.POST)
@ -61,6 +62,7 @@ public class P1 {
QATestItem.builder() QATestItem.builder()
.id(BASE_P1_ID + 1) .id(BASE_P1_ID + 1)
.name("登陆(base64编码格式密文")
.priority(TestPriority.P1_PRIORITY) .priority(TestPriority.P1_PRIORITY)
.urlPath("/auth/login") .urlPath("/auth/login")
.method(RequestMethod.POST) .method(RequestMethod.POST)
@ -82,6 +84,7 @@ public class P1 {
QATestItem.builder() QATestItem.builder()
.id(BASE_P1_ID + 2) .id(BASE_P1_ID + 2)
.name("未登录用户请求接口")
.priority(TestPriority.P1_PRIORITY) .priority(TestPriority.P1_PRIORITY)
.urlPath("/manager/device") .urlPath("/manager/device")
.method(RequestMethod.PUT) .method(RequestMethod.PUT)
@ -106,6 +109,7 @@ public class P1 {
QATestItem.builder() QATestItem.builder()
.id(BASE_P1_ID + 3) .id(BASE_P1_ID + 3)
.name("添加新的能力节点,具备能力清洗和压制")
.priority(TestPriority.P1_PRIORITY) .priority(TestPriority.P1_PRIORITY)
.urlPath("/manager/device") .urlPath("/manager/device")
.method(RequestMethod.PUT) .method(RequestMethod.PUT)
@ -137,6 +141,7 @@ public class P1 {
QATestItem.builder() QATestItem.builder()
.id(BASE_P1_ID + 4) .id(BASE_P1_ID + 4)
.name("删除存在的单个能力节点接口")
.priority(TestPriority.P1_PRIORITY) .priority(TestPriority.P1_PRIORITY)
.urlPath("/manager/device") .urlPath("/manager/device")
.method(RequestMethod.DELETE) .method(RequestMethod.DELETE)
@ -160,6 +165,7 @@ public class P1 {
QATestItem.builder() QATestItem.builder()
.id(BASE_P1_ID + 5) .id(BASE_P1_ID + 5)
.name("更新清洗能力节点信息,添加压制")
.priority(TestPriority.P1_PRIORITY) .priority(TestPriority.P1_PRIORITY)
.urlPath("/manager/upgrade") .urlPath("/manager/upgrade")
.method(RequestMethod.POST) .method(RequestMethod.POST)
@ -222,6 +228,7 @@ public class P1 {
QATestItem.builder() QATestItem.builder()
.id(BASE_P1_ID + 6) .id(BASE_P1_ID + 6)
.name("对一个IP指定攻击类型进行清洗")
.priority(TestPriority.P1_PRIORITY) .priority(TestPriority.P1_PRIORITY)
.urlPath("/task/start") .urlPath("/task/start")
.method(RequestMethod.POST) .method(RequestMethod.POST)
@ -243,6 +250,7 @@ public class P1 {
QATestItem.builder() QATestItem.builder()
.id(BASE_P1_ID + 7) .id(BASE_P1_ID + 7)
.name("对IPV6指定攻击类型进行清洗")
.priority(TestPriority.P1_PRIORITY) .priority(TestPriority.P1_PRIORITY)
.urlPath("/task/start") .urlPath("/task/start")
.method(RequestMethod.POST) .method(RequestMethod.POST)
@ -264,6 +272,7 @@ public class P1 {
QATestItem.builder() QATestItem.builder()
.id(BASE_P1_ID + 8) .id(BASE_P1_ID + 8)
.name("停止一个处置任务")
.priority(TestPriority.P1_PRIORITY) .priority(TestPriority.P1_PRIORITY)
.urlPath("/task/stop") .urlPath("/task/stop")
.method(RequestMethod.POST) .method(RequestMethod.POST)
@ -285,6 +294,7 @@ public class P1 {
QATestItem.builder() QATestItem.builder()
.id(BASE_P1_ID + 9) .id(BASE_P1_ID + 9)
.name("获取第一页10个处置任务信息")
.priority(TestPriority.P1_PRIORITY) .priority(TestPriority.P1_PRIORITY)
.urlPath("/task/taskList") .urlPath("/task/taskList")
.method(RequestMethod.POST) .method(RequestMethod.POST)