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
47136cd2
Commit
47136cd2
authored
Jul 07, 2021
by
张艳玲
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'featrue/20210702-zhangyl' into 'master'
update See merge request test-group/kejiji!59
parents
c5c32ef1
94b2de84
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
757 additions
and
8 deletions
+757
-8
QuesList.java
src/test/java/com/kjj/bean/answer/QuesList.java
+12
-0
Authorization.java
src/test/java/com/kjj/cases/admin/Authorization.java
+17
-1
passQues.java
src/test/java/com/kjj/cases/live/answer/passQues.java
+658
-0
SaveLive.java
src/test/java/com/kjj/cases/live/liveConfig/SaveLive.java
+43
-6
BasicConfig.java
src/test/java/com/kjj/config/BasicConfig.java
+20
-1
liveTestNG.xml
src/test/liveTestNG.xml
+7
-0
No files found.
src/test/java/com/kjj/bean/answer/QuesList.java
0 → 100644
View file @
47136cd2
package
com
.
kjj
.
bean
.
answer
;
import
lombok.Data
;
@Data
public
class
QuesList
{
private
String
quesId
;
private
String
id
;
}
src/test/java/com/kjj/cases/admin/Authorization.java
View file @
47136cd2
...
...
@@ -222,12 +222,28 @@ public interface Authorization {
}
/**
* 访客V(
谢翊美)ID:791
* 访客V(
zzz666)ID:849
*/
default
void
visitorAuth22
()
{
network
.
agentCookies
.
put
(
"authKey"
,
visitorAuth22
);
System
.
out
.
println
(
"用户AUTH_KEY:"
+
visitorAuth22
);
}
/**
* 访客u(七凉)ID:179
*/
default
void
visitorAuth23
()
{
network
.
agentCookies
.
put
(
"authKey"
,
visitorAuth23
);
System
.
out
.
println
(
"用户AUTH_KEY:"
+
visitorAuth23
);
}
/**
* 访客S(奶汪)ID:1170 实名
*/
default
void
visitorAuth24
()
{
network
.
agentCookies
.
put
(
"authKey"
,
visitorAuth24
);
System
.
out
.
println
(
"用户AUTH_KEY:"
+
visitorAuth24
);
}
}
src/test/java/com/kjj/cases/live/answer/passQues.java
0 → 100644
View file @
47136cd2
This diff is collapsed.
Click to expand it.
src/test/java/com/kjj/cases/live/liveConfig/SaveLive.java
View file @
47136cd2
...
...
@@ -1768,7 +1768,7 @@ public class SaveLive implements Authorization {
optionList1
.
setOptionType
(
2
);
optionLists
.
add
(
optionList1
);
Params
.
put
(
"optionList"
,
optionLists
);
Params
.
put
(
"passQuestion"
,
"闯关答题配置"
);
Params
.
put
(
"passQuestion"
,
"闯关答题配置
1
"
);
Response
response
=
network
.
postResponse
(
Params
,
BasicConfig
.
MANAGER_addOrUpdateQues
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
System
.
out
.
println
(
data
);
...
...
@@ -1776,7 +1776,7 @@ public class SaveLive implements Authorization {
Map
<
String
,
Object
>
addPassParam
=
new
HashMap
<>();
addPassParam
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
LIVE_ID
.
getKey
()));
addPassParam
.
put
(
"openTime"
,
1
0
);
addPassParam
.
put
(
"openTime"
,
2
0
);
List
<
PassQues
>
optionLists1
=
new
ArrayList
<>();
PassQues
optionList2
=
new
PassQues
();
optionList2
.
setOptionDetail
(
"正确选项"
);
...
...
@@ -1787,13 +1787,50 @@ public class SaveLive implements Authorization {
optionList3
.
setOptionType
(
2
);
optionLists1
.
add
(
optionList3
);
addPassParam
.
put
(
"optionList"
,
optionLists1
);
addPassParam
.
put
(
"passQuestion"
,
"闯关答题配置"
);
addPassParam
.
put
(
"passQuestion"
,
"闯关答题配置
2
"
);
Response
passRes
=
network
.
postResponse
(
addPassParam
,
BasicConfig
.
MANAGER_addOrUpdateQues
);
boolean
data1
=
passRes
.
jsonPath
().
getBoolean
(
"data"
);
System
.
out
.
println
(
data1
);
Assert
.
assertTrue
(
data1
,
network
.
message
(
addPassParam
,
BasicConfig
.
MANAGER_addOrUpdateQues
,
"新增闯关答题配置失败"
,
passRes
.
body
().
asString
()));
Map
<
String
,
Object
>
addPassParam1
=
new
HashMap
<>();
addPassParam1
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
LIVE_ID
.
getKey
()));
addPassParam1
.
put
(
"openTime"
,
30
);
List
<
PassQues
>
optionLists2
=
new
ArrayList
<>();
PassQues
optionList4
=
new
PassQues
();
optionList4
.
setOptionDetail
(
"正确选项"
);
optionList4
.
setOptionType
(
1
);
optionLists2
.
add
(
optionList4
);
PassQues
optionList5
=
new
PassQues
();
optionList5
.
setOptionDetail
(
"错误选项"
);
optionList5
.
setOptionType
(
2
);
optionLists2
.
add
(
optionList5
);
addPassParam1
.
put
(
"optionList"
,
optionLists2
);
addPassParam1
.
put
(
"passQuestion"
,
"闯关答题配置3"
);
Response
passRes1
=
network
.
postResponse
(
addPassParam1
,
BasicConfig
.
MANAGER_addOrUpdateQues
);
boolean
data2
=
passRes1
.
jsonPath
().
getBoolean
(
"data"
);
System
.
out
.
println
(
data2
);
Assert
.
assertTrue
(
data2
,
network
.
message
(
addPassParam1
,
BasicConfig
.
MANAGER_addOrUpdateQues
,
"新增闯关答题配置失败"
,
passRes1
.
body
().
asString
()));
Map
<
String
,
Object
>
addPassParam2
=
new
HashMap
<>();
addPassParam2
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
LIVE_ID
.
getKey
()));
addPassParam2
.
put
(
"openTime"
,
40
);
List
<
PassQues
>
optionLists3
=
new
ArrayList
<>();
PassQues
optionList6
=
new
PassQues
();
optionList6
.
setOptionDetail
(
"正确选项"
);
optionList6
.
setOptionType
(
1
);
optionLists3
.
add
(
optionList6
);
PassQues
optionList7
=
new
PassQues
();
optionList7
.
setOptionDetail
(
"错误选项"
);
optionList7
.
setOptionType
(
2
);
optionLists3
.
add
(
optionList7
);
addPassParam2
.
put
(
"optionList"
,
optionLists3
);
addPassParam2
.
put
(
"passQuestion"
,
"闯关答题配置4"
);
Response
passRes2
=
network
.
postResponse
(
addPassParam2
,
BasicConfig
.
MANAGER_addOrUpdateQues
);
boolean
data3
=
passRes2
.
jsonPath
().
getBoolean
(
"data"
);
System
.
out
.
println
(
data3
);
Assert
.
assertTrue
(
data3
,
network
.
message
(
addPassParam2
,
BasicConfig
.
MANAGER_addOrUpdateQues
,
"新增闯关答题配置失败"
,
passRes2
.
body
().
asString
()));
}
...
...
@@ -1826,7 +1863,7 @@ public class SaveLive implements Authorization {
public
void
删除闯关答题配置
()
{
Map
<
String
,
Object
>
Params
=
new
HashMap
<>();
Params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
LIVE_ID
.
getKey
()));
Params
.
put
(
"quesId"
,
this
.
quesId
.
get
(
1
).
getId
());
Params
.
put
(
"quesId"
,
this
.
quesId
.
get
(
3
).
getId
());
Response
response
=
network
.
postResponse
(
Params
,
BasicConfig
.
MANAGER_deleteQues
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
System
.
out
.
println
(
data
);
...
...
@@ -1849,9 +1886,9 @@ public class SaveLive implements Authorization {
public
void
新增闯关红包配置
()
{
Map
<
String
,
Object
>
Params
=
new
HashMap
<>();
Params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
LIVE_ID
.
getKey
()));
Params
.
put
(
"amount"
,
100
0
);
Params
.
put
(
"amount"
,
3
0
);
Params
.
put
(
"carveTime"
,
1
);
Params
.
put
(
"showAmount"
,
100
0
);
Params
.
put
(
"showAmount"
,
3
0
);
Response
response
=
network
.
postResponse
(
Params
,
BasicConfig
.
MANAGER_addOrUpdateConf
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
System
.
out
.
println
(
data
);
...
...
src/test/java/com/kjj/config/BasicConfig.java
View file @
47136cd2
...
...
@@ -58,7 +58,10 @@ public class BasicConfig {
public
static
String
visitorAuth21
=
"LEH7epeHVDJWzhZ6DiexTHnsaN9w9oX4LYmRiH4EYLayw7oTtnaZ4YpLUcVaMTnAUuz5jSPcnRQgDm7R2XRS6AQgJqtta"
;
//直播访客 (zzz666)ID:849
public
static
String
visitorAuth22
=
"LEH7epeHVDJWzhZ6DiexTHnsaMYwdGZ6gcwfZgyDxbCXekMNKoXXNy7hieT2Bt6KwShiHYjnNViCm9EmjvN1msbTomJta"
;
//直播访客 (七凉)ID:179
public
static
String
visitorAuth23
=
"LEH7epeHVDJWzhZ6DiexTHnsaRU4euCKXGmUiCDXuHaG6DznL4Mfk9SGwWCnwMvA6urFmXu4Qe9sCCcXMdojZMU4xN39V"
;
//直播访客 (奶汪)ID:1170 实名用户
public
static
String
visitorAuth24
=
"2Tsc8MwHZmXJKPfze38rXm37UEX1EtfvfjxjLr1GZDVAdRXD3hSK2j6WjZQgFaqHHJcT5yk3tB64Ebu38fmuJymWQtPcAdr"
;
//***********************************************************************
// 基础线代理人 TKU,sid:2991
...
...
@@ -99,6 +102,22 @@ public class BasicConfig {
public
static
final
String
MANAGER_redConfInfo
=
MANAGER_HOST
+
"/kjy/manager/pass/ques/redConfInfo"
;
public
static
final
String
MANAGER_switchOpen
=
MANAGER_HOST
+
"/kjy/manager/pass/ques/switchOpen"
;
public
static
final
String
ANCHOR_quesRedConf
=
MOBILE_HOST
+
"/clue/pass/ques/red/conf"
;
public
static
final
String
ANCHOR_quesRedDetail
=
MOBILE_HOST
+
"/clue/pass/ques/red/detail"
;
public
static
final
String
ANCHOR_participate
=
MOBILE_HOST
+
"/clue/pass/ques/red/participate"
;
public
static
final
String
ANCHOR_participateResult
=
MOBILE_HOST
+
"/clue/pass/ques/red/participateResult"
;
public
static
final
String
ANCHOR_answer
=
MOBILE_HOST
+
"/clue/pass/ques/red/answer"
;
public
static
final
String
ANCHOR_quesRedList
=
MOBILE_HOST
+
"/clue/pass/ques/red/list"
;
public
static
final
String
ANCHOR_revive
=
MOBILE_HOST
+
"/clue/pass/ques/red/revive"
;
public
static
final
String
ANCHOR_openRed
=
MOBILE_HOST
+
"/clue/pass/ques/red/openRed"
;
public
static
final
String
ANCHOR_redResult
=
MOBILE_HOST
+
"/clue/pass/ques/red/redResult"
;
public
static
final
String
ANCHOR_confInfo
=
MOBILE_HOST
+
"/conf/live/pass/ques/confInfo"
;
public
static
final
String
ANCHOR_quesList
=
MOBILE_HOST
+
"/conf/live/pass/ques/quesList"
;
public
static
final
String
ANCHOR_updateQues
=
MOBILE_HOST
+
"/conf/live/pass/ques/updateQues"
;
public
static
final
String
ANCHOR_openNext
=
MOBILE_HOST
+
"/conf/live/pass/ques/openNext"
;
public
static
final
String
ANCHOR_quesInfo
=
MOBILE_HOST
+
"/conf/live/pass/ques/quesInfo"
;
// *************** 看直播攒现金红包 ***************
public
static
final
String
MANAGER_timeRed
=
MANAGER_HOST
+
"/kjy/manager/live/time/red/saveOrUpdateFirst"
;
...
...
src/test/liveTestNG.xml
View file @
47136cd2
...
...
@@ -114,6 +114,13 @@
</classes>
</test>
<test
preserve-order=
"true"
name=
"闯关答题"
>
<classes>
<class
name=
"com.kjj.cases.live.answer.passQues"
/>
</classes>
</test>
<test
preserve-order=
"true"
name=
"看直播攒现金"
>
<classes>
<class
name=
"com.kjj.cases.live.treasure.TimeRed"
/>
...
...
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