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
2895c2dc
Commit
2895c2dc
authored
Jan 25, 2022
by
龚小红
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改假用户
parent
6af9c7fe
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
6 deletions
+13
-6
GreetingCrad.java
...ava/com/kjj/cases/assistant/markettools/GreetingCrad.java
+1
-1
FlipCard.java
src/test/java/com/kjj/cases/live/flipCard/FlipCard.java
+1
-1
Share.java
src/test/java/com/kjj/cases/live/liveConfig/Share.java
+2
-2
SecondKill.java
src/test/java/com/kjj/cases/live/secondKill/SecondKill.java
+8
-1
BasicConfig.java
src/test/java/com/kjj/config/BasicConfig.java
+1
-1
No files found.
src/test/java/com/kjj/cases/assistant/markettools/GreetingCrad.java
View file @
2895c2dc
...
...
@@ -564,7 +564,7 @@ public class GreetingCrad implements Authorization{
int
redPacketState
=
response
.
jsonPath
().
getInt
(
"data.redPacketState"
);
int
receivedAmount
=
response
.
jsonPath
().
getInt
(
"data.receivedAmount"
);
Assert
.
assertEquals
(
redPacketState
,
3
,
network
.
message
(
params
,
GREETING_openResult
,
"红包领取失败"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
redPacketState
,
2
,
network
.
message
(
params
,
GREETING_openResult
,
"红包领取失败"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
receivedAmount
,
0
,
network
.
message
(
params
,
GREETING_openResult
,
"红包领取金额错误"
,
response
.
body
().
asString
()));
}
...
...
src/test/java/com/kjj/cases/live/flipCard/FlipCard.java
View file @
2895c2dc
...
...
@@ -654,7 +654,7 @@ public class FlipCard implements Authorization {
Response
response2
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_redOpenState
);
System
.
out
.
println
(
response2
.
body
().
asString
());
int
redStatus2
=
response2
.
jsonPath
().
getInt
(
"data.redStatus"
);
Assert
.
assertTrue
(
redStatus2
==
4
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_redOpenState
,
"红包领取状态不对"
,
response2
.
body
().
asString
()));
Assert
.
assertTrue
(
redStatus2
==
2
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_redOpenState
,
"红包领取状态不对"
,
response2
.
body
().
asString
()));
int
redAmount2
=
response2
.
jsonPath
().
getInt
(
"data.redAmount"
);
System
.
out
.
println
(
redAmount2
);
Assert
.
assertTrue
(
redAmount2
==
40
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_redOpenState
,
"红包金额不对"
,
response2
.
body
().
asString
()));
...
...
src/test/java/com/kjj/cases/live/liveConfig/Share.java
View file @
2895c2dc
...
...
@@ -200,7 +200,7 @@ public class Share implements Authorization {
Response
response
=
network
.
postResponse
(
Params
,
BasicConfig
.
MANAGER_saveOrUpdateMpShare
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
System
.
out
.
println
(
data
);
Assert
.
assertTrue
(
data
,
network
.
message
(
Params
,
BasicConfig
.
MOBILE_info
,
"
答题闯关
分享失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
data
,
network
.
message
(
Params
,
BasicConfig
.
MOBILE_info
,
"
亲友券
分享失败"
,
response
.
body
().
asString
()));
Params
.
clear
();
Params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
LIVE_ID
.
getKey
()));
...
...
@@ -208,7 +208,7 @@ public class Share implements Authorization {
response
=
network
.
getResponse
(
Params
,
BasicConfig
.
MANAGER_mpShareList
);
System
.
out
.
println
(
response
.
body
().
asString
());
String
mpShareTitle
=
response
.
jsonPath
().
getString
(
"data[1].mpShareTitle"
);
Assert
.
assertEquals
(
mpShareTitle
,
"亲友抽奖券分享文案"
,
network
.
message
(
Params
,
BasicConfig
.
MANAGER_mpShareList
,
"
答题闯关
配置列表为null"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
mpShareTitle
,
"亲友抽奖券分享文案"
,
network
.
message
(
Params
,
BasicConfig
.
MANAGER_mpShareList
,
"
亲友券
配置列表为null"
,
response
.
body
().
asString
()));
}
}
src/test/java/com/kjj/cases/live/secondKill/SecondKill.java
View file @
2895c2dc
...
...
@@ -13,12 +13,13 @@ import com.kjj.utils.JsonUtil;
import
com.kjj.utils.ThreadSleepUtils
;
import
io.restassured.response.Response
;
import
org.testng.Assert
;
import
org.testng.annotations.AfterTest
;
import
org.testng.annotations.BeforeClass
;
import
org.testng.annotations.Test
;
import
java.util.*
;
import
static
com
.
kjj
.
utils
.
BaseUtils
.
connectSuccess
;
import
static
com
.
kjj
.
utils
.
BaseUtils
.
*
;
import
static
com
.
kjj
.
utils
.
ThreadSleepUtils
.
sleep
;
public
class
SecondKill
implements
Authorization
{
...
...
@@ -37,6 +38,7 @@ public class SecondKill implements Authorization {
//假用户到场
visitorAuto1
();
connectSuccess
();
deleteTestUser
(
5287
);
}
/**
...
...
@@ -1153,6 +1155,11 @@ public class SecondKill implements Authorization {
}
}
@AfterTest
public
void
Tear
(){
insertTestUser
(
5287
);
}
}
src/test/java/com/kjj/config/BasicConfig.java
View file @
2895c2dc
...
...
@@ -87,7 +87,7 @@ public class BasicConfig {
// 基础线代理人 TKU,sid:2991
public
static
String
AGENT_TKU
=
"T3gM31f18jCFEcfTyJdjfJAfSjDmKNMHfH7CvpLDC6UCLbai6Pc41VyJK3bXHe1wg7Hb5FGFZheeLvHjbE"
;
// 基础线访客 TKU---"请勿打扰"
public
static
String
VISITOR_TKU
=
"T3gM31f18jC
GvqvoyJRzyMTdpcPDJWUJJP4VQje7p9sfC4HKmj5NJfCUkxusAyFb5SpkWS31srDTYr6KtV
"
;
public
static
String
VISITOR_TKU
=
"T3gM31f18jC
FYKzgBmWq2dVykia7XxAC7pfxunJPHQ6GF8C9jxgj97YaY5dvsAoBD4B2vrkezsvgm4xgpE
"
;
// 基础线一级邀请访客(Ryan) sid:186
public
static
String
VISITOR1_TKU
=
"2LYYwKJ1AqodGS5GJhJ9UU2CvroNP4oXBdXzWMjCXMZrpHnZQ6GNsAVoiDvyJbaiSVgzJGtkad6EnP4i"
;
// 基础线二级邀请访客(向日葵) sid:207
...
...
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