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
a8a03444
Commit
a8a03444
authored
Jul 15, 2021
by
张艳玲
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
35d683b8
Changes
7
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
517 additions
and
293 deletions
+517
-293
Reward.java
src/test/java/com/kjj/cases/live/agent/Reward.java
+514
-0
AgentOpen.java
src/test/java/com/kjj/cases/live/signing/AgentOpen.java
+0
-65
NuclearAward.java
src/test/java/com/kjj/cases/live/signing/NuclearAward.java
+0
-63
SignAward.java
src/test/java/com/kjj/cases/live/signing/SignAward.java
+0
-74
UserOpen.java
src/test/java/com/kjj/cases/live/signing/UserOpen.java
+0
-64
BasicConfig.java
src/test/java/com/kjj/config/BasicConfig.java
+1
-2
liveTestNG.xml
src/test/liveTestNG.xml
+2
-25
No files found.
src/test/java/com/kjj/cases/live/agent/Reward.java
0 → 100644
View file @
a8a03444
This diff is collapsed.
Click to expand it.
src/test/java/com/kjj/cases/live/signing/AgentOpen.java
deleted
100644 → 0
View file @
35d683b8
package
com
.
kjj
.
cases
.
live
.
signing
;
import
com.kjj.bean.manager.SaveRewardConfig
;
import
com.kjj.cases.admin.Authorization
;
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
Authorization
{
@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/signing/NuclearAward.java
deleted
100644 → 0
View file @
35d683b8
package
com
.
kjj
.
cases
.
live
.
signing
;
import
com.alibaba.fastjson.JSON
;
import
com.kjj.bean.manager.SaveRewardConfig
;
import
com.kjj.cases.admin.Authorization
;
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
NuclearAward
implements
Authorization
{
@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
()));
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
()));
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/signing/SignAward.java
deleted
100644 → 0
View file @
35d683b8
package
com
.
kjj
.
cases
.
live
.
signing
;
import
com.kjj.bean.manager.SaveRewardConfig
;
import
com.kjj.cases.admin.Authorization
;
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
Authorization
{
@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
()));
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
()));
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
()));
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/signing/UserOpen.java
deleted
100644 → 0
View file @
35d683b8
package
com
.
kjj
.
cases
.
live
.
signing
;
import
com.kjj.bean.manager.SaveRewardConfig
;
import
com.kjj.cases.admin.Authorization
;
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
Authorization
{
@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
()));
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
()));
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 @
a8a03444
...
...
@@ -530,11 +530,10 @@ public class BasicConfig {
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
MOBILE_small
=
MOBILE_HOST
+
"/kjy/live/card/user/small"
;
public
static
final
String
MOBILE_visitorSignInfo
=
MOBILE_HOST
+
"/kjy/live/reward/visitor/signInfo"
;
public
static
final
String
MOBILE_doSign
=
MOBILE_HOST
+
"/kjy/live/reward/visitor/doSign"
;
public
static
final
String
MOBILE_signOpen
=
MOBILE_HOST
+
"/kjy/live/visitor/reward/winner/signOpen"
;
...
...
src/test/liveTestNG.xml
View file @
a8a03444
...
...
@@ -186,35 +186,12 @@
</classes>
</test>
<!-- <test preserve-order="true" name="奖品发放配置-不开启核奖">-->
<!-- <classes>-->
<!-- <class name="com.kjj.cases.live.agent.Reward"/>-->
<!-- </classes>-->
<!-- </test>-->
<test
preserve-order=
"true"
name=
"奖品发放配置-不开启核奖"
>
<classes>
<class
name=
"com.kjj.cases.live.signing.NuclearAward"
/>
</classes>
</test>
<test
preserve-order=
"true"
name=
"扫码签收核奖_不开启红包"
>
<classes>
<class
name=
"com.kjj.cases.live.signing.SignAward"
/>
</classes>
</test>
<test
preserve-order=
"true"
name=
"扫码签收核奖_代理人得红包"
>
<test
preserve-order=
"true"
name=
"奖品发放配置"
>
<classes>
<class
name=
"com.kjj.cases.live.
signing.AgentOpen
"
/>
<class
name=
"com.kjj.cases.live.
agent.Reward
"
/>
</classes>
</test>
<test
preserve-order=
"true"
name=
"扫码签收核奖_客户得红包"
>
<classes>
<class
name=
"com.kjj.cases.live.signing.UserOpen"
/>
</classes>
</test>
<test
preserve-order=
"true"
name=
"指定中奖付款码"
>
<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