Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
oto
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
龚小红
oto
Commits
40b5d52a
Commit
40b5d52a
authored
Jun 06, 2022
by
龚小红
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加移动端1.2的自动化测试接口
parent
80034ba3
Changes
9
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
4265 additions
and
4576 deletions
+4265
-4576
Manager.java
src/test/java/com/oto/cases/otoseller/Manager.java
+4
-17
Phone.java
src/test/java/com/oto/cases/otoseller/Phone.java
+212
-149
Work.java
src/test/java/com/oto/cases/otoseller/Work.java
+84
-13
BasicConfig.java
src/test/java/com/oto/config/BasicConfig.java
+8
-1
IdConvertBase64Enum.java
src/test/java/com/oto/utils/IdConvertBase64Enum.java
+0
-46
IdMakeUtil.java
src/test/java/com/oto/utils/IdMakeUtil.java
+0
-10
JmeterAccountFile.java
src/test/java/com/oto/utils/JmeterAccountFile.java
+0
-8
testNG.xml
src/test/testNG.xml
+1
-1
report.html
test-output/report.html
+3956
-4331
No files found.
src/test/java/com/oto/cases/otoseller/Manager.java
View file @
40b5d52a
...
@@ -118,23 +118,6 @@ public class Manager {
...
@@ -118,23 +118,6 @@ public class Manager {
Assert
.
assertFalse
(
success
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_saveSeller
,
"新增同一手机号销售成功"
,
response
.
body
().
asString
()));
Assert
.
assertFalse
(
success
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_saveSeller
,
"新增同一手机号销售成功"
,
response
.
body
().
asString
()));
}
}
//接口对此场景做校验,仅前端做了限制
// @Test(description = "不可修改总监为普通",priority = 6)
// public void 不可修改总监为普通(){
// HashMap<String,Object> params = new HashMap<>();
// params.put("id", LEADER_ID);
// params.put("sellerName", "勿动-自动化测试总监");
// params.put("phoneNumber", "18248405155");
// params.put("roleType", 1);
// params.put("callPermission", 1);
// params.put("sellerStatus", 1);
// params.put("companyId", 3);
// params.put("sellerLevel", 1);
// Response response = network.postResponse(params, BasicConfig.MANAGER_oto_updateSeller);
// boolean success = response.jsonPath().getBoolean("success");
// Assert.assertFalse(success,network.message(params,BasicConfig.MANAGER_oto_updateSeller,"修改总监为普通销售成功",response.body().asString()));
// }
@Test
(
description
=
"不可新增同名公司"
,
priority
=
7
)
@Test
(
description
=
"不可新增同名公司"
,
priority
=
7
)
public
void
不可新增同名公司
(){
public
void
不可新增同名公司
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
...
@@ -219,6 +202,8 @@ public class Manager {
...
@@ -219,6 +202,8 @@ public class Manager {
moneyOptions
.
add
(
2
);
moneyOptions
.
add
(
2
);
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"id"
,
19
);
params
.
put
(
"id"
,
19
);
params
.
put
(
"businessType"
,
2
);
params
.
put
(
"supplierId"
,
11
);
params
.
put
(
"prodName"
,
"勿动-自动化专用产品更新"
);
params
.
put
(
"prodName"
,
"勿动-自动化专用产品更新"
);
params
.
put
(
"companyIds"
,
companyIds
);
params
.
put
(
"companyIds"
,
companyIds
);
params
.
put
(
"costOptions"
,
costOptions
);
params
.
put
(
"costOptions"
,
costOptions
);
...
@@ -261,6 +246,8 @@ public class Manager {
...
@@ -261,6 +246,8 @@ public class Manager {
moneyOptions
.
add
(
3
);
moneyOptions
.
add
(
3
);
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"id"
,
19
);
params
.
put
(
"id"
,
19
);
params
.
put
(
"businessType"
,
2
);
params
.
put
(
"supplierId"
,
21
);
params
.
put
(
"prodName"
,
"勿动-自动化专用产品"
);
params
.
put
(
"prodName"
,
"勿动-自动化专用产品"
);
params
.
put
(
"companyIds"
,
companyIds
);
params
.
put
(
"companyIds"
,
companyIds
);
params
.
put
(
"costOptions"
,
costOptions
);
params
.
put
(
"costOptions"
,
costOptions
);
...
...
src/test/java/com/oto/cases/otoseller/Phone.java
View file @
40b5d52a
This diff is collapsed.
Click to expand it.
src/test/java/com/oto/cases/otoseller/Work.java
View file @
40b5d52a
...
@@ -22,6 +22,7 @@ public class Work implements Authorization {
...
@@ -22,6 +22,7 @@ public class Work implements Authorization {
public
int
followTimes
;
//跟进次数
public
int
followTimes
;
//跟进次数
public
static
Map
<
String
,
Integer
>
header
;
public
static
Map
<
String
,
Integer
>
header
;
public
static
Map
<
String
,
Integer
>
chart
;
public
static
Map
<
String
,
Integer
>
chart
;
public
static
long
sceneId
;
@BeforeTest
@BeforeTest
public
void
setUp
(){
public
void
setUp
(){
...
@@ -98,7 +99,6 @@ public class Work implements Authorization {
...
@@ -98,7 +99,6 @@ public class Work implements Authorization {
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
FORM_submitQuestion
,
"客户填写表单失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
FORM_submitQuestion
,
"客户填写表单失败"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"公域引流_查找客户"
,
priority
=
5
)
@Test
(
description
=
"公域引流_查找客户"
,
priority
=
5
)
public
void
公域引流
_
查找客户
(){
public
void
公域引流
_
查找客户
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
...
@@ -168,11 +168,11 @@ public class Work implements Authorization {
...
@@ -168,11 +168,11 @@ public class Work implements Authorization {
Response
response
=
network
.
getResponse
(
BasicConfig
.
WORK_staticChart
);
Response
response
=
network
.
getResponse
(
BasicConfig
.
WORK_staticChart
);
Object
data
=
response
.
jsonPath
().
getJsonObject
(
"data"
);
Object
data
=
response
.
jsonPath
().
getJsonObject
(
"data"
);
Assert
.
assertNotNull
(
data
,
network
.
message
(
BasicConfig
.
WORK_staticChart
,
"流程组表格数量为空"
,
response
.
body
().
asString
()));
Assert
.
assertNotNull
(
data
,
network
.
message
(
BasicConfig
.
WORK_staticChart
,
"流程组表格数量为空"
,
response
.
body
().
asString
()));
chart
.
put
(
"ondStep"
,
response
.
jsonPath
().
getInt
(
"data[
0
].custNum"
));
chart
.
put
(
"ondStep"
,
response
.
jsonPath
().
getInt
(
"data[
1
].custNum"
));
chart
.
put
(
"twoStep"
,
response
.
jsonPath
().
getInt
(
"data[
1
].custNum"
));
chart
.
put
(
"twoStep"
,
response
.
jsonPath
().
getInt
(
"data[
2
].custNum"
));
chart
.
put
(
"threeStep"
,
response
.
jsonPath
().
getInt
(
"data[
2
].custNum"
));
chart
.
put
(
"threeStep"
,
response
.
jsonPath
().
getInt
(
"data[
3
].custNum"
));
chart
.
put
(
"fourStep"
,
response
.
jsonPath
().
getInt
(
"data[
3
].custNum"
));
chart
.
put
(
"fourStep"
,
response
.
jsonPath
().
getInt
(
"data[
4
].custNum"
));
chart
.
put
(
"fiveStep"
,
response
.
jsonPath
().
getInt
(
"data[
4
].custNum"
));
chart
.
put
(
"fiveStep"
,
response
.
jsonPath
().
getInt
(
"data[
5
].custNum"
));
}
}
@Test
(
description
=
"工作台_标签列表"
,
priority
=
11
)
@Test
(
description
=
"工作台_标签列表"
,
priority
=
11
)
...
@@ -238,12 +238,12 @@ public class Work implements Authorization {
...
@@ -238,12 +238,12 @@ public class Work implements Authorization {
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"custId"
,
custId
);
params
.
put
(
"custId"
,
custId
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WORK_detail
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WORK_detail
);
Object
custInfo
=
response
.
jsonPath
().
getJsonObject
(
"data.custInfo"
);
int
custFlow
=
response
.
jsonPath
().
getInt
(
"data.custInfo.custFlow"
);
int
custFlow
=
response
.
jsonPath
().
getInt
(
"data.custInfo.custFlow"
);
int
commitInsure
=
response
.
jsonPath
().
getInt
(
"data.custInfo.commitInsure"
);
Object
formInfo
=
response
.
jsonPath
().
getJsonObject
(
"data.formInfo"
);
int
commitPlanFlag
=
response
.
jsonPath
().
getInt
(
"data.custInfo.commitPlanFlag"
);
Assert
.
assertNotNull
(
custInfo
,
network
.
message
(
params
,
BasicConfig
.
WORK_detail
,
"新客户提交计划书状态错误非0"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
custFlow
,
1
,
network
.
message
(
params
,
BasicConfig
.
WORK_detail
,
"新客户流程组状态错误非1"
,
response
.
body
().
asString
()));
Assert
.
assertNotNull
(
formInfo
,
network
.
message
(
params
,
BasicConfig
.
WORK_detail
,
"新客户投保要素确认状态错误非0"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
commitInsure
,
0
,
network
.
message
(
params
,
BasicConfig
.
WORK_detail
,
"新客户提交计划书状态错误非0"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
custFlow
,
1
,
network
.
message
(
params
,
BasicConfig
.
WORK_detail
,
"客户阶段不为1:具备机构养老理念"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
commitPlanFlag
,
0
,
network
.
message
(
params
,
BasicConfig
.
WORK_detail
,
"新客户投保要素确认状态错误非0"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"查询客户电话表单回填状态"
,
priority
=
17
)
@Test
(
description
=
"查询客户电话表单回填状态"
,
priority
=
17
)
...
@@ -272,6 +272,17 @@ public class Work implements Authorization {
...
@@ -272,6 +272,17 @@ public class Work implements Authorization {
Assert
.
assertNotNull
(
data
,
network
.
message
(
params
,
BasicConfig
.
WORK_callLog
,
"历史通话为空"
,
response
.
body
().
asString
()));
Assert
.
assertNotNull
(
data
,
network
.
message
(
params
,
BasicConfig
.
WORK_callLog
,
"历史通话为空"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"查询客户阶段信息"
,
priority
=
20
)
public
void
查询客户阶段信息
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"custId"
,
custId
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
PHONE_getCustPhase
);
int
custFlow
=
response
.
jsonPath
().
getInt
(
"data.custFlow"
);
int
commitPlanFlag
=
response
.
jsonPath
().
getInt
(
"data.commitPlanFlag"
);
Assert
.
assertEquals
(
custFlow
,
1
,
network
.
message
(
params
,
BasicConfig
.
WORK_callLog
,
"新客户的客户阶段不为1:具备机构养老理念"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
commitPlanFlag
,
0
,
network
.
message
(
params
,
BasicConfig
.
WORK_callLog
,
"是否提交计划书不为否"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"修改客户跟进权重"
,
priority
=
24
)
@Test
(
description
=
"修改客户跟进权重"
,
priority
=
24
)
public
void
修改客户跟进权重
(){
public
void
修改客户跟进权重
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
...
@@ -785,8 +796,8 @@ public class Work implements Authorization {
...
@@ -785,8 +796,8 @@ public class Work implements Authorization {
Assert
.
assertTrue
(
listSize
>
0
,
network
.
message
(
params
,
BasicConfig
.
WORK_taskDetailsList
,
"待完成客户数统计错误"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
listSize
>
0
,
network
.
message
(
params
,
BasicConfig
.
WORK_taskDetailsList
,
"待完成客户数统计错误"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"查看我的预约列表"
,
priority
=
70
)
@Test
(
description
=
"查看我的预约
订单
列表"
,
priority
=
70
)
public
void
查看我的预约列表
(){
public
void
查看我的预约
订单
列表
(){
agent2Tku
();
agent2Tku
();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"pageIndex"
,
1
);
params
.
put
(
"pageIndex"
,
1
);
...
@@ -799,4 +810,64 @@ public class Work implements Authorization {
...
@@ -799,4 +810,64 @@ public class Work implements Authorization {
Assert
.
assertEquals
(
bookingStatus
,
0
,
network
.
message
(
BasicConfig
.
PHONE_getReservationList
,
"预约状态错误:非待参观"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
bookingStatus
,
0
,
network
.
message
(
BasicConfig
.
PHONE_getReservationList
,
"预约状态错误:非待参观"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"新增见面场景"
,
priority
=
71
)
public
void
新增见面场景
(){
otoManagerAuth
();
int
companyIds
[]
=
{
1
,
5
};
int
custFlows
[]
=
{
1
,
2
};
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"confUsable"
,
0
);
params
.
put
(
"companyIds"
,
companyIds
);
params
.
put
(
"custFlows"
,
custFlows
);
params
.
put
(
"sceneName"
,
"勿动-自动化场景"
);
params
.
put
(
"sceneDesc"
,
"勿动,这是自动化测试专用的面访场景"
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
PHONE_custConfSave
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
PHONE_custConfSave
,
"新增见面场景失败"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"查看见面场景列表"
,
priority
=
72
)
public
void
查看见面场景列表
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"pageIndex"
,
1
);
params
.
put
(
"pageSize"
,
20
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
PHONE_custConfList
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.list.size()"
);
int
confUsable
=
response
.
jsonPath
().
getInt
(
"data.list[0].confUsable"
);
String
sceneName
=
response
.
jsonPath
().
getString
(
"data.list[0].sceneName"
);
Assert
.
assertTrue
(
size
>
0
,
network
.
message
(
params
,
BasicConfig
.
PHONE_custConfList
,
"查看预约列表不为空"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
confUsable
,
0
,
network
.
message
(
params
,
BasicConfig
.
PHONE_custConfList
,
"查看预约列表不为空"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
sceneName
,
"勿动-自动化场景"
,
network
.
message
(
params
,
BasicConfig
.
PHONE_custConfList
,
"查看预约列表不为空"
,
response
.
body
().
asString
()));
sceneId
=
response
.
jsonPath
().
getLong
(
"data.list[0].id"
);
}
@Test
(
description
=
"修改见面场景"
,
priority
=
73
)
public
void
修改见面场景
(){
int
companyIds
[]
={
5
};
int
custFlows
[]
=
{
1
,
2
,
3
,
4
,
5
};
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"id"
,
sceneId
);
params
.
put
(
"confUsable"
,
1
);
params
.
put
(
"companyIds"
,
companyIds
);
params
.
put
(
"custFlows"
,
custFlows
);
params
.
put
(
"sceneName"
,
"勿动-自动化面访场景"
);
params
.
put
(
"sceneDesc"
,
"勿动,这是自动化测试专用的面访场景"
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
PHONE_custConfSave
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
PHONE_custConfSave
,
"修改自动化场景失败"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"关闭见面场景状态"
,
priority
=
74
)
public
void
关闭见面场景状态
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"id"
,
sceneId
);
params
.
put
(
"confUsable"
,
0
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
PHONE_updateStatus
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
PHONE_updateStatus
,
"关闭见面场景失败"
,
response
.
body
().
asString
()));
}
}
}
src/test/java/com/oto/config/BasicConfig.java
View file @
40b5d52a
...
@@ -135,7 +135,12 @@ public class BasicConfig {
...
@@ -135,7 +135,12 @@ public class BasicConfig {
public
static
final
String
WORK_modifyTaskConf
=
WORK_HOST
+
"/kjy/oto/manager/sellerTask/modifyTaskConf"
;
public
static
final
String
WORK_modifyTaskConf
=
WORK_HOST
+
"/kjy/oto/manager/sellerTask/modifyTaskConf"
;
public
static
final
String
WORK_statisticHeader
=
WORK_HOST
+
"/kjy/oto/manager/sellerTask/statistic/header"
;
public
static
final
String
WORK_statisticHeader
=
WORK_HOST
+
"/kjy/oto/manager/sellerTask/statistic/header"
;
public
static
final
String
WORK_taskDetailsList
=
WORK_HOST
+
"/kjy/oto/manager/sellerTask/taskDetailsList"
;
public
static
final
String
WORK_taskDetailsList
=
WORK_HOST
+
"/kjy/oto/manager/sellerTask/taskDetailsList"
;
public
static
final
String
PHONE_custConfSave
=
WORK_HOST
+
"/kjy/oto/manager/custconf/save"
;
public
static
final
String
PHONE_custConfList
=
WORK_HOST
+
"/kjy/oto/manager/custconf/list"
;
public
static
final
String
PHONE_updateStatus
=
WORK_HOST
+
"/kjy/oto/manager/custconf/updateStatus"
;
public
static
final
String
PHONE_getCustPhase
=
WORK_HOST
+
"/kjy/oto/manager/customer/getCustPhase"
;
public
static
final
String
PHONE_updateCustPhase
=
WORK_HOST
+
"/kjy/oto/manager/customer/updateCustPhase"
;
public
static
final
String
PHONE_delete
=
WORK_HOST
+
"/kjy/oto/manager/custconf/delete"
;
public
static
final
String
PHONE_customerList
=
PHONE_HOST
+
"/kjy/oto/manager/customer/list"
;
public
static
final
String
PHONE_customerList
=
PHONE_HOST
+
"/kjy/oto/manager/customer/list"
;
public
static
final
String
PHONE_customerSave
=
PHONE_HOST
+
"/kjy/oto/manager/customer/introduce/save"
;
public
static
final
String
PHONE_customerSave
=
PHONE_HOST
+
"/kjy/oto/manager/customer/introduce/save"
;
...
@@ -161,6 +166,8 @@ public class BasicConfig {
...
@@ -161,6 +166,8 @@ public class BasicConfig {
public
static
final
String
PHONE_getUnusualTypes
=
PHONE_HOST
+
"/kjy/oto/h5/v1/getUnusualTypes"
;
public
static
final
String
PHONE_getUnusualTypes
=
PHONE_HOST
+
"/kjy/oto/h5/v1/getUnusualTypes"
;
public
static
final
String
PHONE_fail
=
HOST
+
"/kjy/oto/interview/authorize/fail"
;
public
static
final
String
PHONE_fail
=
HOST
+
"/kjy/oto/interview/authorize/fail"
;
public
static
final
String
PHONE_getReservationList
=
HOST
+
"/kjy/pub/form/getReservationList"
;
public
static
final
String
PHONE_getReservationList
=
HOST
+
"/kjy/pub/form/getReservationList"
;
public
static
final
String
PHONE_listCustInterConf
=
PHONE_HOST
+
"/kjy/oto/interview/listCustInterConf"
;
public
static
final
String
PHONE_checkCustPhase
=
PHONE_HOST
+
"/kjy/oto/interview/checkCustPhase"
;
public
static
final
String
WORK_verifyCode
=
WORK_HOST
+
"/kjy/oto/auto/test/verifyCode"
;
public
static
final
String
WORK_verifyCode
=
WORK_HOST
+
"/kjy/oto/auto/test/verifyCode"
;
public
static
final
String
WORK_delCust
=
WORK_HOST
+
"/kjy/oto/auto/test/delCust"
;
public
static
final
String
WORK_delCust
=
WORK_HOST
+
"/kjy/oto/auto/test/delCust"
;
...
...
src/test/java/com/oto/utils/IdConvertBase64Enum.java
deleted
100644 → 0
View file @
80034ba3
package
com
.
oto
.
utils
;
import
java.util.HashMap
;
import
java.util.Map
;
/**
* @author lizhi
* @date 2020/4/9 11:36 AM
*/
public
enum
IdConvertBase64Enum
{
/**
* 注意,code只能是两位
*/
DEF
(
"j2"
,
"默认类型"
),
TRANS
(
"t3"
,
"短链接服务"
),
;
private
String
code
;
private
String
desc
;
IdConvertBase64Enum
(
String
code
,
String
desc
)
{
this
.
code
=
code
;
this
.
desc
=
desc
;
}
public
String
getCode
()
{
return
"K"
+
code
;
}
private
static
final
Map
<
String
,
IdConvertBase64Enum
>
ENUM_MAP
=
new
HashMap
<>();
static
{
for
(
IdConvertBase64Enum
lengthEnum
:
values
()){
ENUM_MAP
.
put
(
lengthEnum
.
getCode
(),
lengthEnum
);
}
}
public
static
IdConvertBase64Enum
getByCode
(
String
code
)
{
if
(
code
==
null
)
{
return
null
;
}
return
ENUM_MAP
.
get
(
code
);
}
}
\ No newline at end of file
src/test/java/com/oto/utils/IdMakeUtil.java
View file @
40b5d52a
...
@@ -78,14 +78,4 @@ public class IdMakeUtil implements Authorization {
...
@@ -78,14 +78,4 @@ public class IdMakeUtil implements Authorization {
return
decodeId
;
return
decodeId
;
}
}
public
static
String
encodingId
(
Long
id
,
IdConvertBase64Enum
base64Enum
)
{
if
(
id
==
null
||
base64Enum
==
null
||
base64Enum
.
getCode
().
length
()
!=
3
)
{
return
null
;
}
id
=
(
id
<<
3
)
^
7
;
String
encode
=
encoder
.
encodeToString
(
Long
.
toString
(
id
).
getBytes
());
String
replace
=
encode
.
replace
(
"="
,
""
);
return
base64Enum
.
getCode
()
+
(
encode
.
length
()
-
replace
.
length
())
+
replace
;
}
}
}
src/test/java/com/oto/utils/JmeterAccountFile.java
View file @
40b5d52a
...
@@ -21,14 +21,6 @@ public class JmeterAccountFile {
...
@@ -21,14 +21,6 @@ public class JmeterAccountFile {
public
static
void
main
(
String
[]
args
)
{
public
static
void
main
(
String
[]
args
)
{
// String path = String.valueOf(JmeterAccountFile.class.getResource("/"));
// String path = String.valueOf(JmeterAccountFile.class.getResource("/"));
// accountFile(path);
// accountFile(path);
otoCookieMaker
();
}
/**
* 生成otoCookie,仅用于压力测试文件
*/
public
static
void
otoCookieMaker
()
{
}
}
//仅用于生成直播账号Authkey文件
//仅用于生成直播账号Authkey文件
...
...
src/test/testNG.xml
View file @
40b5d52a
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite
name=
"
客集集
"
verbose=
"1"
thread-count=
"3"
>
<suite
name=
"
oto
"
verbose=
"1"
thread-count=
"3"
>
<suite-files>
<suite-files>
<suite-file
path=
"workTestNG.xml"
></suite-file>
<suite-file
path=
"workTestNG.xml"
></suite-file>
...
...
test-output/report.html
View file @
40b5d52a
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment