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
8c281e96
Commit
8c281e96
authored
Apr 22, 2021
by
张艳玲
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
奖品签收
parent
80d5cf18
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
346 additions
and
2 deletions
+346
-2
SaveRewardConfig.java
src/test/java/com/kjj/bean/manager/SaveRewardConfig.java
+11
-0
QuesReward.java
src/test/java/com/kjj/cases/live/manager/QuesReward.java
+48
-0
SaveAndUpdate.java
src/test/java/com/kjj/cases/live/manager/SaveAndUpdate.java
+1
-0
AgentOpen.java
...st/java/com/kjj/cases/live/manager/signing/AgentOpen.java
+65
-0
NuclearAward.java
...java/com/kjj/cases/live/manager/signing/NuclearAward.java
+66
-0
SignAward.java
...st/java/com/kjj/cases/live/manager/signing/SignAward.java
+77
-0
UserOpen.java
...est/java/com/kjj/cases/live/manager/signing/UserOpen.java
+66
-0
BasicConfig.java
src/test/java/com/kjj/config/BasicConfig.java
+12
-2
No files found.
src/test/java/com/kjj/bean/manager/SaveRewardConfig.java
0 → 100644
View file @
8c281e96
package
com
.
kjj
.
bean
.
manager
;
import
lombok.Data
;
@Data
public
class
SaveRewardConfig
{
private
Integer
confName
;
private
Integer
confValue
;
}
src/test/java/com/kjj/cases/live/manager/QuesReward.java
0 → 100644
View file @
8c281e96
package
com
.
kjj
.
cases
.
live
.
manager
;
import
com.kjj.cases.live.admin.AdminAuthorization
;
import
com.kjj.config.BasicConfig
;
import
com.kjj.utils.BaseUtils
;
import
io.restassured.response.Response
;
import
org.testng.Assert
;
import
org.testng.annotations.BeforeClass
;
import
org.testng.annotations.Test
;
import
java.util.HashMap
;
import
java.util.Map
;
public
class
QuesReward
implements
AdminAuthorization
{
@BeforeClass
public
void
setUp
()
{
BaseUtils
.
ssoLogin
();
}
@Test
(
description
=
"获取有奖答题列表信息"
,
priority
=
1
)
public
void
获取有奖答题列表信息
()
{
Map
<
String
,
Object
>
getConfParam
=
new
HashMap
<>();
// getConfParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
getConfParam
.
put
(
"liveId"
,
2960
);
Response
response
=
network
.
getResponse
(
getConfParam
,
BasicConfig
.
MANAGER_reward
);
Object
data
=
response
.
jsonPath
().
getJsonObject
(
"data"
);
System
.
out
.
println
(
data
);
Assert
.
assertNotNull
(
data
,
network
.
message
(
getConfParam
,
BasicConfig
.
MANAGER_reward
,
"获取有奖答题列表信息失败"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"获取本场答题有奖规则"
,
priority
=
2
)
public
void
获取本场答题有奖规则
()
{
Map
<
String
,
Object
>
getConfParam
=
new
HashMap
<>();
// getConfParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
getConfParam
.
put
(
"liveId"
,
2960
);
Response
response
=
network
.
getResponse
(
getConfParam
,
BasicConfig
.
MANAGER_getQuestionPrizesRule
);
Object
data
=
response
.
jsonPath
().
getJsonObject
(
"data"
);
System
.
out
.
println
(
data
);
Assert
.
assertNotNull
(
data
,
network
.
message
(
getConfParam
,
BasicConfig
.
MANAGER_getQuestionPrizesRule
,
"获取本场答题有奖规则失败"
,
response
.
body
().
asString
()));
}
}
src/test/java/com/kjj/cases/live/manager/SaveAndUpdate.java
View file @
8c281e96
...
...
@@ -303,6 +303,7 @@ public class SaveAndUpdate implements AdminAuthorization {
}
@Test
(
description
=
"获取剩余红包金额"
,
priority
=
14
)
public
void
获取剩余红包金额
()
{
Map
<
String
,
Object
>
getSurplusAmountParam
=
new
HashMap
<>();
...
...
src/test/java/com/kjj/cases/live/manager/signing/AgentOpen.java
0 → 100644
View file @
8c281e96
package
com
.
kjj
.
cases
.
live
.
manager
.
signing
;
import
com.kjj.bean.manager.SaveRewardConfig
;
import
com.kjj.cases.live.admin.AdminAuthorization
;
import
com.kjj.config.BasicConfig
;
import
com.kjj.constants.LiveConstants
;
import
com.kjj.utils.BaseUtils
;
import
io.restassured.response.Response
;
import
org.testng.Assert
;
import
org.testng.annotations.BeforeClass
;
import
org.testng.annotations.Test
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
public
class
AgentOpen
implements
AdminAuthorization
{
@BeforeClass
public
void
setUp
()
{
BaseUtils
.
ssoLogin
();
}
@Test
(
description
=
"扫码签收核奖_代理人得红包"
,
priority
=
1
)
public
void
扫码签收核奖
_
代理人得红包
()
{
Map
<
String
,
Object
>
configParam
=
new
HashMap
<>();
// configParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
configParam
.
put
(
"liveId"
,
3031
);
List
<
SaveRewardConfig
>
configs
=
new
ArrayList
<>();
SaveRewardConfig
saveReward
=
new
SaveRewardConfig
();
saveReward
.
setConfName
(
24
);
saveReward
.
setConfValue
(
2
);
configs
.
add
(
saveReward
);
SaveRewardConfig
saveReward1
=
new
SaveRewardConfig
();
saveReward1
.
setConfName
(
23
);
saveReward1
.
setConfValue
(
2
);
configs
.
add
(
saveReward1
);
SaveRewardConfig
saveReward2
=
new
SaveRewardConfig
();
saveReward2
.
setConfName
(
25
);
saveReward2
.
setConfValue
(
1
);
configs
.
add
(
saveReward2
);
configParam
.
put
(
"list"
,
configs
);
Response
response
=
network
.
postResponse
(
configParam
,
BasicConfig
.
MANAGER_saveRewardConfig
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
System
.
out
.
println
(
data
);
Assert
.
assertTrue
(
data
,
network
.
message
(
configParam
,
BasicConfig
.
MANAGER_saveRewardConfig
,
"不开启核奖设置失败"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"获取中奖名单配置"
,
priority
=
2
)
public
void
获取中奖名单配置
()
{
Map
<
String
,
Object
>
getConfParam
=
new
HashMap
<>();
// getConfParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
getConfParam
.
put
(
"liveId"
,
3031
);
Response
response
=
network
.
getResponse
(
getConfParam
,
BasicConfig
.
MANAGER_getConf
);
Object
data
=
response
.
jsonPath
().
getJsonObject
(
"data"
);
System
.
out
.
println
(
data
);
Assert
.
assertNotNull
(
data
,
network
.
message
(
getConfParam
,
BasicConfig
.
MANAGER_getConf
,
"获取中奖名单配置失败"
,
response
.
body
().
asString
()));
}
}
src/test/java/com/kjj/cases/live/manager/signing/NuclearAward.java
0 → 100644
View file @
8c281e96
package
com
.
kjj
.
cases
.
live
.
manager
.
signing
;
import
com.alibaba.fastjson.JSON
;
import
com.kjj.bean.manager.SaveRewardConfig
;
import
com.kjj.cases.live.admin.AdminAuthorization
;
import
com.kjj.config.BasicConfig
;
import
com.kjj.constants.LiveConstants
;
import
com.kjj.utils.BaseUtils
;
import
io.restassured.response.Response
;
import
org.apache.commons.math3.analysis.function.Add
;
import
org.testng.Assert
;
import
org.testng.annotations.BeforeClass
;
import
org.testng.annotations.Test
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
public
class
NuclearAward
implements
AdminAuthorization
{
@BeforeClass
public
void
setUp
()
{
BaseUtils
.
ssoLogin
();
}
@Test
(
description
=
"不开启核奖"
,
priority
=
1
)
public
void
不开启核奖
()
{
Map
<
String
,
Object
>
configParam
=
new
HashMap
<>();
// configParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
configParam
.
put
(
"liveId"
,
3031
);
List
<
SaveRewardConfig
>
configs
=
new
ArrayList
<>();
SaveRewardConfig
saveReward
=
new
SaveRewardConfig
();
saveReward
.
setConfName
(
24
);
saveReward
.
setConfValue
(
1
);
configs
.
add
(
saveReward
);
SaveRewardConfig
saveReward1
=
new
SaveRewardConfig
();
saveReward1
.
setConfName
(
23
);
saveReward1
.
setConfValue
(
1
);
configs
.
add
(
saveReward1
);
configParam
.
put
(
"list"
,
configs
);
Response
response
=
network
.
postResponse
(
configParam
,
BasicConfig
.
MANAGER_saveRewardConfig
);
boolean
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
Assert
.
assertTrue
(
success
,
network
.
message
(
configParam
,
BasicConfig
.
MANAGER_saveRewardConfig
,
"接口调用失败"
+
JSON
.
toJSONString
(
response
.
jsonPath
().
get
()),
response
.
body
().
asString
()));
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
System
.
out
.
println
(
data
);
Assert
.
assertTrue
(
data
,
network
.
message
(
configParam
,
BasicConfig
.
MANAGER_saveRewardConfig
,
"不开启核奖设置失败"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"获取不开启核奖配置是否正确"
,
priority
=
2
)
public
void
获取不开启核奖配置是否正确
()
{
Map
<
String
,
Object
>
getConfParam
=
new
HashMap
<>();
// getConfParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
getConfParam
.
put
(
"liveId"
,
3031
);
Response
response
=
network
.
getResponse
(
getConfParam
,
BasicConfig
.
MANAGER_getConf
);
Object
data
=
response
.
jsonPath
().
getJsonObject
(
"data"
);
System
.
out
.
println
(
data
);
Assert
.
assertNotNull
(
data
,
network
.
message
(
getConfParam
,
BasicConfig
.
MANAGER_getConf
,
"不开启核奖配置未配置成功"
,
response
.
body
().
asString
()));
}
}
src/test/java/com/kjj/cases/live/manager/signing/SignAward.java
0 → 100644
View file @
8c281e96
package
com
.
kjj
.
cases
.
live
.
manager
.
signing
;
import
com.kjj.bean.manager.SaveRewardConfig
;
import
com.kjj.cases.live.admin.AdminAuthorization
;
import
com.kjj.config.BasicConfig
;
import
com.kjj.constants.LiveConstants
;
import
com.kjj.utils.BaseUtils
;
import
io.restassured.response.Response
;
import
org.testng.Assert
;
import
org.testng.annotations.BeforeClass
;
import
org.testng.annotations.Test
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
public
class
SignAward
implements
AdminAuthorization
{
@BeforeClass
public
void
setUp
()
{
BaseUtils
.
ssoLogin
();
}
@Test
(
description
=
"扫码签收核奖_不开启红包"
,
priority
=
1
)
public
void
扫码签收核奖
_
不开启红包
()
{
Map
<
String
,
Object
>
configParam
=
new
HashMap
<>();
// configParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
configParam
.
put
(
"liveId"
,
3058
);
List
<
SaveRewardConfig
>
configs
=
new
ArrayList
<>();
SaveRewardConfig
saveReward
=
new
SaveRewardConfig
();
saveReward
.
setConfName
(
24
);
saveReward
.
setConfValue
(
1
);
configs
.
add
(
saveReward
);
SaveRewardConfig
saveReward1
=
new
SaveRewardConfig
();
saveReward1
.
setConfName
(
23
);
saveReward1
.
setConfValue
(
2
);
configs
.
add
(
saveReward1
);
SaveRewardConfig
saveReward2
=
new
SaveRewardConfig
();
saveReward2
.
setConfName
(
25
);
saveReward2
.
setConfValue
(
1
);
configs
.
add
(
saveReward2
);
configParam
.
put
(
"list"
,
configs
);
Response
response
=
network
.
postResponse
(
configParam
,
BasicConfig
.
MANAGER_saveRewardConfig
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
System
.
out
.
println
(
data
);
Assert
.
assertTrue
(
data
,
network
.
message
(
configParam
,
BasicConfig
.
MANAGER_saveRewardConfig
,
"不开启红包设置失败"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"获取中奖名单配置"
,
priority
=
2
)
public
void
获取中奖名单配置
()
{
Map
<
String
,
Object
>
getConfParam
=
new
HashMap
<>();
// getConfParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
getConfParam
.
put
(
"liveId"
,
3058
);
Response
response
=
network
.
getResponse
(
getConfParam
,
BasicConfig
.
MANAGER_getConf
);
Object
data
=
response
.
jsonPath
().
getJsonObject
(
"data"
);
System
.
out
.
println
(
data
);
Assert
.
assertNotNull
(
data
,
network
.
message
(
getConfParam
,
BasicConfig
.
MANAGER_getConf
,
"获取中奖名单配置失败"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"获取奖品签收小程序码"
,
priority
=
3
)
public
void
获取奖品签收小程序码
()
{
Map
<
String
,
Object
>
CodeParam
=
new
HashMap
<>();
// CodeParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
CodeParam
.
put
(
"liveId"
,
3058
);
Response
response
=
network
.
getResponse
(
CodeParam
,
BasicConfig
.
MANAGER_rewardSignQrCode
);
Object
data
=
response
.
jsonPath
().
getJsonObject
(
"data"
);
System
.
out
.
println
(
data
);
Assert
.
assertNotNull
(
data
,
network
.
message
(
CodeParam
,
BasicConfig
.
MANAGER_rewardSignQrCode
,
"获取小程序码失败"
,
response
.
body
().
asString
()));
}
}
src/test/java/com/kjj/cases/live/manager/signing/UserOpen.java
0 → 100644
View file @
8c281e96
package
com
.
kjj
.
cases
.
live
.
manager
.
signing
;
import
com.kjj.bean.manager.SaveRewardConfig
;
import
com.kjj.cases.live.admin.AdminAuthorization
;
import
com.kjj.config.BasicConfig
;
import
com.kjj.constants.LiveConstants
;
import
com.kjj.utils.BaseUtils
;
import
io.restassured.response.Response
;
import
org.testng.Assert
;
import
org.testng.annotations.BeforeClass
;
import
org.testng.annotations.Test
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
public
class
UserOpen
implements
AdminAuthorization
{
@BeforeClass
public
void
setUp
()
{
BaseUtils
.
ssoLogin
();
}
@Test
(
description
=
"扫码签收核奖_代理人得红包"
,
priority
=
1
)
public
void
扫码签收核奖
_
代理人得红包
()
{
Map
<
String
,
Object
>
configParam
=
new
HashMap
<>();
// configParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
configParam
.
put
(
"liveId"
,
3031
);
List
<
SaveRewardConfig
>
configs
=
new
ArrayList
<>();
SaveRewardConfig
saveReward
=
new
SaveRewardConfig
();
saveReward
.
setConfName
(
24
);
saveReward
.
setConfValue
(
3
);
configs
.
add
(
saveReward
);
SaveRewardConfig
saveReward1
=
new
SaveRewardConfig
();
saveReward1
.
setConfName
(
23
);
saveReward1
.
setConfValue
(
2
);
configs
.
add
(
saveReward1
);
SaveRewardConfig
saveReward2
=
new
SaveRewardConfig
();
saveReward2
.
setConfName
(
25
);
saveReward2
.
setConfValue
(
1
);
configs
.
add
(
saveReward2
);
configParam
.
put
(
"list"
,
configs
);
Response
response
=
network
.
postResponse
(
configParam
,
BasicConfig
.
MANAGER_saveRewardConfig
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
System
.
out
.
println
(
data
);
Assert
.
assertTrue
(
data
,
network
.
message
(
configParam
,
BasicConfig
.
MANAGER_saveRewardConfig
,
"扫码签收代理人得红包配置失败"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"获取中奖名单配置"
,
priority
=
2
)
public
void
获取中奖名单配置
()
{
Map
<
String
,
Object
>
getConfParam
=
new
HashMap
<>();
// getConfParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
getConfParam
.
put
(
"liveId"
,
3031
);
Response
response
=
network
.
getResponse
(
getConfParam
,
BasicConfig
.
MANAGER_getConf
);
Object
data
=
response
.
jsonPath
().
getJsonObject
(
"data"
);
System
.
out
.
println
(
data
);
Assert
.
assertNotNull
(
data
,
network
.
message
(
getConfParam
,
BasicConfig
.
MANAGER_getConf
,
"获取代理人得红包配置失败"
,
response
.
body
().
asString
()));
}
}
src/test/java/com/kjj/config/BasicConfig.java
View file @
8c281e96
...
...
@@ -9,7 +9,7 @@ public class BasicConfig {
// 代理人的openid(固定)
public
static
final
String
OPEN_ID
=
"osi5w5ggFiEXk0tPJH9b0KO_XU08"
;
//直播管理员(吉吉)
public
static
String
ADMIN_KEY
=
"LEH7epeHVDJWzhZ6DiexTHnsy2
7vJ5iyL7U5xfY7SmyYGfEoTV5n7LGS9CsYKeQUAaczX94yaV3d4K97F37Yz7LUzipki
"
;
public
static
String
ADMIN_KEY
=
"LEH7epeHVDJWzhZ6DiexTHnsy2
8ubjrAPGJYU3yPhwb8v3QC3S7b3s2kv18XVBS3CMLT1cmiLu1BdrrC3xbx1EHzWNbcL
"
;
// 直播代理人 (艳玲)
public
static
String
AUTH_KEY
=
"LEH7epeHVDJWzhZ6DiexTHnfZY2NrKorVWS9R85xTeuUZzyc2boHSYWYU56ttSUbcAb9ngEb3LJBB3qZ7a9eCkEoPV5yu"
;
//直播访客 (志勇)
...
...
@@ -20,7 +20,7 @@ public class BasicConfig {
public
static
String
VISITORKEY3
=
"LEH7epeHVDJWzhZ6DiexTHnsaP3ed5NWb7fwGDRPzUCcfxMKyEZr5fYSmKv5AZVQu1w2FRoEvz6mP3RzfeKLqjV8Kq1XE"
;
//直播访客 (李执)
public
static
String
VISITORKEY4
=
"5MgSyboxqzAQZZJEsTf43nVX8FkunrWfgVgxhR9mmo6thaPjMjfgUM62TrCUYvnSdn3kTGsGvJsSaiS4m5LS1up5twWa"
;
//直播访客 (
嘿保险
)
//直播访客 (
吉吉
)
public
static
String
VISITORKEY9
=
"LEH7epeHVDJWzhZ6DiexTHnfZY2NrKnNHmHY52FxaDfigK3U4NQpLsQrodQUPUXwmumQ1kr3xsfZoGw7cEswYryWfUtMW"
;
//直播访客 (周成)
public
static
String
VISITORKEY5
=
"LEH7epeHVDJWzhZ6DiexTHnsy28uMFcnMj6a1Nh76ZtqrBohi2vbvjsoksZjyRcqFdSgh5zddoi95S8gKvBbuggy6Bhku"
;
...
...
@@ -277,6 +277,16 @@ public class BasicConfig {
public
static
final
String
MANAGER_del1
=
MANAGER_HOST
+
"/kjy/manager/live/lottery/delete"
;
public
static
final
String
MANAGER_result
=
MANAGER_HOST
+
"/kjy/manager/live/import/result"
;
//***************奖品签收*****************
public
static
final
String
MANAGER_getConf
=
MANAGER_HOST
+
"/kjy/manager/live/awardGrant/getConf"
;
public
static
final
String
MANAGER_rewardSignQrCode
=
MANAGER_HOST
+
"/kjy/manager/live/awardGrant/rewardSignQrCode"
;
public
static
final
String
MANAGER_saveRewardConfig
=
MANAGER_HOST
+
"/kjy/manager/live/awardGrant/saveRewardConfig"
;
//***************有奖答题*****************
public
static
final
String
MANAGER_reward
=
MANAGER_HOST
+
"/kjy/manager/live/ques/reward/list"
;
public
static
final
String
MANAGER_getQuestionPrizesRule
=
MANAGER_HOST
+
"/kjy/manager/live/ques/reward/getQuestionPrizesRule"
;
// *************** 素材ID ***************
...
...
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