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
49c59422
Commit
49c59422
authored
Feb 23, 2022
by
龚小红
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'Feature/20210222-gxh' into 'master'
修改变量名称 See merge request test-group/kejiji!225
parents
325fc96b
077dc6e8
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
39 additions
and
23 deletions
+39
-23
Test.xml
src/test/Test.xml
+29
-5
Authorization.java
src/test/java/com/kjj/cases/admin/Authorization.java
+4
-5
ConnectLive.java
src/test/java/com/kjj/cases/live/liveConfig/ConnectLive.java
+1
-1
LiveBinding.java
src/test/java/com/kjj/cases/live/liveConfig/LiveBinding.java
+1
-5
SecondKill.java
src/test/java/com/kjj/cases/live/secondKill/SecondKill.java
+2
-5
BasicConfig.java
src/test/java/com/kjj/config/BasicConfig.java
+2
-2
No files found.
src/test/Test.xml
View file @
49c59422
...
@@ -4,21 +4,45 @@
...
@@ -4,21 +4,45 @@
<!-->专用于自测</!-->
<!-->专用于自测</!-->
<test
preserve-order=
"true"
name=
"直播素材"
>
<classes>
<class
name=
"com.kjj.cases.live.liveConfig.LiveMaterial"
/>
</classes>
</test>
<test
preserve-order=
"true"
name=
"创建直播"
>
<test
preserve-order=
"true"
name=
"创建直播"
>
<classes>
<classes>
<class
name=
"com.kjj.cases.live.liveConfig.SimpleLive"
/>
<class
name=
"com.kjj.cases.live.liveConfig.SaveLive"
/>
</classes>
</test>
<test
preserve-order=
"true"
name=
"配置秒杀轮次及秒杀预告"
>
<classes>
<class
name=
"com.kjj.cases.live.secondKill.ConfSecondKill"
/>
</classes>
</test>
<test
preserve-order=
"true"
name=
"绑定关系绑定"
>
<classes>
<class
name=
"com.kjj.cases.live.liveConfig.LiveBinding"
/>
</classes>
</test>
<test
preserve-order=
"true"
name=
"助播-开启直播"
>
<classes>
<class
name=
"com.kjj.cases.live.anchor.OpenLive"
/>
</classes>
</classes>
</test>
</test>
<test
preserve-order=
"true"
name=
"
配置代理人赠送秒杀优惠券
"
>
<test
preserve-order=
"true"
name=
"
秒杀到场
"
>
<classes>
<classes>
<class
name=
"com.kjj.cases.live.
secondKill.VoucherConf
"
/>
<class
name=
"com.kjj.cases.live.
liveConfig.ConnectLive
"
/>
</classes>
</classes>
</test>
</test>
<test
preserve-order=
"true"
name=
"
代理人赠送秒杀优惠券并用户使用代金券
"
>
<test
preserve-order=
"true"
name=
"
秒杀互动
"
>
<classes>
<classes>
<class
name=
"com.kjj.cases.live.secondKill.
Voucher
"
/>
<class
name=
"com.kjj.cases.live.secondKill.
SecondKill
"
/>
</classes>
</classes>
</test>
</test>
...
...
src/test/java/com/kjj/cases/admin/Authorization.java
View file @
49c59422
...
@@ -298,10 +298,9 @@ public interface Authorization {
...
@@ -298,10 +298,9 @@ public interface Authorization {
System
.
out
.
println
(
"用户AUTH_KEY:"
+
visitorAuth30
);
System
.
out
.
println
(
"用户AUTH_KEY:"
+
visitorAuth30
);
}
}
//自动化假用户
// 用户ID:81
// 用户ID:4054
default
void
visitorAuth31
()
{
default
void
visitorAuto1
()
{
network
.
agentCookies
.
put
(
"authKey"
,
visitorAuth31
);
network
.
agentCookies
.
put
(
"authKey"
,
visitorAuto1
);
System
.
out
.
println
(
"用户AUTH_KEY:"
+
visitorAuth31
);
System
.
out
.
println
(
"用户AUTH_KEY:"
+
visitorAuto1
);
}
}
}
}
src/test/java/com/kjj/cases/live/liveConfig/ConnectLive.java
View file @
49c59422
...
@@ -18,7 +18,7 @@ public class ConnectLive implements Authorization {
...
@@ -18,7 +18,7 @@ public class ConnectLive implements Authorization {
visitorAuth1
();
visitorAuth1
();
connectSuccess
();
connectSuccess
();
visitorAut
o
1
();
visitorAut
h3
1
();
connectSuccess
();
connectSuccess
();
visitorAuth7
();
visitorAuth7
();
...
...
src/test/java/com/kjj/cases/live/liveConfig/LiveBinding.java
View file @
49c59422
...
@@ -13,10 +13,6 @@ import org.testng.annotations.Test;
...
@@ -13,10 +13,6 @@ import org.testng.annotations.Test;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.Map
;
import
java.util.Map
;
import
static
com
.
kjj
.
config
.
BasicConfig
.
MOBILE_binding
;
import
static
com
.
kjj
.
config
.
BasicConfig
.
MOBILE_sign
;
import
static
com
.
kjj
.
utils
.
ThreadSleepUtils
.
sleep
;
public
class
LiveBinding
implements
Authorization
{
public
class
LiveBinding
implements
Authorization
{
@BeforeClass
@BeforeClass
...
@@ -147,7 +143,7 @@ public class LiveBinding implements Authorization {
...
@@ -147,7 +143,7 @@ public class LiveBinding implements Authorization {
binding
(
this
.
shareSign
);;
binding
(
this
.
shareSign
);;
token
();
token
();
visitorAut
o
1
();
visitorAut
h3
1
();
binding
(
this
.
shareSign
);;
binding
(
this
.
shareSign
);;
token
();
token
();
...
...
src/test/java/com/kjj/cases/live/secondKill/SecondKill.java
View file @
49c59422
package
com
.
kjj
.
cases
.
live
.
secondKill
;
package
com
.
kjj
.
cases
.
live
.
secondKill
;
import
com.kjj.bean.agent.GrabWelfares
;
import
com.kjj.bean.resources.ResourceForm
;
import
com.kjj.bean.resources.ResourceForm
;
import
com.kjj.bean.secondKill.AnchorGetSKList
;
import
com.kjj.bean.secondKill.AnchorGetSKList
;
import
com.kjj.bean.secondKill.KillGoods
;
import
com.kjj.bean.secondKill.KillGoods
;
...
@@ -13,8 +12,6 @@ import com.kjj.utils.JsonUtil;
...
@@ -13,8 +12,6 @@ import com.kjj.utils.JsonUtil;
import
com.kjj.utils.ThreadSleepUtils
;
import
com.kjj.utils.ThreadSleepUtils
;
import
io.restassured.response.Response
;
import
io.restassured.response.Response
;
import
org.testng.Assert
;
import
org.testng.Assert
;
import
org.testng.annotations.AfterClass
;
import
org.testng.annotations.AfterTest
;
import
org.testng.annotations.BeforeClass
;
import
org.testng.annotations.BeforeClass
;
import
org.testng.annotations.Test
;
import
org.testng.annotations.Test
;
...
@@ -37,7 +34,7 @@ public class SecondKill implements Authorization {
...
@@ -37,7 +34,7 @@ public class SecondKill implements Authorization {
public
void
setUp
(){
public
void
setUp
(){
BaseUtils
.
ssoLogin
();
BaseUtils
.
ssoLogin
();
//到场
//到场
visitorAut
o
1
();
visitorAut
h3
1
();
connectSuccess
();
connectSuccess
();
agentAuth2
();
agentAuth2
();
...
@@ -940,7 +937,7 @@ public class SecondKill implements Authorization {
...
@@ -940,7 +937,7 @@ public class SecondKill implements Authorization {
//用于退款
//用于退款
@Test
(
description
=
"用户成功支付_待退款"
,
priority
=
47
)
@Test
(
description
=
"用户成功支付_待退款"
,
priority
=
47
)
public
void
用户成功支付
_
待退款
()
{
public
void
用户成功支付
_
待退款
()
{
visitorAut
o
1
();
visitorAut
h3
1
();
// 新建订单
// 新建订单
Map
<
String
,
Object
>
orderPar
=
new
HashMap
<>();
Map
<
String
,
Object
>
orderPar
=
new
HashMap
<>();
orderPar
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
orderPar
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
...
...
src/test/java/com/kjj/config/BasicConfig.java
View file @
49c59422
...
@@ -10,8 +10,6 @@ public class BasicConfig {
...
@@ -10,8 +10,6 @@ public class BasicConfig {
/**
/**
* 直播账号授权key
* 直播账号授权key
*/
*/
//自动化假用户 UserID:4055 ,liveUserID;81
public
static
String
visitorAuto1
=
"5MgSyboxqzAQZZJEsTf43nVX4vbZ5hG86sgJ5fSN7NzKxCH5WfE2XDHGMFm785nWo1pHKu5V5GPuQZHz3AfUEPenT5jh"
;
//直播管理员(吉吉)
//直播管理员(吉吉)
public
static
String
ADMIN_KEY
=
"zFNkBc7JtvLPL6ifAfXbcgXf7k8AofD7jRHCDreREzhP8iW4bahfqRFePosTb9G6ESGPwScVFCQyuZBcc4brtRfaNz"
;
public
static
String
ADMIN_KEY
=
"zFNkBc7JtvLPL6ifAfXbcgXf7k8AofD7jRHCDreREzhP8iW4bahfqRFePosTb9G6ESGPwScVFCQyuZBcc4brtRfaNz"
;
...
@@ -81,6 +79,8 @@ public class BasicConfig {
...
@@ -81,6 +79,8 @@ public class BasicConfig {
public
static
String
visitorAuth29
=
"LEH7epeHVDJWzhZ6DiexTHnserXQHCtM8rNeniNbC71CxsgmmfFgGJ7aKtkJ7LiLe759DtAzp1miMwGP2GVPK6BrD8hgR"
;
public
static
String
visitorAuth29
=
"LEH7epeHVDJWzhZ6DiexTHnserXQHCtM8rNeniNbC71CxsgmmfFgGJ7aKtkJ7LiLe759DtAzp1miMwGP2GVPK6BrD8hgR"
;
//直播访客 (袁静怡)ID:1470
//直播访客 (袁静怡)ID:1470
public
static
String
visitorAuth30
=
"2Tsc8MwHZmXJKPfze38rXm37Ua5bBkXUECt1BQhT2U2csy4dyb7wA2YMxV7aSRVhXXWFyZqrNgBSreXUWbnYnVqd5xsvBAX"
;
public
static
String
visitorAuth30
=
"2Tsc8MwHZmXJKPfze38rXm37Ua5bBkXUECt1BQhT2U2csy4dyb7wA2YMxV7aSRVhXXWFyZqrNgBSreXUWbnYnVqd5xsvBAX"
;
//直播访客 (大同)ID:81
public
static
String
visitorAuth31
=
"5MgSyboxqzAQZZJEsTf43nVX4vbZ5hG86sgJ5fSN7NzKxCH5WfE2XDHGMFm785nWo1pHKu5V5GPuQZHz3AfUEPenT5jh"
;
/**
/**
...
...
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