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
291e23f4
Commit
291e23f4
authored
Apr 21, 2021
by
张艳玲
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
企业指定中奖
parent
5e2ca625
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
11370 additions
and
2500 deletions
+11370
-2500
Pay.java
src/test/java/com/kjj/cases/basics/Pay.java
+0
-8
AdminAuthorization.java
...est/java/com/kjj/cases/live/admin/AdminAuthorization.java
+8
-8
Lottery.java
src/test/java/com/kjj/cases/live/lottery/Lottery.java
+402
-87
LiveLottery.java
src/test/java/com/kjj/cases/live/manager/LiveLottery.java
+4
-2
LotteryRule.java
src/test/java/com/kjj/cases/live/manager/LotteryRule.java
+19
-6
BasicConfig.java
src/test/java/com/kjj/config/BasicConfig.java
+4
-2
report.html
test-output/report.html
+10933
-2387
No files found.
src/test/java/com/kjj/cases/basics/Pay.java
View file @
291e23f4
...
...
@@ -195,13 +195,5 @@ public class Pay {
}
@AfterClass
public
static
void
tearDown
()
throws
IOException
,
InterruptedException
{
apiCount
+=
7
;
//延迟2秒
Thread
.
sleep
(
2000
);
}
}
src/test/java/com/kjj/cases/live/admin/AdminAuthorization.java
View file @
291e23f4
...
...
@@ -27,7 +27,7 @@ public interface AdminAuthorization {
}
/**
* 访客
(嘿保险)授权
* 访客
A(嘿保险)授权,代理人指定中奖用户 ,ID:907
*/
default
void
visitorAuth
()
{
network
.
agentCookies
.
put
(
"authKey"
,
VISITORKEY
);
...
...
@@ -35,7 +35,7 @@ public interface AdminAuthorization {
}
/**
* 访客
(茶仔)授权
* 访客
B(茶仔)授权,用户ID:122
*/
default
void
visitorAuth2
()
{
network
.
agentCookies
.
put
(
"authKey"
,
VISITORKEY2
);
...
...
@@ -43,7 +43,7 @@ public interface AdminAuthorization {
}
/**
* 访客
(刘超)授权
* 访客
C(刘超)授权,用户,用户ID:811
*/
default
void
visitorAuth3
()
{
network
.
agentCookies
.
put
(
"authKey"
,
VISITORKEY3
);
...
...
@@ -51,14 +51,14 @@ public interface AdminAuthorization {
}
/**
* 访客
(周成)授权
* 访客
D(李执)授权,用户ID:89
*/
default
void
visitorAuth4
()
{
network
.
agentCookies
.
put
(
"authKey"
,
VISITORKEY4
);
System
.
out
.
println
(
"用户AUTH_KEY:"
+
VISITORKEY4
);
}
/**
* 访客
(周成)授权,企业指定中奖用户
* 访客
E(周成)授权,企业指定中奖用户,用户ID:812
*/
default
void
visitorAuth5
()
{
network
.
agentCookies
.
put
(
"authKey"
,
VISITORKEY5
);
...
...
@@ -66,7 +66,7 @@ public interface AdminAuthorization {
}
/**
* 访客
(新强)授权
* 访客
F(新强)授权,区域指定中奖用户,ID:82
*/
default
void
visitorAuth6
()
{
network
.
agentCookies
.
put
(
"authKey"
,
VISITORKEY6
);
...
...
@@ -74,7 +74,7 @@ public interface AdminAuthorization {
}
/**
* 访客
(熊二)授权
* 访客
G(熊二)授权,黑名单用户,ID:719
*/
default
void
visitorAuth7
()
{
network
.
agentCookies
.
put
(
"authKey"
,
VISITORKEY7
);
...
...
@@ -82,7 +82,7 @@ public interface AdminAuthorization {
}
/**
* 访客(喜洋洋)授权
* 访客
H
(喜洋洋)授权
*/
default
void
visitorAuth8
()
{
network
.
agentCookies
.
put
(
"authKey"
,
VISITORKEY8
);
...
...
src/test/java/com/kjj/cases/live/lottery/Lottery.java
View file @
291e23f4
This diff is collapsed.
Click to expand it.
src/test/java/com/kjj/cases/live/manager/LiveLottery.java
View file @
291e23f4
...
...
@@ -48,7 +48,7 @@ public class LiveLottery implements AdminAuthorization {
}
@Test
(
description
=
"获取导入任务结果"
,
priority
=
3
)
public
void
获取导入任务结果
()
{
public
void
获取导入任务结果
()
throws
InterruptedException
{
Map
<
String
,
Object
>
resultParam
=
new
HashMap
<>();
resultParam
.
put
(
"taskId"
,
taskId
);
Response
response
=
null
;
...
...
@@ -57,6 +57,7 @@ public class LiveLottery implements AdminAuthorization {
boolean
hasFinish
=
response
.
jsonPath
().
getBoolean
(
"data.hasFinish"
);
System
.
out
.
println
(
hasFinish
);
if
(
hasFinish
)
return
;
Thread
.
sleep
(
500
);
}
Assert
.
fail
(
network
.
message
(
resultParam
,
BasicConfig
.
MANAGER_result
,
"获取导入任务结果失败"
,
response
.
body
().
asString
()));
}
...
...
@@ -77,9 +78,10 @@ public class LiveLottery implements AdminAuthorization {
public
void
上传新的企业指定中奖名单
()
{
Map
<
String
,
Object
>
importParam
=
new
HashMap
<>();
importParam
.
put
(
"confId"
,
confId
);
importParam
.
put
(
"excelUrl"
,
"https://yun.dui88.com/kjy/media/file/2021042
0/51716f59605424332f50a26f0a5d531f
.xlsx"
);
importParam
.
put
(
"excelUrl"
,
"https://yun.dui88.com/kjy/media/file/2021042
1/14cfc6260713bc97e7cd6a9b27b0e763
.xlsx"
);
importParam
.
put
(
"fileName"
,
"指定中奖名单"
);
Response
response
=
network
.
postResponse
(
importParam
,
BasicConfig
.
MANAGER_import
);
System
.
out
.
println
(
response
);
taskId
=
response
.
jsonPath
().
getInt
(
"data"
);
System
.
out
.
println
(
taskId
);
Assert
.
assertNotNull
(
taskId
,
network
.
message
(
importParam
,
BasicConfig
.
MANAGER_import
,
"上传企业指定中奖名单失败"
,
response
.
body
().
asString
()));
...
...
src/test/java/com/kjj/cases/live/manager/LotteryRule.java
View file @
291e23f4
...
...
@@ -96,20 +96,33 @@ public class LotteryRule implements AdminAuthorization {
RuleBean
save
=
new
RuleBean
();
save
.
setProvinceCode
(
110000
);
save
.
setCityCode
(
null
);
save
.
setTotalNum
(
1
0
);
save
.
setTotalNum
(
4
0
);
Rule
.
add
(
save
);
RuleBean
save1
=
new
RuleBean
();
save1
.
setProvinceCode
(
3
3
0000
);
save1
.
setProvinceCode
(
3
5
0000
);
save1
.
setCityCode
(
null
);
save1
.
setTotalNum
(
9
0
);
save1
.
setTotalNum
(
4
0
);
Rule
.
add
(
save1
);
RuleBean
save2
=
new
RuleBean
();
save2
.
setProvinceCode
(
3
3
0000
);
save2
.
setCityCode
(
3
301
00
);
save2
.
setTotalNum
(
9
0
);
save2
.
setProvinceCode
(
3
5
0000
);
save2
.
setCityCode
(
3
502
00
);
save2
.
setTotalNum
(
4
0
);
Rule
.
add
(
save2
);
RuleBean
save3
=
new
RuleBean
();
save3
.
setProvinceCode
(
420000
);
save3
.
setCityCode
(
null
);
save3
.
setTotalNum
(
20
);
Rule
.
add
(
save3
);
RuleBean
save4
=
new
RuleBean
();
save4
.
setProvinceCode
(
420000
);
save4
.
setCityCode
(
420900
);
save4
.
setTotalNum
(
20
);
Rule
.
add
(
save4
);
saveParam
.
put
(
"list"
,
Rule
);
Response
response
=
network
.
postResponse
(
saveParam
,
BasicConfig
.
MANAGER_save
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
...
...
src/test/java/com/kjj/config/BasicConfig.java
View file @
291e23f4
...
...
@@ -18,10 +18,12 @@ public class BasicConfig {
public
static
String
VISITORKEY2
=
"zFNkBc7JtvLPL6ifAfXbcgYH7WrugVmhv4CXQVq1CN1Y2C8pcBXoPvUPFbkWj7HbdkFpe4oX6SLjczK3ruYpQ8EaQ5"
;
//直播访客 (刘超)
public
static
String
VISITORKEY3
=
"LEH7epeHVDJWzhZ6DiexTHnsaP3ed5NWb7fwGDRPzUCcfxMKyEZr5fYSmKv5AZVQu1w2FRoEvz6mP3RzfeKLqjV8Kq1XE"
;
//直播访客 (李执)
public
static
String
VISITORKEY4
=
"5MgSyboxqzAQZZJEsTf43nVX8FkunrWfgVgxhR9mmo6thaPjMjfgUM62TrCUYvnSdn3kTGsGvJsSaiS4m5LS1up5twWa"
;
//直播访客 (志勇)
public
static
String
VISITORKEY
4
=
"zFNkBc7JtvLPL6ifAfXbcgYH7WruadyTs58VQNVezBEHURWFkb861yA3TQfkngLojnBnDenawiYNbNADYRdv1vFcDi"
;
public
static
String
VISITORKEY
9
=
"zFNkBc7JtvLPL6ifAfXbcgYH7WruadyTs58VQNVezBEHURWFkb861yA3TQfkngLojnBnDenawiYNbNADYRdv1vFcDi"
;
//直播访客 (周成)
public
static
String
VISITORKEY5
=
"
zFNkBc7JtvLPL6ifAfXbcgYH7WruadzDMUjR7buv4kTkfKtxsjyzHLTi7V9HNnQ7ia7Reb5rk5k11dFQPNSuMzsEMW
"
;
public
static
String
VISITORKEY5
=
"
LEH7epeHVDJWzhZ6DiexTHnsy28uMFcnMj6a1Nh76ZtqrBohi2vbvjsoksZjyRcqFdSgh5zddoi95S8gKvBbuggy6Bhku
"
;
//直播访客 (新强)
public
static
String
VISITORKEY6
=
"DyGoVEPj7nANppy7P8NS4Z4v3PAwxeqJodqYrmwYkoHYMsV4yAxbTXwZ5wWmGQTddQgxdWoNCmN43P8fzhcuWRmdE"
;
//直播访客 (熊二)
...
...
test-output/report.html
View file @
291e23f4
This diff is collapsed.
Click to expand it.
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