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
16148d6f
Commit
16148d6f
authored
Jan 27, 2022
by
龚小红
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更换秒杀中代理人用户,作为真实用户实现下单成功,超时返回库存
parent
1882fd75
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
28 additions
and
20 deletions
+28
-20
Authorization.java
src/test/java/com/kjj/cases/admin/Authorization.java
+10
-4
Pay.java
src/test/java/com/kjj/cases/assistant/pay/Pay.java
+1
-2
ConnectLive.java
src/test/java/com/kjj/cases/live/liveConfig/ConnectLive.java
+3
-1
LiveBinding.java
src/test/java/com/kjj/cases/live/liveConfig/LiveBinding.java
+3
-0
SaveLive.java
src/test/java/com/kjj/cases/live/liveConfig/SaveLive.java
+3
-1
ConfSecondKill.java
...st/java/com/kjj/cases/live/secondKill/ConfSecondKill.java
+0
-3
SecondKill.java
src/test/java/com/kjj/cases/live/secondKill/SecondKill.java
+5
-8
BasicConfig.java
src/test/java/com/kjj/config/BasicConfig.java
+3
-1
No files found.
src/test/java/com/kjj/cases/admin/Authorization.java
View file @
16148d6f
package
com
.
kjj
.
cases
.
admin
;
import
com.kjj.utils.BaseUtils
;
import
com.kjj.utils.NetworkUtils
;
import
static
com
.
kjj
.
config
.
BasicConfig
.*;
...
...
@@ -101,11 +100,18 @@ public interface Authorization {
}
//代理人(
小疙瘩人寿)授权,ID:995
//代理人(
陈家梦)授权,ID:210
default
void
agentAuth1
(){
// 创建用户 并传到network里
network
.
agentCookies
.
put
(
"authKey"
,
agentAuth
);
System
.
out
.
println
(
"用户AUTH_KEY:"
+
agentAuth
);
network
.
agentCookies
.
put
(
"authKey"
,
agentAuth1
);
System
.
out
.
println
(
"用户AUTH_KEY:"
+
agentAuth1
);
}
//代理人(陈正茜)授权,ID:282
default
void
agentAuth2
(){
// 创建用户 并传到network里
network
.
agentCookies
.
put
(
"authKey"
,
agentAuth2
);
System
.
out
.
println
(
"用户AUTH_KEY:"
+
agentAuth2
);
}
//访客A(志勇)授权,代理人指定中奖用户,ID:107
...
...
src/test/java/com/kjj/cases/assistant/pay/Pay.java
View file @
16148d6f
package
com
.
kjj
.
cases
.
assistant
.
pay
;
import
static
com
.
kjj
.
config
.
BasicConfig
.*;
import
static
com
.
kjj
.
utils
.
BaseUtils
.
tku1
;
import
static
com
.
kjj
.
utils
.
BaseUtils
.
updateTypeOrDate
;
import
static
com
.
kjj
.
utils
.
BaseUtils
.*;
import
static
com
.
kjj
.
utils
.
ThreadSleepUtils
.
sleep
;
import
com.kjj.cases.admin.Authorization
;
...
...
src/test/java/com/kjj/cases/live/liveConfig/ConnectLive.java
View file @
16148d6f
...
...
@@ -12,6 +12,9 @@ public class ConnectLive implements Authorization {
agentAuth
();
connectSuccess
();
agentAuth2
();
connectSuccess
();
visitorAuth1
();
connectSuccess
();
...
...
@@ -23,6 +26,5 @@ public class ConnectLive implements Authorization {
visitorAuth9
();
connectSuccess
();
}
}
src/test/java/com/kjj/cases/live/liveConfig/LiveBinding.java
View file @
16148d6f
...
...
@@ -66,6 +66,9 @@ public class LiveBinding implements Authorization {
agentAuth1
();
binding
(
this
.
shareSign
);;
agentAuth2
();
binding
(
this
.
shareSign
);;
}
@Test
(
description
=
"代理人A分享直播间"
,
priority
=
2
)
...
...
src/test/java/com/kjj/cases/live/liveConfig/SaveLive.java
View file @
16148d6f
...
...
@@ -23,6 +23,7 @@ import org.testng.annotations.Test;
import
java.util.*
;
import
static
com
.
kjj
.
utils
.
BaseUtils
.
deleteTestUser
;
import
static
com
.
kjj
.
utils
.
BaseUtils
.
ssoLogin
;
public
class
SaveLive
implements
Authorization
{
...
...
@@ -36,7 +37,8 @@ public class SaveLive implements Authorization {
@BeforeClass
public
void
setUp
()
{
ssoLogin
();
}
ssoLogin
();
}
/**
* 创建直播
...
...
src/test/java/com/kjj/cases/live/secondKill/ConfSecondKill.java
View file @
16148d6f
...
...
@@ -19,9 +19,6 @@ import java.util.HashMap;
import
java.util.List
;
import
java.util.Map
;
import
static
com
.
kjj
.
config
.
BasicConfig
.
MOBILE_allLottery
;
import
static
com
.
kjj
.
config
.
BasicConfig
.
agentAuth
;
public
class
ConfSecondKill
implements
Authorization
{
private
final
long
companyId
=
101
;
...
...
src/test/java/com/kjj/cases/live/secondKill/SecondKill.java
View file @
16148d6f
...
...
@@ -36,10 +36,12 @@ public class SecondKill implements Authorization {
@BeforeClass
public
void
setUp
(){
BaseUtils
.
ssoLogin
();
//
假用户
到场
//到场
visitorAuto1
();
connectSuccess
();
deleteTestUser
(
5287
);
agentAuth2
();
connectSuccess
();
}
/**
...
...
@@ -597,7 +599,7 @@ public class SecondKill implements Authorization {
@Test
(
description
=
"代理人成功下单-占用库存"
,
priority
=
29
)
public
void
代理人成功下单
()
{
agentAuth
();
agentAuth
2
();
// 下单
Map
<
String
,
Object
>
orderPar
=
new
HashMap
<>();
orderPar
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
...
...
@@ -1156,11 +1158,6 @@ public class SecondKill implements Authorization {
}
}
@AfterClass
public
void
Tear
(){
insertTestUser
(
5287
);
}
}
src/test/java/com/kjj/config/BasicConfig.java
View file @
16148d6f
...
...
@@ -18,7 +18,9 @@ public class BasicConfig {
// 直播代理人 (艳玲)ID:826
public
static
String
AUTH_KEY
=
"LEH7epeHVDJWzhZ6DiexTHnfZVkhkqorGGQahRCuzyKj3hQkSYMpkYma5RmZHQAbv8fiPzFX5BgoJgjF2gUVz175wz3dY"
;
// 直播代理人 (陈家梦)ID:210
public
static
String
agentAuth
=
"LEH7epeHVDJWzhZ6DiexTHnserXQHEH2m81qW19iFaHnxksF9ujtq2D5q2yNrSJvXtWdBXjNTVa2KvbDj4Mpbs2Kc3LUf"
;
public
static
String
agentAuth1
=
"LEH7epeHVDJWzhZ6DiexTHnserXQHEH2m81qW19iFaHnxksF9ujtq2D5q2yNrSJvXtWdBXjNTVa2KvbDj4Mpbs2Kc3LUf"
;
// 直播代理人 (陈正茜)ID:282
public
static
String
agentAuth2
=
"LEH7epeHVDJWzhZ6DiexTHnseov3LSnFErGisxDcRejf1z9JQuHY2DztyaR9QD8XYk53YCfMVvVtFuLXmQzmESFUqDJW8"
;
//直播访客 (随波逐流)ID:343
public
static
String
visitorAuth
=
"LEH7epeHVDJWzhZ6DiexTHnserXQHEuKCxVgdZuBLF7iVyUDgnmQWGD8hwPhJQr1XHoGAvgv1ufg9N11YubEfdG3K7cC7"
;
//直播访客 (Porco)ID:101
...
...
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