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
44681908
Commit
44681908
authored
Mar 22, 2021
by
别湘灵
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
4709658c
7758492b
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
75 additions
and
39 deletions
+75
-39
SellerCard.java
src/test/java/com/kjj/cases/basics/SellerCard.java
+1
-1
SaveAndUpdate.java
src/test/java/com/kjj/cases/live/SaveAndUpdate.java
+57
-27
BasicConfig.java
src/test/java/com/kjj/config/BasicConfig.java
+6
-0
testNG.xml
src/test/testNG.xml
+1
-1
wechatTestNG.xml
src/test/wechatTestNG.xml
+10
-10
No files found.
src/test/java/com/kjj/cases/basics/SellerCard.java
View file @
44681908
...
@@ -101,7 +101,7 @@ public class SellerCard {
...
@@ -101,7 +101,7 @@ public class SellerCard {
params
.
put
(
"scid"
,
scid
);
params
.
put
(
"scid"
,
scid
);
Response
response
=
network
.
getResponse
(
params
,
SELLERCARD_PERSONALPROFILE
);
Response
response
=
network
.
getResponse
(
params
,
SELLERCARD_PERSONALPROFILE
);
int
exprLength
=
response
.
jsonPath
().
getInt
(
"data.exprLength"
);
//工作年限
int
exprLength
=
response
.
jsonPath
().
getInt
(
"data.exprLength"
);
//工作年限
Assert
.
assertEquals
(
exprLength
,
0
,
network
.
message
(
params
,
SELLERCARD_PERSONALPROFILE
,
"个人介绍-获取工作年限不匹配"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
exprLength
,
2
,
network
.
message
(
params
,
SELLERCARD_PERSONALPROFILE
,
"个人介绍-获取工作年限不匹配"
,
response
.
body
().
asString
()));
//修改工作年限和个人介绍
//修改工作年限和个人介绍
...
...
src/test/java/com/kjj/cases/live/SaveAndUpdate.java
View file @
44681908
...
@@ -148,20 +148,8 @@ public class SaveAndUpdate implements AdminAuthorization {
...
@@ -148,20 +148,8 @@ public class SaveAndUpdate implements AdminAuthorization {
Assert
.
assertTrue
(
data5
,
network
.
message
(
saveOrUpdate4Param
,
BasicConfig
.
MANAGER_SAVEORUPDATE4
,
"问卷配置失败"
,
saveOrUpdate4Res
.
body
().
asString
()));
Assert
.
assertTrue
(
data5
,
network
.
message
(
saveOrUpdate4Param
,
BasicConfig
.
MANAGER_SAVEORUPDATE4
,
"问卷配置失败"
,
saveOrUpdate4Res
.
body
().
asString
()));
}
}
@Test
(
description
=
"代理人参与条件"
,
priority
=
9
)
public
void
代理人参与条件
()
{
Map
<
String
,
Object
>
saveAgentParticipateParam
=
new
HashMap
<>();
@Test
(
description
=
"指定中奖奖品"
,
priority
=
9
)
saveAgentParticipateParam
.
put
(
"liveId"
,
liveID
);
saveAgentParticipateParam
.
put
(
"inviteCount"
,
1
);
Response
saveAgentParticipateParamRes
=
network
.
postResponse
(
saveAgentParticipateParam
,
BasicConfig
.
MANAGER_SAVEAGENTPARTICIPATE
);
boolean
data6
=
saveAgentParticipateParamRes
.
jsonPath
().
getBoolean
(
"data"
);
System
.
out
.
println
(
data6
);
Assert
.
assertTrue
(
data6
,
network
.
message
(
saveAgentParticipateParam
,
BasicConfig
.
MANAGER_SAVEAGENTPARTICIPATE
,
"代理人参与条件配置失败"
,
saveAgentParticipateParamRes
.
body
().
asString
()));
}
@Test
(
description
=
"指定中奖奖品"
,
priority
=
10
)
public
void
指定中奖奖品
()
{
public
void
指定中奖奖品
()
{
Map
<
String
,
Object
>
saveSpecifyAwardParam
=
new
HashMap
<>();
Map
<
String
,
Object
>
saveSpecifyAwardParam
=
new
HashMap
<>();
saveSpecifyAwardParam
.
put
(
"Id"
,
""
);
saveSpecifyAwardParam
.
put
(
"Id"
,
""
);
...
@@ -169,6 +157,9 @@ public class SaveAndUpdate implements AdminAuthorization {
...
@@ -169,6 +157,9 @@ public class SaveAndUpdate implements AdminAuthorization {
saveSpecifyAwardParam
.
put
(
"specifyAwardType"
,
1
);
//1:统一采购,2:自行准备
saveSpecifyAwardParam
.
put
(
"specifyAwardType"
,
1
);
//1:统一采购,2:自行准备
saveSpecifyAwardParam
.
put
(
"totalCount"
,
5
);
saveSpecifyAwardParam
.
put
(
"totalCount"
,
5
);
saveSpecifyAwardParam
.
put
(
"unitPrice"
,
2990
);
saveSpecifyAwardParam
.
put
(
"unitPrice"
,
2990
);
saveSpecifyAwardParam
.
put
(
"maxCanSpecifyCount"
,
0
);
saveSpecifyAwardParam
.
put
(
"privilegeScope"
,
1
);
saveSpecifyAwardParam
.
put
(
"inviteCount"
,
1
);
saveSpecifyAwardParam
.
put
(
"welfareConfId"
,
192
);
saveSpecifyAwardParam
.
put
(
"welfareConfId"
,
192
);
Response
saveSpecifyAwardRes
=
network
.
postResponse
(
saveSpecifyAwardParam
,
BasicConfig
.
MANAGER_SAVESPECIFYAWARD
);
Response
saveSpecifyAwardRes
=
network
.
postResponse
(
saveSpecifyAwardParam
,
BasicConfig
.
MANAGER_SAVESPECIFYAWARD
);
...
@@ -177,7 +168,7 @@ public class SaveAndUpdate implements AdminAuthorization {
...
@@ -177,7 +168,7 @@ public class SaveAndUpdate implements AdminAuthorization {
Assert
.
assertTrue
(
data7
,
network
.
message
(
saveSpecifyAwardParam
,
BasicConfig
.
MANAGER_SAVESPECIFYAWARD
,
"指定中奖配置失败"
,
saveSpecifyAwardRes
.
body
().
asString
()));
Assert
.
assertTrue
(
data7
,
network
.
message
(
saveSpecifyAwardParam
,
BasicConfig
.
MANAGER_SAVESPECIFYAWARD
,
"指定中奖配置失败"
,
saveSpecifyAwardRes
.
body
().
asString
()));
}
}
@Test
(
description
=
"个人PK奖励"
,
priority
=
1
1
)
@Test
(
description
=
"个人PK奖励"
,
priority
=
1
0
)
public
void
个人
PK
奖励
()
{
public
void
个人
PK
奖励
()
{
Map
<
String
,
Object
>
saveOrUpdate5Param
=
new
HashMap
<>();
Map
<
String
,
Object
>
saveOrUpdate5Param
=
new
HashMap
<>();
saveOrUpdate5Param
.
put
(
"liveId"
,
liveID
);
saveOrUpdate5Param
.
put
(
"liveId"
,
liveID
);
...
@@ -185,9 +176,9 @@ public class SaveAndUpdate implements AdminAuthorization {
...
@@ -185,9 +176,9 @@ public class SaveAndUpdate implements AdminAuthorization {
List
<
RewardPkBean
>
rewardPks
=
new
ArrayList
<>();
// []
List
<
RewardPkBean
>
rewardPks
=
new
ArrayList
<>();
// []
RewardPkBean
rewardPk
=
new
RewardPkBean
();
// {}
RewardPkBean
rewardPk
=
new
RewardPkBean
();
// {}
rewardPk
.
setPrizeName
(
"1"
);
// {id:1}
rewardPk
.
setPrizeName
(
"1"
);
rewardPk
.
setRanking
(
1
);
// {id:1,ss:"rew"}
rewardPk
.
setRanking
(
1
);
rewardPks
.
add
(
rewardPk
);
// [{id:1,ss:"rew"}]
rewardPks
.
add
(
rewardPk
);
RewardPkBean
rewardPk1
=
new
RewardPkBean
();
RewardPkBean
rewardPk1
=
new
RewardPkBean
();
rewardPk1
.
setPrizeName
(
"2"
);
rewardPk1
.
setPrizeName
(
"2"
);
...
@@ -207,7 +198,7 @@ public class SaveAndUpdate implements AdminAuthorization {
...
@@ -207,7 +198,7 @@ public class SaveAndUpdate implements AdminAuthorization {
}
}
@Test
(
description
=
"团队PK奖励"
,
priority
=
1
2
)
@Test
(
description
=
"团队PK奖励"
,
priority
=
1
1
)
public
void
团队
PK
奖励
()
{
public
void
团队
PK
奖励
()
{
Map
<
String
,
Object
>
saveOrUpdate6Param
=
new
HashMap
<>();
Map
<
String
,
Object
>
saveOrUpdate6Param
=
new
HashMap
<>();
...
@@ -239,7 +230,7 @@ public class SaveAndUpdate implements AdminAuthorization {
...
@@ -239,7 +230,7 @@ public class SaveAndUpdate implements AdminAuthorization {
}
}
@Test
(
description
=
"获取剩余红包金额"
,
priority
=
1
3
)
@Test
(
description
=
"获取剩余红包金额"
,
priority
=
1
2
)
public
void
获取剩余红包金额
()
{
public
void
获取剩余红包金额
()
{
Map
<
String
,
Object
>
getSurplusAmountParam
=
new
HashMap
<>();
Map
<
String
,
Object
>
getSurplusAmountParam
=
new
HashMap
<>();
getSurplusAmountParam
.
put
(
"liveId"
,
liveID
);
getSurplusAmountParam
.
put
(
"liveId"
,
liveID
);
...
@@ -252,7 +243,7 @@ public class SaveAndUpdate implements AdminAuthorization {
...
@@ -252,7 +243,7 @@ public class SaveAndUpdate implements AdminAuthorization {
}
}
//添加红包配置
//添加红包配置
@Test
(
description
=
"新增红包配置"
,
priority
=
1
4
)
@Test
(
description
=
"新增红包配置"
,
priority
=
1
3
)
public
void
新增红包配置
()
{
public
void
新增红包配置
()
{
Map
<
String
,
Object
>
saveOrUpdateRedParam
=
new
HashMap
<>();
Map
<
String
,
Object
>
saveOrUpdateRedParam
=
new
HashMap
<>();
saveOrUpdateRedParam
.
put
(
"liveId"
,
liveID
);
saveOrUpdateRedParam
.
put
(
"liveId"
,
liveID
);
...
@@ -270,7 +261,7 @@ public class SaveAndUpdate implements AdminAuthorization {
...
@@ -270,7 +261,7 @@ public class SaveAndUpdate implements AdminAuthorization {
}
}
//答题红包配置
//答题红包配置
@Test
(
description
=
"新增答题红包"
,
priority
=
1
5
)
@Test
(
description
=
"新增答题红包"
,
priority
=
1
4
)
public
void
新增答题红包
()
{
public
void
新增答题红包
()
{
Map
<
String
,
Object
>
saveOrUpdate9Param
=
new
HashMap
<>();
Map
<
String
,
Object
>
saveOrUpdate9Param
=
new
HashMap
<>();
saveOrUpdate9Param
.
put
(
"liveId"
,
liveID
);
saveOrUpdate9Param
.
put
(
"liveId"
,
liveID
);
...
@@ -302,7 +293,7 @@ public class SaveAndUpdate implements AdminAuthorization {
...
@@ -302,7 +293,7 @@ public class SaveAndUpdate implements AdminAuthorization {
}
}
//直播前奖品配置
//直播前奖品配置
@Test
(
description
=
"直播前抽奖"
,
priority
=
1
6
)
@Test
(
description
=
"直播前抽奖"
,
priority
=
1
5
)
public
void
直播前抽奖
()
{
public
void
直播前抽奖
()
{
Map
<
String
,
Object
>
addParam
=
new
HashMap
<>();
Map
<
String
,
Object
>
addParam
=
new
HashMap
<>();
addParam
.
put
(
"liveId"
,
liveID
);
addParam
.
put
(
"liveId"
,
liveID
);
...
@@ -319,23 +310,62 @@ public class SaveAndUpdate implements AdminAuthorization {
...
@@ -319,23 +310,62 @@ public class SaveAndUpdate implements AdminAuthorization {
}
}
//直播中奖品配置
//直播中奖品配置
@Test
(
description
=
"直播中抽奖"
,
priority
=
1
7
)
@Test
(
description
=
"直播中抽奖"
,
priority
=
1
6
)
public
void
直播中抽奖
()
{
public
void
直播中抽奖
()
{
Map
<
String
,
Object
>
add1Param
=
new
HashMap
<>();
Map
<
String
,
Object
>
add1Param
=
new
HashMap
<>();
add1Param
.
put
(
"liveId"
,
liveID
);
add1Param
.
put
(
"liveId"
,
liveID
);
add1Param
.
put
(
"interactNum"
,
10
);
add1Param
.
put
(
"interactNum"
,
10
0
);
add1Param
.
put
(
"showInteractNum"
,
10
);
add1Param
.
put
(
"showInteractNum"
,
10
0
);
add1Param
.
put
(
"welfareId"
,
191
);
add1Param
.
put
(
"welfareId"
,
191
);
add1Param
.
put
(
"afterMin"
,
1
0
);
add1Param
.
put
(
"afterMin"
,
2
0
);
Response
add1Res
=
network
.
postResponse
(
add1Param
,
BasicConfig
.
MANAGER_ADD1
);
Response
add1Res
=
network
.
postResponse
(
add1Param
,
BasicConfig
.
MANAGER_ADD1
);
Object
data
=
add1Res
.
jsonPath
().
getJsonObject
(
"data"
);
Object
data
=
add1Res
.
jsonPath
().
getJsonObject
(
"data"
);
System
.
out
.
println
(
data
);
System
.
out
.
println
(
data
);
Assert
.
assertNotNull
(
data
,
network
.
message
(
add1Param
,
BasicConfig
.
MANAGER_ADD1
,
"直播中抽奖配置失败"
,
add1Res
.
body
().
asString
()));
Assert
.
assertNotNull
(
data
,
network
.
message
(
add1Param
,
BasicConfig
.
MANAGER_ADD1
,
"直播中抽奖配置失败"
,
add1Res
.
body
().
asString
()));
Map
<
String
,
Object
>
add2Param
=
new
HashMap
<>();
add2Param
.
put
(
"liveId"
,
liveID
);
add2Param
.
put
(
"interactNum"
,
100
);
add2Param
.
put
(
"showInteractNum"
,
100
);
add2Param
.
put
(
"welfareId"
,
192
);
add2Param
.
put
(
"afterMin"
,
30
);
Response
add2Res
=
network
.
postResponse
(
add2Param
,
BasicConfig
.
MANAGER_ADD1
);
Object
data1
=
add2Res
.
jsonPath
().
getJsonObject
(
"data"
);
System
.
out
.
println
(
data1
);
Assert
.
assertNotNull
(
data1
,
network
.
message
(
add2Param
,
BasicConfig
.
MANAGER_ADD1
,
"直播中抽奖配置失败"
,
add2Res
.
body
().
asString
()));
Map
<
String
,
Object
>
add3Param
=
new
HashMap
<>();
add3Param
.
put
(
"liveId"
,
liveID
);
add3Param
.
put
(
"interactNum"
,
100
);
add3Param
.
put
(
"showInteractNum"
,
100
);
add3Param
.
put
(
"welfareId"
,
193
);
add3Param
.
put
(
"afterMin"
,
35
);
Response
add3Res
=
network
.
postResponse
(
add3Param
,
BasicConfig
.
MANAGER_ADD1
);
Object
data2
=
add3Res
.
jsonPath
().
getJsonObject
(
"data"
);
System
.
out
.
println
(
data2
);
Assert
.
assertNotNull
(
data2
,
network
.
message
(
add3Param
,
BasicConfig
.
MANAGER_ADD1
,
"直播中抽奖配置失败"
,
add3Res
.
body
().
asString
()));
Map
<
String
,
Object
>
add4Param
=
new
HashMap
<>();
add4Param
.
put
(
"liveId"
,
liveID
);
add4Param
.
put
(
"interactNum"
,
100
);
add4Param
.
put
(
"showInteractNum"
,
100
);
add4Param
.
put
(
"welfareId"
,
194
);
add4Param
.
put
(
"afterMin"
,
40
);
Response
add4Res
=
network
.
postResponse
(
add4Param
,
BasicConfig
.
MANAGER_ADD1
);
Object
data3
=
add4Res
.
jsonPath
().
getJsonObject
(
"data"
);
System
.
out
.
println
(
data3
);
Assert
.
assertNotNull
(
data3
,
network
.
message
(
add4Param
,
BasicConfig
.
MANAGER_ADD1
,
"直播中抽奖配置失败"
,
add4Res
.
body
().
asString
()));
}
}
//配置免费福利
//配置免费福利
@Test
(
description
=
"配置免费福利"
,
priority
=
1
8
)
@Test
(
description
=
"配置免费福利"
,
priority
=
1
7
)
public
void
配置免费福利
()
{
public
void
配置免费福利
()
{
Map
<
String
,
Object
>
saveOrUpdate8Param
=
new
HashMap
<>();
Map
<
String
,
Object
>
saveOrUpdate8Param
=
new
HashMap
<>();
saveOrUpdate8Param
.
put
(
"liveId"
,
liveID
);
saveOrUpdate8Param
.
put
(
"liveId"
,
liveID
);
...
...
src/test/java/com/kjj/config/BasicConfig.java
View file @
44681908
...
@@ -113,6 +113,12 @@ public class BasicConfig {
...
@@ -113,6 +113,12 @@ public class BasicConfig {
public
static
final
String
MOBILE_AgentPersonalTeamCharts
=
MOBILE_HOST
+
"/kjy/live/agent/personalTeamCharts"
;
public
static
final
String
MOBILE_AgentPersonalTeamCharts
=
MOBILE_HOST
+
"/kjy/live/agent/personalTeamCharts"
;
public
static
final
String
MOBILE_GetAgentPosterInfo
=
MOBILE_HOST
+
"/kjy/live/share/getAgentPosterInfo"
;
public
static
final
String
MOBILE_ClueNum
=
MOBILE_HOST
+
"/kjy/live/agent/clue/clueNum"
;
public
static
final
String
MOBILE_ClueList
=
MOBILE_HOST
+
"/kjy/live/agent/clue/list"
;
...
...
src/test/testNG.xml
View file @
44681908
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
<suite-files>
<suite-files>
<suite-file
path=
"liveTestNG.xml"
></suite-file>
<suite-file
path=
"liveTestNG.xml"
></suite-file>
<!-- <suite-file path="wechatTestNG.xml"></suite-file>--
>
<suite-file
path=
"wechatTestNG.xml"
></suite-file
>
</suite-files>
</suite-files>
<!-- 监听器-->
<!-- 监听器-->
...
...
src/test/wechatTestNG.xml
View file @
44681908
...
@@ -11,11 +11,11 @@
...
@@ -11,11 +11,11 @@
<!-- <class name="com.kjj.qa.cases.Novice"/>-->
<!-- <class name="com.kjj.qa.cases.Novice"/>-->
<!-- </classes>-->
<!-- </classes>-->
<!-- </test>-->
<!-- </test>-->
<test
preserve-order=
"true"
name=
"支付"
>
<!-- <test preserve-order="true" name="支付">--
>
<classes
>
<!-- <classes>--
>
<class
name=
"com.kjj.cases.basics.Pay"
/
>
<!-- <class name="com.kjj.cases.basics.Pay"/>--
>
</classes
>
<!-- </classes>--
>
</test
>
<!-- </test>--
>
<test
preserve-order=
"true"
name=
"名片"
>
<test
preserve-order=
"true"
name=
"名片"
>
<classes>
<classes>
<class
name=
"com.kjj.cases.basics.SellerCard"
/>
<class
name=
"com.kjj.cases.basics.SellerCard"
/>
...
@@ -46,11 +46,11 @@
...
@@ -46,11 +46,11 @@
<class
name=
"com.kjj.cases.basics.BossTest"
/>
<class
name=
"com.kjj.cases.basics.BossTest"
/>
</classes>
</classes>
</test>
</test>
<test
preserve-order=
"true"
name=
"贺卡"
>
<!-- <test preserve-order="true" name="贺卡">--
>
<classes
>
<!-- <classes>--
>
<class
name=
"com.kjj.cases.basics.GreetingCard"
/
>
<!-- <class name="com.kjj.cases.basics.GreetingCard"/>--
>
</classes
>
<!-- </classes>--
>
</test
>
<!-- </test>--
>
</suite>
</suite>
<!-- Suite -->
<!-- Suite -->
...
...
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