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
795fd243
Commit
795fd243
authored
Jul 19, 2021
by
张艳玲
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
解决报错问题
parent
6fce76ec
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
260 additions
and
160 deletions
+260
-160
Customer.java
src/test/java/com/kjj/cases/live/agent/Customer.java
+0
-7
LiveLater.java
src/test/java/com/kjj/cases/live/agent/LiveLater.java
+4
-4
Reward.java
src/test/java/com/kjj/cases/live/agent/Reward.java
+2
-2
FlipCard.java
src/test/java/com/kjj/cases/live/flipCard/FlipCard.java
+120
-57
SaveLive.java
src/test/java/com/kjj/cases/live/liveConfig/SaveLive.java
+55
-56
WinningRules.java
...test/java/com/kjj/cases/live/liveConfig/WinningRules.java
+2
-2
Lottery.java
src/test/java/com/kjj/cases/live/lottery/Lottery.java
+74
-29
BasicConfig.java
src/test/java/com/kjj/config/BasicConfig.java
+2
-2
liveTestNG.xml
src/test/liveTestNG.xml
+1
-1
No files found.
src/test/java/com/kjj/cases/live/agent/Customer.java
View file @
795fd243
...
...
@@ -108,7 +108,6 @@ public class Customer implements Authorization {
System
.
out
.
println
(
response
.
body
().
asString
());
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
BasicConfig
.
MOBILE_customerUpdate
,
"性别修改失败"
,
response
.
body
().
asString
()));
Map
<
String
,
Object
>
ageParam
=
new
HashMap
<>();
ageParam
.
put
(
"customerId"
,
customerId
);
ageParam
.
put
(
"key"
,
2
);
...
...
@@ -117,7 +116,6 @@ public class Customer implements Authorization {
System
.
out
.
println
(
ageRes
.
body
().
asString
());
boolean
data1
=
ageRes
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data1
,
network
.
message
(
BasicConfig
.
MOBILE_customerUpdate
,
"年龄修改失败"
,
ageRes
.
body
().
asString
()));
Map
<
String
,
Object
>
professionalParam
=
new
HashMap
<>();
professionalParam
.
put
(
"customerId"
,
customerId
);
professionalParam
.
put
(
"key"
,
3
);
...
...
@@ -126,7 +124,6 @@ public class Customer implements Authorization {
System
.
out
.
println
(
professionalRes
.
body
().
asString
());
boolean
data2
=
professionalRes
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data2
,
network
.
message
(
BasicConfig
.
MOBILE_customerUpdate
,
"职业修改失败"
,
professionalRes
.
body
().
asString
()));
Map
<
String
,
Object
>
incomeParam
=
new
HashMap
<>();
incomeParam
.
put
(
"customerId"
,
customerId
);
incomeParam
.
put
(
"key"
,
4
);
...
...
@@ -135,7 +132,6 @@ public class Customer implements Authorization {
System
.
out
.
println
(
incomeRes
.
body
().
asString
());
boolean
data3
=
incomeRes
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data3
,
network
.
message
(
BasicConfig
.
MOBILE_customerUpdate
,
"收入修改失败"
,
incomeRes
.
body
().
asString
()));
Map
<
String
,
Object
>
addressParam
=
new
HashMap
<>();
addressParam
.
put
(
"customerId"
,
customerId
);
addressParam
.
put
(
"key"
,
5
);
...
...
@@ -144,7 +140,6 @@ public class Customer implements Authorization {
System
.
out
.
println
(
addressRes
.
body
().
asString
());
boolean
data4
=
addressRes
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data4
,
network
.
message
(
BasicConfig
.
MOBILE_customerUpdate
,
"所在地址修改失败"
,
addressRes
.
body
().
asString
()));
Map
<
String
,
Object
>
hobbyParam
=
new
HashMap
<>();
hobbyParam
.
put
(
"customerId"
,
customerId
);
hobbyParam
.
put
(
"key"
,
6
);
...
...
@@ -153,7 +148,6 @@ public class Customer implements Authorization {
System
.
out
.
println
(
hobbyRes
.
body
().
asString
());
boolean
data5
=
hobbyRes
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data5
,
network
.
message
(
BasicConfig
.
MOBILE_customerUpdate
,
"爱好修改失败"
,
hobbyRes
.
body
().
asString
()));
Map
<
String
,
Object
>
insuranceParam
=
new
HashMap
<>();
insuranceParam
.
put
(
"customerId"
,
customerId
);
insuranceParam
.
put
(
"key"
,
7
);
...
...
@@ -162,7 +156,6 @@ public class Customer implements Authorization {
System
.
out
.
println
(
insuranceRes
.
body
().
asString
());
boolean
data6
=
insuranceRes
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data6
,
network
.
message
(
BasicConfig
.
MOBILE_customerUpdate
,
"保险意识强弱修改失败"
,
hobbyRes
.
body
().
asString
()));
Map
<
String
,
Object
>
bartenderParam
=
new
HashMap
<>();
bartenderParam
.
put
(
"customerId"
,
customerId
);
bartenderParam
.
put
(
"key"
,
8
);
...
...
src/test/java/com/kjj/cases/live/agent/LiveLater.java
View file @
795fd243
...
...
@@ -62,13 +62,13 @@ public class LiveLater implements Authorization {
Object
data
=
response
.
jsonPath
().
getJsonObject
(
"data"
);
System
.
out
.
println
(
data
);
long
allNum
=
response
.
jsonPath
().
getLong
(
"data.allNum"
);
Assert
.
assertTrue
(
allNum
==
18
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_ClueNum
,
"总的线索数不对"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
allNum
>
10
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_ClueNum
,
"总的线索数不对"
,
response
.
body
().
asString
()));
long
newCustomNum
=
response
.
jsonPath
().
getLong
(
"data.newCustomNum"
);
Assert
.
assertTrue
(
newCustomNum
==
15
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_ClueNum
,
"转介绍线索数不对"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
newCustomNum
>
10
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_ClueNum
,
"转介绍线索数不对"
,
response
.
body
().
asString
()));
long
oldCustomNum
=
response
.
jsonPath
().
getLong
(
"data.oldCustomNum"
);
Assert
.
assertTrue
(
oldCustomNum
==
3
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_ClueNum
,
"直接邀请线索数不对"
,
response
.
body
().
asString
()));
long
awardNum
=
response
.
jsonPath
().
getLong
(
"data.awardNum"
);
Assert
.
assertTrue
(
awardNum
==
7
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_ClueNum
,
"中奖数量不对"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
awardNum
==
8
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_ClueNum
,
"中奖数量不对"
,
response
.
body
().
asString
()));
boolean
showAward
=
response
.
jsonPath
().
getBoolean
(
"data.showAward"
);
Assert
.
assertTrue
(
showAward
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_ClueNum
,
"未展示中奖tab"
,
response
.
body
().
asString
()));
long
submitFormNum
=
response
.
jsonPath
().
getLong
(
"data.submitFormNum"
);
...
...
@@ -303,7 +303,7 @@ public class LiveLater implements Authorization {
Object
data
=
response
.
jsonPath
().
getJsonObject
(
"data"
);
System
.
out
.
println
(
data
);
Integer
clueCount
=
response
.
jsonPath
().
getInt
(
"data.clueCount"
);
Assert
.
assertTrue
(
clueCount
==
18
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_clueNum
,
"线索总数不对"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
clueCount
>
10
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_clueNum
,
"线索总数不对"
,
response
.
body
().
asString
()));
Integer
notFollowedClueCount
=
response
.
jsonPath
().
getInt
(
"data.notFollowedClueCount"
);
Assert
.
assertTrue
(
notFollowedClueCount
>
0
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_clueNum
,
"未跟进线索数不对"
,
response
.
body
().
asString
()));
...
...
src/test/java/com/kjj/cases/live/agent/Reward.java
View file @
795fd243
...
...
@@ -87,7 +87,7 @@ public class Reward implements Authorization {
System
.
out
.
println
(
data
);
Integer
allCount
=
response
.
jsonPath
().
getInt
(
"data.allCount"
);
Assert
.
assertTrue
(
allCount
>
5
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_head
,
"中奖总数"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
allCount
>
0
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_head
,
"中奖总数"
,
response
.
body
().
asString
()));
Integer
signCount
=
response
.
jsonPath
().
getInt
(
"data.signCount"
);
Assert
.
assertTrue
(
signCount
==
0
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_head
,
"签收数量"
,
response
.
body
().
asString
()));
...
...
@@ -228,7 +228,7 @@ public class Reward implements Authorization {
System
.
out
.
println
(
data
);
Integer
allCount
=
response
.
jsonPath
().
getInt
(
"data.allCount"
);
Assert
.
assertTrue
(
allCount
>
5
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_head
,
"中奖总数"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
allCount
>
0
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_head
,
"中奖总数"
,
response
.
body
().
asString
()));
Integer
signCount
=
response
.
jsonPath
().
getInt
(
"data.signCount"
);
Assert
.
assertTrue
(
signCount
==
1
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_head
,
"签收数量"
,
response
.
body
().
asString
()));
...
...
src/test/java/com/kjj/cases/live/flipCard/FlipCard.java
View file @
795fd243
This diff is collapsed.
Click to expand it.
src/test/java/com/kjj/cases/live/liveConfig/SaveLive.java
View file @
795fd243
...
...
@@ -1411,62 +1411,61 @@ public class SaveLive implements Authorization {
* 翻牌集字活动配置
*/
// @Test(description = "保存翻牌配置", priority = 69)
// public void 保存翻牌配置() {
// Map<String, Object> Params = new HashMap<>();
// Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
// Params.put("showAmount", 100);
// Params.put("personalShowAmount",1);
// Params.put("inviteNum",1);
// Params.put("invitePresentNum",1);
// Params.put("amount", 1);
// Params.put("num", 1);
// Response response = network.postResponse(Params, BasicConfig.MANAGER_flipWord);
// boolean data = response.jsonPath().getBoolean("data");
// System.out.println(data);
// Assert.assertTrue(data, network.message(Params, BasicConfig.MANAGER_flipWord, "保存翻牌配置失败", response.body().asString()));
//
// }
//
// @Test(description = "查看直播翻牌配置详情", priority = 70)
// public void 查看直播翻牌配置详情() {
// Map<String, Object> Params = new HashMap<>();
// Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
// Response response = network.getResponse(Params, BasicConfig.MANAGER_wordDetail);
// Object data = response.jsonPath().getJsonObject("data");
// System.out.println(data);
// Assert.assertNotNull(data, network.message(Params, BasicConfig.MANAGER_wordDetail, "查看直播翻牌配置详情失败", response.body().asString()));
//
// }
//
//
// @Test(description = "开启翻牌配置", priority = 71)
// public void 开启翻牌配置() {
// Map<String, Object> Params = new HashMap<>();
// Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
// Params.put("confStatus", 1);
// Response response = network.postResponse(Params, BasicConfig.MANAGER_wordSwitchStatus);
// boolean data = response.jsonPath().getBoolean("data");
// System.out.println(data);
// Assert.assertTrue(data, network.message(Params, BasicConfig.MANAGER_wordSwitchStatus, "开启翻牌配置失败", response.body().asString()));
//
// }
//
// @Test(description = "查看直播配置", priority = 72)
// public void 查看直播配置() {
// Map<String, Object> Params = new HashMap<>();
// Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
// Response response = network.getResponse(Params, BasicConfig.MANAGER_getConfDetail);
// boolean flipWordConfBuildStatus = response.jsonPath().getBoolean("data.flipWordConfBuildStatus");
// System.out.println(flipWordConfBuildStatus);
// Assert.assertTrue(flipWordConfBuildStatus, network.message(Params, BasicConfig.MANAGER_getConfDetail, "未配置翻牌", response.body().asString()));
//
// boolean flipWordConfStatus = response.jsonPath().getBoolean("data.flipWordConfStatus");
// System.out.println(flipWordConfStatus);
// Assert.assertTrue(flipWordConfStatus, network.message(Params, BasicConfig.MANAGER_getConfDetail, "未开启翻牌", response.body().asString()));
//
//
// }
@Test
(
description
=
"保存翻牌配置"
,
priority
=
69
)
public
void
保存翻牌配置
()
{
Map
<
String
,
Object
>
Params
=
new
HashMap
<>();
Params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
LIVE_ID
.
getKey
()));
Params
.
put
(
"amount"
,
1000
);
Params
.
put
(
"helpNum"
,
1
);
Params
.
put
(
"num"
,
1
);
Params
.
put
(
"showAmount"
,
1000
);
Params
.
put
(
"showMaxAmount"
,
1000
);
Response
response
=
network
.
postResponse
(
Params
,
BasicConfig
.
MANAGER_flipWord
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
System
.
out
.
println
(
data
);
Assert
.
assertTrue
(
data
,
network
.
message
(
Params
,
BasicConfig
.
MANAGER_flipWord
,
"保存翻牌配置失败"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"查看直播翻牌配置详情"
,
priority
=
70
)
public
void
查看直播翻牌配置详情
()
{
Map
<
String
,
Object
>
Params
=
new
HashMap
<>();
Params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
LIVE_ID
.
getKey
()));
Response
response
=
network
.
getResponse
(
Params
,
BasicConfig
.
MANAGER_wordDetail
);
Object
data
=
response
.
jsonPath
().
getJsonObject
(
"data"
);
System
.
out
.
println
(
data
);
Assert
.
assertNotNull
(
data
,
network
.
message
(
Params
,
BasicConfig
.
MANAGER_wordDetail
,
"查看直播翻牌配置详情失败"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"开启翻牌配置"
,
priority
=
71
)
public
void
开启翻牌配置
()
{
Map
<
String
,
Object
>
Params
=
new
HashMap
<>();
Params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
LIVE_ID
.
getKey
()));
Params
.
put
(
"confStatus"
,
2
);
Response
response
=
network
.
postResponse
(
Params
,
BasicConfig
.
MANAGER_wordSwitchStatus
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
System
.
out
.
println
(
data
);
Assert
.
assertTrue
(
data
,
network
.
message
(
Params
,
BasicConfig
.
MANAGER_wordSwitchStatus
,
"开启翻牌配置失败"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"查看直播配置"
,
priority
=
72
)
public
void
查看直播配置
()
{
Map
<
String
,
Object
>
Params
=
new
HashMap
<>();
Params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
LIVE_ID
.
getKey
()));
Response
response
=
network
.
getResponse
(
Params
,
BasicConfig
.
MANAGER_getConfDetail
);
boolean
flipWordConfBuildStatus
=
response
.
jsonPath
().
getBoolean
(
"data.flipWordConfBuildStatus"
);
System
.
out
.
println
(
flipWordConfBuildStatus
);
Assert
.
assertTrue
(
flipWordConfBuildStatus
,
network
.
message
(
Params
,
BasicConfig
.
MANAGER_getConfDetail
,
"未配置翻牌"
,
response
.
body
().
asString
()));
boolean
flipWordConfStatus
=
response
.
jsonPath
().
getBoolean
(
"data.flipWordConfStatus"
);
System
.
out
.
println
(
flipWordConfStatus
);
Assert
.
assertTrue
(
flipWordConfStatus
,
network
.
message
(
Params
,
BasicConfig
.
MANAGER_getConfDetail
,
"未开启翻牌"
,
response
.
body
().
asString
()));
}
/**
* 直播中过渡视频
...
...
src/test/java/com/kjj/cases/live/liveConfig/WinningRules.java
View file @
795fd243
...
...
@@ -46,7 +46,7 @@ public class WinningRules implements Authorization {
public
void
上传企业指定中奖名单
()
{
Map
<
String
,
Object
>
Params
=
new
HashMap
<>();
Params
.
put
(
"confId"
,
confIdList
.
get
(
2
).
getConfId
());
Params
.
put
(
"excelUrl"
,
"https://yun.dui88.com/kjy/media/file/20210
420/51716f59605424332f50a26f0a5d531f
.xlsx"
);
Params
.
put
(
"excelUrl"
,
"https://yun.dui88.com/kjy/media/file/20210
719/05af7f67cafeda53930c1f12a46daa6a
.xlsx"
);
Params
.
put
(
"fileName"
,
"指定中奖名单"
);
Response
response
=
network
.
postResponse
(
Params
,
BasicConfig
.
MANAGER_import
);
taskId
=
response
.
jsonPath
().
getInt
(
"data"
);
...
...
@@ -85,7 +85,7 @@ public class WinningRules implements Authorization {
public
void
上传新的企业指定中奖名单
()
{
Map
<
String
,
Object
>
Params
=
new
HashMap
<>();
Params
.
put
(
"confId"
,
confIdList
.
get
(
2
).
getConfId
());
Params
.
put
(
"excelUrl"
,
"https://yun.dui88.com/kjy/media/file/20210
421/14cfc6260713bc97e7cd6a9b27b0e763
.xlsx"
);
Params
.
put
(
"excelUrl"
,
"https://yun.dui88.com/kjy/media/file/20210
719/05af7f67cafeda53930c1f12a46daa6a
.xlsx"
);
Params
.
put
(
"fileName"
,
"指定中奖名单"
);
Response
response
=
network
.
postResponse
(
Params
,
BasicConfig
.
MANAGER_import
);
taskId
=
response
.
jsonPath
().
getInt
(
"data"
);
...
...
src/test/java/com/kjj/cases/live/lottery/Lottery.java
View file @
795fd243
This diff is collapsed.
Click to expand it.
src/test/java/com/kjj/config/BasicConfig.java
View file @
795fd243
...
...
@@ -65,9 +65,9 @@ public class BasicConfig {
//***********************************************************************
// 基础线代理人 TKU,sid:2991
public
static
String
AGENT_TKU
=
"T3gM31f18jCFEcfTyJdjfJAfSjDmKNMHfH7CvpLDC6UC
Qd8X84RJEiiPHRHPqbrJYL3KL7tLsZEM5LjN4z
"
;
public
static
String
AGENT_TKU
=
"T3gM31f18jCFEcfTyJdjfJAfSjDmKNMHfH7CvpLDC6UC
Lbai6Pc41VyJK3bXHe1wg7Hb5FGFZheeLvHjbE
"
;
// 基础线访客 TKU
public
static
String
VISITOR_TKU
=
"T3gM31f18jCGvqvoyJRzyMTdpcPDJWUJJP4VQje7p9sf
HcRNmyhTEzEbfmwrGFy5doVEinb1k3SVwreYQE
"
;
public
static
String
VISITOR_TKU
=
"T3gM31f18jCGvqvoyJRzyMTdpcPDJWUJJP4VQje7p9sf
C4HKmj5NJfCUkxusAyFb5SpkWS31srDTYr6KtV
"
;
// 访客的sids
public
static
final
String
sids
=
"Kj21MjMwNTU"
;
// 访客的userId(固定)
...
...
src/test/liveTestNG.xml
View file @
795fd243
...
...
@@ -57,7 +57,7 @@
</classes>
</test>
<!-- <test preserve-order="false" name="翻牌红包">-->
<!-- <test preserve-order="false" name="翻牌
集字
红包">-->
<!-- <classes>-->
<!-- <class name="com.kjj.cases.live.flipCard.FlipCard"/>-->
<!-- </classes>-->
...
...
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