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
6409e551
Commit
6409e551
authored
Jun 24, 2021
by
张艳玲
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
94aa84b0
Changes
10
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
863 additions
and
10 deletions
+863
-10
RedList.java
src/test/java/com/kjj/bean/manager/RedList.java
+11
-0
RedConf.java
src/test/java/com/kjj/bean/red/RedConf.java
+13
-0
ResourceForm.java
src/test/java/com/kjj/bean/resources/ResourceForm.java
+3
-0
FlipCard.java
src/test/java/com/kjj/cases/live/flipCard/FlipCard.java
+5
-5
SaveLive.java
src/test/java/com/kjj/cases/live/liveConfig/SaveLive.java
+239
-2
LotteryCode.java
...test/java/com/kjj/cases/live/lotteryCode/LotteryCode.java
+2
-2
TimeRed.java
src/test/java/com/kjj/cases/live/treasure/TimeRed.java
+547
-0
BasicConfig.java
src/test/java/com/kjj/config/BasicConfig.java
+25
-0
JsonUtil.java
src/test/java/com/kjj/utils/JsonUtil.java
+12
-1
liveTestNG.xml
src/test/liveTestNG.xml
+6
-0
No files found.
src/test/java/com/kjj/bean/manager/RedList.java
0 → 100644
View file @
6409e551
package
com
.
kjj
.
bean
.
manager
;
import
lombok.Data
;
@Data
public
class
RedList
{
private
Integer
id
;
private
long
bizConfId
;
}
src/test/java/com/kjj/bean/red/RedConf.java
0 → 100644
View file @
6409e551
package
com
.
kjj
.
bean
.
red
;
import
lombok.Data
;
@Data
public
class
RedConf
{
private
String
bizConfId
;
private
String
taskName
;
private
Integer
taskType
;
private
String
id
;
}
src/test/java/com/kjj/bean/resources/ResourceForm.java
View file @
6409e551
...
@@ -5,6 +5,9 @@ import lombok.Data;
...
@@ -5,6 +5,9 @@ import lombok.Data;
import
java.util.List
;
import
java.util.List
;
@Data
@Data
public
class
ResourceForm
{
public
class
ResourceForm
{
private
String
fieldId
;
private
String
fieldValue
;
private
String
fieldName
;
private
String
banner
;
private
String
banner
;
private
List
<
FieldList
>
fieldList
;
private
List
<
FieldList
>
fieldList
;
private
String
received
;
private
String
received
;
...
...
src/test/java/com/kjj/cases/live/flipCard/FlipCard.java
View file @
6409e551
...
@@ -131,7 +131,7 @@ public class FlipCard implements AdminAuthorization {
...
@@ -131,7 +131,7 @@ public class FlipCard implements AdminAuthorization {
@Test
(
description
=
"开启翻牌"
,
priority
=
9
)
@Test
(
description
=
"开启翻牌"
,
priority
=
9
)
public
void
开启翻牌
()
{
public
void
开启翻牌
()
{
visitorAuth9
();
visitorAuth9
();
for
(
int
i
=
0
;
i
<
1
2
;
i
++){
for
(
int
i
=
0
;
i
<
1
1
;
i
++){
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"cardConfId"
,
cardConfId
);
params
.
put
(
"cardConfId"
,
cardConfId
);
params
.
put
(
"slot"
,
i
);
params
.
put
(
"slot"
,
i
);
...
@@ -190,13 +190,13 @@ public class FlipCard implements AdminAuthorization {
...
@@ -190,13 +190,13 @@ public class FlipCard implements AdminAuthorization {
@Test
(
description
=
"提现结果"
,
priority
=
12
)
@Test
(
description
=
"提现结果"
,
priority
=
12
)
public
void
提现结果
()
{
public
void
提现结果
()
{
visitorAuth9
();
visitorAuth9
();
ThreadSleepUtils
.
sleep
(
3000
);
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"cardConfId"
,
cardConfId
);
params
.
put
(
"cardConfId"
,
cardConfId
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_withdrawalResult
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_withdrawalResult
);
Integer
status
=
response
.
jsonPath
().
getInt
(
"data.status"
);
Integer
status
=
response
.
jsonPath
().
getInt
(
"data.status"
);
System
.
out
.
println
(
status
);
System
.
out
.
println
(
status
);
Assert
.
assertTrue
(
status
==
2
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_withdrawalResult
,
"提现失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
status
==
2
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_withdrawalResult
,
"提现失败"
,
response
.
body
().
asString
()));
}
}
//提现记录
//提现记录
...
...
src/test/java/com/kjj/cases/live/liveConfig/SaveLive.java
View file @
6409e551
This diff is collapsed.
Click to expand it.
src/test/java/com/kjj/cases/live/lotteryCode/LotteryCode.java
View file @
6409e551
...
@@ -162,8 +162,8 @@ public class LotteryCode implements AdminAuthorization {
...
@@ -162,8 +162,8 @@ public class LotteryCode implements AdminAuthorization {
}
}
@Test
(
description
=
"
中奖任务邀请
H绑定结果和绑定凭证"
,
priority
=
12
)
@Test
(
description
=
"
访客
H绑定结果和绑定凭证"
,
priority
=
12
)
public
void
获取
访客
H
绑定结果和绑定凭证
()
{
public
void
访客
H
绑定结果和绑定凭证
()
{
visitorAuth9
();
visitorAuth9
();
ThreadSleepUtils
.
sleep
(
1000
);
ThreadSleepUtils
.
sleep
(
1000
);
Map
<
String
,
Object
>
tokenParam
=
new
HashMap
<>();
Map
<
String
,
Object
>
tokenParam
=
new
HashMap
<>();
...
...
src/test/java/com/kjj/cases/live/treasure/TimeRed.java
0 → 100644
View file @
6409e551
This diff is collapsed.
Click to expand it.
src/test/java/com/kjj/config/BasicConfig.java
View file @
6409e551
...
@@ -89,6 +89,31 @@ public class BasicConfig {
...
@@ -89,6 +89,31 @@ public class BasicConfig {
public
static
final
String
ANCHOR_OPEN
=
MOBILE_HOST
+
"/conf/live/open"
;
public
static
final
String
ANCHOR_OPEN
=
MOBILE_HOST
+
"/conf/live/open"
;
public
static
final
String
ANCHOR_getConfDetail
=
MOBILE_HOST
+
"/conf/pre/getConfDetail"
;
public
static
final
String
ANCHOR_getConfDetail
=
MOBILE_HOST
+
"/conf/pre/getConfDetail"
;
public
static
final
String
ANCHOR_CLOSE
=
MOBILE_HOST
+
"/conf/live/close"
;
public
static
final
String
ANCHOR_CLOSE
=
MOBILE_HOST
+
"/conf/live/close"
;
// *************** 看直播攒现金红包 ***************
public
static
final
String
MANAGER_timeRed
=
MANAGER_HOST
+
"/kjy/manager/live/time/red/saveOrUpdateFirst"
;
public
static
final
String
MANAGER_timeRedList
=
MANAGER_HOST
+
"/kjy/manager/live/time/red/list"
;
public
static
final
String
MANAGER_redStats
=
MANAGER_HOST
+
"/kjy/manager/live/time/red/stats"
;
public
static
final
String
MANAGER_resourceList1
=
MANAGER_HOST
+
"/kjy/manager/live/time/red/resourceList"
;
public
static
final
String
MANAGER_TimeRedSave
=
MANAGER_HOST
+
"/kjy/manager/live/time/red/saveOrUpdate"
;
public
static
final
String
MANAGER_otherDetail
=
MANAGER_HOST
+
"/kjy/manager/live/time/red/otherDetail"
;
public
static
final
String
MANAGER_saveOrUpdateReceiveNum
=
MANAGER_HOST
+
"/kjy/manager/live/time/red/saveOrUpdateReceiveNum"
;
public
static
final
String
MANAGER_firstDetail
=
MANAGER_HOST
+
"/kjy/manager/live/time/red/firstDetail"
;
public
static
final
String
MANAGER_switchDetail
=
MANAGER_HOST
+
"/kjy/manager/live/time/red/switchDetail"
;
public
static
final
String
MANAGER_redSwitchStatus
=
MANAGER_HOST
+
"/kjy/manager/live/time/red/switchStatus"
;
public
static
final
String
MANAGER_receiveNumDetail
=
MANAGER_HOST
+
"/kjy/manager/live/time/red/receiveNumDetail"
;
public
static
final
String
ANCHOR_redConf
=
MOBILE_HOST
+
"/kjy/live/time/red/conf"
;
public
static
final
String
ANCHOR_record
=
MOBILE_HOST
+
"/kjy/live/time/red/record"
;
public
static
final
String
ANCHOR_redOpen
=
MOBILE_HOST
+
"/kjy/live/time/red/open"
;
public
static
final
String
ANCHOR_withdrawDetail
=
MOBILE_HOST
+
"/kjy/live/time/red/withdraw/detail"
;
public
static
final
String
ANCHOR_withdraw
=
MOBILE_HOST
+
"/kjy/live/time/red/withdraw"
;
public
static
final
String
ANCHOR_withdrawState
=
MOBILE_HOST
+
"/kjy/live/time/red/withdraw/state"
;
public
static
final
String
ANCHOR_openState
=
MOBILE_HOST
+
"/kjy/live/time/red/open/state"
;
public
static
final
String
ANCHOR_code
=
MOBILE_HOST
+
"/kjy/live/time/red/code"
;
public
static
final
String
ANCHOR_state
=
MOBILE_HOST
+
"/kjy/live/time/red/code/state"
;
// *************** 免费领福利 ***************
// *************** 免费领福利 ***************
public
static
final
String
ANCHOR_listLiveFreeReward
=
MOBILE_HOST
+
"/kjy/live/lottery/listLiveFreeReward"
;
public
static
final
String
ANCHOR_listLiveFreeReward
=
MOBILE_HOST
+
"/kjy/live/lottery/listLiveFreeReward"
;
public
static
final
String
ANCHOR_receive
=
MOBILE_HOST
+
"/kjy/live/user/lottery/receive"
;
public
static
final
String
ANCHOR_receive
=
MOBILE_HOST
+
"/kjy/live/user/lottery/receive"
;
...
...
src/test/java/com/kjj/utils/JsonUtil.java
View file @
6409e551
...
@@ -42,10 +42,21 @@ public class JsonUtil {
...
@@ -42,10 +42,21 @@ public class JsonUtil {
* @return
* @return
*/
*/
public
static
<
T
>
List
<
T
>
parseResponseToPageBean
(
Response
response
,
Class
<
T
>
tClass
){
public
static
<
T
>
List
<
T
>
parseResponseToPageBean
(
Response
response
,
Class
<
T
>
tClass
){
return
parseResponseToPageBean
(
response
,
tClass
,
"list"
);
}
/**
* 分页接口专用-将响应转换成对象
* @param response
* @param tClass
* @param <T>
* @return
*/
public
static
<
T
>
List
<
T
>
parseResponseToPageBean
(
Response
response
,
Class
<
T
>
tClass
,
String
listName
){
Object
data
=
response
.
jsonPath
().
getJsonObject
(
"data"
);
Object
data
=
response
.
jsonPath
().
getJsonObject
(
"data"
);
String
str
=
new
JsonBuilder
(
data
).
toString
();
String
str
=
new
JsonBuilder
(
data
).
toString
();
JSONObject
jsonObject
=
JSON
.
parseObject
(
str
);
JSONObject
jsonObject
=
JSON
.
parseObject
(
str
);
JSONArray
array
=
jsonObject
.
getJSONArray
(
"list"
);
JSONArray
array
=
jsonObject
.
getJSONArray
(
listName
);
return
array
.
toJavaList
(
tClass
);
return
array
.
toJavaList
(
tClass
);
}
}
...
...
src/test/liveTestNG.xml
View file @
6409e551
...
@@ -100,6 +100,12 @@
...
@@ -100,6 +100,12 @@
</classes>
</classes>
</test>
</test>
<test
preserve-order=
"true"
name=
"看直播攒现金"
>
<classes>
<class
name=
"com.kjj.cases.live.treasure.TimeRed"
/>
</classes>
</test>
<test
preserve-order=
"true"
name=
"免费领福利"
>
<test
preserve-order=
"true"
name=
"免费领福利"
>
<classes>
<classes>
<class
name=
"com.kjj.cases.live.FreeReward.FreeReward"
/>
<class
name=
"com.kjj.cases.live.FreeReward.FreeReward"
/>
...
...
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