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
2801f097
Commit
2801f097
authored
Oct 13, 2021
by
龚小红
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
合并绑定关系
parent
42f1df2e
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
239 additions
and
272 deletions
+239
-272
LiveGuess.java
src/test/java/com/kjj/cases/live/guess/LiveGuess.java
+0
-1
LiveBinding.java
src/test/java/com/kjj/cases/live/liveConfig/LiveBinding.java
+197
-66
Lottery.java
src/test/java/com/kjj/cases/live/lottery/Lottery.java
+0
-130
SecondKill.java
src/test/java/com/kjj/cases/live/secondKill/SecondKill.java
+1
-1
Treasure.java
src/test/java/com/kjj/cases/live/treasure/Treasure.java
+0
-39
liveTestNG.xml
src/test/liveTestNG.xml
+41
-35
No files found.
src/test/java/com/kjj/cases/live/guess/LiveGuess.java
View file @
2801f097
...
...
@@ -145,7 +145,6 @@ public class LiveGuess implements Authorization {
userDetailParam
.
put
(
"confId"
,
ConfId
);
Response
response
=
network
.
postResponse
(
userDetailParam
,
BasicConfig
.
MOBILE_guess
);
HashMap
data
=
response
.
jsonPath
().
getJsonObject
(
"data"
);
System
.
out
.
println
(
data
);
Assert
.
assertNotNull
(
data
,
network
.
message
(
userDetailParam
,
BasicConfig
.
MOBILE_guess
,
"访客H第1次参与猜数字红包失败"
,
response
.
body
().
asString
()));
this
.
guessMaxNum
=(
Integer
)
data
.
get
(
"guessMaxNum"
);
this
.
guessMinNum
=
(
Integer
)
data
.
get
(
"guessMinNum"
);
...
...
src/test/java/com/kjj/cases/live/liveConfig/LiveBinding.java
View file @
2801f097
This diff is collapsed.
Click to expand it.
src/test/java/com/kjj/cases/live/lottery/Lottery.java
View file @
2801f097
...
...
@@ -282,33 +282,6 @@ public class Lottery implements Authorization {
this
.
shareSign
=
data
;
System
.
out
.
println
(
shareSign
);
Assert
.
assertNotNull
(
shareSign
,
network
.
message
(
signParam
,
BasicConfig
.
MOBILE_sign
,
"分享失败"
,
signRes
.
body
().
asString
()));
}
@Test
(
description
=
"邀请C关系绑定"
,
priority
=
20
)
public
void
邀请
C
关系绑定
()
{
visitorAuth3
();
Map
<
String
,
Object
>
bindingParam
=
new
HashMap
<>();
bindingParam
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
bindingParam
.
put
(
"shareSign"
,
shareSign
);
Response
bindingRes
=
network
.
postResponse
(
bindingParam
,
BasicConfig
.
MOBILE_binding
);
boolean
success
=
bindingRes
.
jsonPath
().
getJsonObject
(
"success"
);
System
.
out
.
println
(
success
);
Assert
.
assertTrue
(
success
,
network
.
message
(
bindingParam
,
BasicConfig
.
MOBILE_binding
,
"绑定失败"
,
bindingRes
.
body
().
asString
()));
}
@Test
(
description
=
"邀请C绑定结果和绑定凭证"
,
priority
=
22
)
public
void
邀请
C
绑定结果和绑定凭证
()
{
visitorAuth3
();
ThreadSleepUtils
.
sleep
(
2000
);
Map
<
String
,
Object
>
tokenParam
=
new
HashMap
<>();
tokenParam
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
Response
tokenRes
=
network
.
getResponse
(
tokenParam
,
BasicConfig
.
MOBILE_Token
);
Integer
type
=
tokenRes
.
jsonPath
().
getInt
(
"data.type"
);
System
.
out
.
println
(
type
);
Assert
.
assertTrue
(
type
==
3
,
network
.
message
(
tokenParam
,
BasicConfig
.
MOBILE_Token
,
"未获取到绑定结果"
,
tokenRes
.
body
().
asString
()));
}
...
...
@@ -510,32 +483,6 @@ public class Lottery implements Authorization {
}
@Test
(
description
=
"幸运任务邀请D关系绑定"
,
priority
=
36
)
public
void
幸运任务邀请
D
关系绑定
()
{
visitorAuth4
();
Map
<
String
,
Object
>
bindingParam
=
new
HashMap
<>();
bindingParam
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
bindingParam
.
put
(
"shareSign"
,
shareSign
);
Response
bindingRes
=
network
.
postResponse
(
bindingParam
,
BasicConfig
.
MOBILE_binding
);
boolean
success
=
bindingRes
.
jsonPath
().
getJsonObject
(
"success"
);
System
.
out
.
println
(
success
);
Assert
.
assertTrue
(
success
,
network
.
message
(
bindingParam
,
BasicConfig
.
MOBILE_binding
,
"绑定失败"
,
bindingRes
.
body
().
asString
()));
}
@Test
(
description
=
"幸运任务邀请D绑定结果和绑定凭证"
,
priority
=
37
)
public
void
幸运任务邀请
D
绑定结果和绑定凭证
()
{
visitorAuth4
();
ThreadSleepUtils
.
sleep
(
2000
);
Map
<
String
,
Object
>
tokenParam
=
new
HashMap
<>();
tokenParam
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
Response
tokenRes
=
network
.
getResponse
(
tokenParam
,
BasicConfig
.
MOBILE_Token
);
Integer
type
=
tokenRes
.
jsonPath
().
getInt
(
"data.type"
);
System
.
out
.
println
(
type
);
Assert
.
assertTrue
(
type
==
3
,
network
.
message
(
tokenParam
,
BasicConfig
.
MOBILE_Token
,
"未获取到绑定结果"
,
tokenRes
.
body
().
asString
()));
}
@Test
(
description
=
"访客D给访客B助力"
,
priority
=
38
)
public
void
访客
D
给访客
B
助力
()
{
visitorAuth4
();
...
...
@@ -594,32 +541,6 @@ public class Lottery implements Authorization {
Assert
.
assertNotNull
(
data
,
network
.
message
(
myCountParam
,
BasicConfig
.
USER_myCount
,
"获取抽奖码数量失败"
,
myCountRes
.
body
().
asString
()));
}
@Test
(
description
=
"幸运任务邀请E关系绑定"
,
priority
=
42
)
public
void
幸运任务邀请
E
关系绑定
()
{
visitorAuth5
();
Map
<
String
,
Object
>
bindingParam
=
new
HashMap
<>();
bindingParam
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
bindingParam
.
put
(
"shareSign"
,
shareSign
);
Response
bindingRes
=
network
.
postResponse
(
bindingParam
,
BasicConfig
.
MOBILE_binding
);
boolean
success
=
bindingRes
.
jsonPath
().
getJsonObject
(
"success"
);
System
.
out
.
println
(
success
);
Assert
.
assertTrue
(
success
,
network
.
message
(
bindingParam
,
BasicConfig
.
MOBILE_binding
,
"绑定失败"
,
bindingRes
.
body
().
asString
()));
}
@Test
(
description
=
"幸运任务邀请E绑定结果和绑定凭证"
,
priority
=
43
)
public
void
幸运任务邀请
E
绑定结果和绑定凭证
()
{
visitorAuth5
();
ThreadSleepUtils
.
sleep
(
2000
);
Map
<
String
,
Object
>
tokenParam
=
new
HashMap
<>();
tokenParam
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
Response
tokenRes
=
network
.
getResponse
(
tokenParam
,
BasicConfig
.
MOBILE_Token
);
Integer
type
=
tokenRes
.
jsonPath
().
getInt
(
"data.type"
);
System
.
out
.
println
(
type
);
Assert
.
assertTrue
(
type
==
3
,
network
.
message
(
tokenParam
,
BasicConfig
.
MOBILE_Token
,
"未获取到绑定结果"
,
tokenRes
.
body
().
asString
()));
}
@Test
(
description
=
"访客E给访客B助力"
,
priority
=
44
)
public
void
访客
E
给访客
B
助力
()
{
visitorAuth5
();
...
...
@@ -670,31 +591,6 @@ public class Lottery implements Authorization {
}
@Test
(
description
=
"幸运任务邀请F关系绑定"
,
priority
=
48
)
public
void
幸运任务邀请
F
关系绑定
()
{
visitorAuth6
();
Map
<
String
,
Object
>
bindingParam
=
new
HashMap
<>();
bindingParam
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
bindingParam
.
put
(
"shareSign"
,
shareSign
);
Response
bindingRes
=
network
.
postResponse
(
bindingParam
,
BasicConfig
.
MOBILE_binding
);
boolean
success
=
bindingRes
.
jsonPath
().
getJsonObject
(
"success"
);
System
.
out
.
println
(
success
);
Assert
.
assertTrue
(
success
,
network
.
message
(
bindingParam
,
BasicConfig
.
MOBILE_binding
,
"绑定失败"
,
bindingRes
.
body
().
asString
()));
}
@Test
(
description
=
"幸运任务邀请F绑定结果和绑定凭证"
,
priority
=
49
)
public
void
幸运任务邀请
F
绑定结果和绑定凭证
()
{
visitorAuth6
();
ThreadSleepUtils
.
sleep
(
2000
);
Map
<
String
,
Object
>
tokenParam
=
new
HashMap
<>();
tokenParam
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
Response
tokenRes
=
network
.
getResponse
(
tokenParam
,
BasicConfig
.
MOBILE_Token
);
Integer
type
=
tokenRes
.
jsonPath
().
getInt
(
"data.type"
);
System
.
out
.
println
(
type
);
Assert
.
assertTrue
(
type
==
3
,
network
.
message
(
tokenParam
,
BasicConfig
.
MOBILE_Token
,
"未获取到绑定结果"
,
tokenRes
.
body
().
asString
()));
}
@Test
(
description
=
"访客F给访客B助力"
,
priority
=
50
)
public
void
访客
F
给访客
B
助力
()
{
visitorAuth6
();
...
...
@@ -753,32 +649,6 @@ public class Lottery implements Authorization {
}
@Test
(
description
=
"幸运任务邀请G关系绑定"
,
priority
=
54
)
public
void
幸运任务邀请
G
关系绑定
()
{
visitorAuth7
();
Map
<
String
,
Object
>
bindingParam
=
new
HashMap
<>();
bindingParam
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
bindingParam
.
put
(
"shareSign"
,
shareSign
);
Response
bindingRes
=
network
.
postResponse
(
bindingParam
,
BasicConfig
.
MOBILE_binding
);
boolean
success
=
bindingRes
.
jsonPath
().
getJsonObject
(
"success"
);
System
.
out
.
println
(
success
);
Assert
.
assertTrue
(
success
,
network
.
message
(
bindingParam
,
BasicConfig
.
MOBILE_binding
,
"绑定失败"
,
bindingRes
.
body
().
asString
()));
}
@Test
(
description
=
"幸运任务邀请G绑定结果和绑定凭证"
,
priority
=
55
)
public
void
幸运任务邀请
G
绑定结果和绑定凭证
()
{
visitorAuth7
();
ThreadSleepUtils
.
sleep
(
2000
);
Map
<
String
,
Object
>
tokenParam
=
new
HashMap
<>();
tokenParam
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
Response
tokenRes
=
network
.
getResponse
(
tokenParam
,
BasicConfig
.
MOBILE_Token
);
Integer
type
=
tokenRes
.
jsonPath
().
getInt
(
"data.type"
);
System
.
out
.
println
(
type
);
Assert
.
assertTrue
(
type
==
3
,
network
.
message
(
tokenParam
,
BasicConfig
.
MOBILE_Token
,
"未获取到绑定结果"
,
tokenRes
.
body
().
asString
()));
}
@Test
(
description
=
"访客G给访客B助力"
,
priority
=
56
)
public
void
访客
G
给访客
B
助力
()
{
visitorAuth7
();
...
...
src/test/java/com/kjj/cases/live/secondKill/SecondKill.java
View file @
2801f097
...
...
@@ -203,7 +203,7 @@ public class SecondKill implements Authorization {
@Test
(
description
=
"查看当前秒杀商品"
,
priority
=
11
)
public
void
查看当前秒杀商品
()
{
visitorAuth
();
sleep
(
3
000
);
sleep
(
10
000
);
Map
<
String
,
Object
>
goodsFirstPar
=
new
HashMap
<>();
goodsFirstPar
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
Response
goodsFirstRes
=
network
.
getResponse
(
goodsFirstPar
,
BasicConfig
.
MOBILE_secondKill_goodsFirst
);
...
...
src/test/java/com/kjj/cases/live/treasure/Treasure.java
View file @
2801f097
...
...
@@ -852,31 +852,6 @@ public class Treasure implements Authorization {
this
.
shareSign
=
data
;
System
.
out
.
println
(
shareSign
);
Assert
.
assertNotNull
(
shareSign
,
network
.
message
(
signParam
,
BasicConfig
.
MOBILE_sign
,
"分享失败"
,
signRes
.
body
().
asString
()));
}
@Test
(
description
=
"访客N与访客O邀请关系绑定"
,
priority
=
69
)
public
void
访客
N
与访客
O
邀请关系绑定
()
{
visitorAuth15
();
Map
<
String
,
Object
>
bindingParam
=
new
HashMap
<>();
bindingParam
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
bindingParam
.
put
(
"shareSign"
,
shareSign
);
Response
bindingRes
=
network
.
postResponse
(
bindingParam
,
BasicConfig
.
MOBILE_binding
);
boolean
success
=
bindingRes
.
jsonPath
().
getJsonObject
(
"success"
);
System
.
out
.
println
(
success
);
Assert
.
assertTrue
(
success
,
network
.
message
(
bindingParam
,
BasicConfig
.
MOBILE_binding
,
"绑定失败"
,
bindingRes
.
body
().
asString
()));
}
@Test
(
description
=
"访客O获取绑定结果和绑定凭证"
,
priority
=
70
)
public
void
访客
O
获取绑定结果和绑定凭证
()
{
visitorAuth15
();
ThreadSleepUtils
.
sleep
(
2000
);
Map
<
String
,
Object
>
tokenParam
=
new
HashMap
<>();
tokenParam
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
Response
tokenRes
=
network
.
getResponse
(
tokenParam
,
BasicConfig
.
MOBILE_Token
);
Integer
type
=
tokenRes
.
jsonPath
().
getInt
(
"data.type"
);
System
.
out
.
println
(
type
);
Assert
.
assertTrue
(
type
==
3
,
network
.
message
(
tokenParam
,
BasicConfig
.
MOBILE_Token
,
"未获取到绑定结果"
,
tokenRes
.
body
().
asString
()));
}
@Test
(
description
=
"访客O给访客N助力"
,
priority
=
71
)
...
...
@@ -991,18 +966,4 @@ public class Treasure implements Authorization {
Assert
.
assertTrue
(
dataList
.
size
()==
6
,
network
.
message
(
openParam
,
BasicConfig
.
MANAGER_participateList
,
"查询领取列表失败"
,
response
.
body
().
asString
()));
}
/**
* 添加代理人绑定关系
*/
@Test
(
description
=
"代理人绑定"
,
priority
=
77
)
public
void
代理人绑定
()
{
agentAuth
();
Map
<
String
,
Object
>
bindingParam
=
new
HashMap
<>();
bindingParam
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
Response
bindingRes
=
network
.
postResponse
(
bindingParam
,
BasicConfig
.
MOBILE_binding
);
boolean
success
=
bindingRes
.
jsonPath
().
getJsonObject
(
"success"
);
System
.
out
.
println
(
success
);
Assert
.
assertTrue
(
success
,
network
.
message
(
bindingParam
,
BasicConfig
.
MOBILE_binding
,
"绑定失败"
,
bindingRes
.
body
().
asString
()));
}
}
src/test/liveTestNG.xml
View file @
2801f097
...
...
@@ -24,17 +24,23 @@
<!-- </classes>-->
<!-- </test>-->
<!-- <test preserve-order="true" name="创建直播">--
>
<!-- <classes>--
>
<!-- <class name="com.kjj.cases.live.liveConfig.SaveLive"/>--
>
<!-- </classes>--
>
<!-- </test>--
>
<test
preserve-order=
"true"
name=
"创建直播"
>
<classes
>
<class
name=
"com.kjj.cases.live.liveConfig.SaveLive"
/
>
</classes
>
</test
>
<!-- <test preserve-order="true" name="配置秒杀轮次及秒杀预告">-->
<!-- <classes>-->
<!-- <class name="com.kjj.cases.live.secondKill.ConfSecondKill"/>-->
<!-- </classes>-->
<!-- </test>-->
<test
preserve-order=
"true"
name=
"配置秒杀轮次及秒杀预告"
>
<classes>
<class
name=
"com.kjj.cases.live.secondKill.ConfSecondKill"
/>
</classes>
</test>
<test
preserve-order=
"true"
name=
"绑定关系绑定"
>
<classes>
<class
name=
"com.kjj.cases.live.liveConfig.LiveBinding"
/>
</classes>
</test>
<!-- <test preserve-order="true" name="配置代理人邀约奖励">-->
<!-- <classes>-->
<!-- <class name="com.kjj.cases.live.inviteReward.ManagerRewardConf"/>-->
...
...
@@ -115,11 +121,11 @@
<!-- </classes>-->
<!-- </test>-->
<!-- <test preserve-order="true" name="助播-开启直播">--
>
<!-- <classes>--
>
<!-- <class name="com.kjj.cases.live.anchor.OpenLive"/>--
>
<!-- </classes>--
>
<!-- </test>--
>
<test
preserve-order=
"true"
name=
"助播-开启直播"
>
<classes
>
<class
name=
"com.kjj.cases.live.anchor.OpenLive"
/
>
</classes
>
</test
>
<!-- <test preserve-order="true" name="评论及回复">-->
<!-- <classes>-->
...
...
@@ -143,17 +149,17 @@
<!-- <class name="com.kjj.cases.live.lottery.Lottery"/>-->
<!-- </classes>-->
<!-- </test>-->
<!-- <test preserve-order="true" name="秒杀互动">--
>
<!-- <classes>--
>
<!-- <class name="com.kjj.cases.live.secondKill.SecondKill"/>--
>
<!-- </classes>--
>
<!-- </test>--
>
<test
preserve-order=
"true"
name=
"秒杀互动"
>
<classes
>
<class
name=
"com.kjj.cases.live.secondKill.SecondKill"
/
>
</classes
>
</test
>
<!-- <test preserve-order="true" name="猜数字红包">--
>
<!-- <classes>--
>
<!-- <class name="com.kjj.cases.live.guess.LiveGuess"/>--
>
<!-- </classes>--
>
<!-- </test>--
>
<test
preserve-order=
"true"
name=
"猜数字红包"
>
<classes
>
<class
name=
"com.kjj.cases.live.guess.LiveGuess"
/
>
</classes
>
</test
>
<!-- <test preserve-order="true" name="看直播攒现金">-->
<!-- <classes>-->
...
...
@@ -184,11 +190,11 @@
<!-- </classes>-->
<!-- </test>-->
<!-- <test preserve-order="true" name="有奖答题">--
>
<!-- <classes>--
>
<!-- <class name="com.kjj.cases.live.answer.Answer"/>--
>
<!-- </classes>--
>
<!-- </test>--
>
<test
preserve-order=
"true"
name=
"有奖答题"
>
<classes
>
<class
name=
"com.kjj.cases.live.answer.Answer"
/
>
</classes
>
</test
>
<!-- <test preserve-order="true" name="投票">-->
<!-- <classes>-->
...
...
@@ -261,11 +267,11 @@
<!-- <class name="com.kjj.cases.live.customer.PersonalPage" />-->
<!-- </classes>-->
<!-- </test>-->
<test
preserve-order=
"true"
name=
"创建简易直播"
>
<classes
>
<class
name=
"com.kjj.cases.live.liveConfig.SimpleLiveConfig"
/
>
</classes
>
</test
>
<!-- <test preserve-order="true" name="创建简易直播">--
>
<!-- <classes>--
>
<!-- <class name="com.kjj.cases.live.liveConfig.SimpleLiveConfig" />--
>
<!-- </classes>--
>
<!-- </test>--
>
<test
preserve-order=
"true"
name=
"砸金蛋"
>
<classes>
<class
name=
"com.kjj.cases.live.treasure.GoldenEgg"
/>
...
...
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