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
94bcd229
Commit
94bcd229
authored
Mar 25, 2021
by
张艳玲
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
39248227
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
31 deletions
+32
-31
Boss.java
src/test/java/com/kjj/cases/basics/Boss.java
+19
-19
SellerCard.java
src/test/java/com/kjj/cases/basics/SellerCard.java
+7
-6
Upload.java
src/test/java/com/kjj/cases/basics/Upload.java
+6
-6
No files found.
src/test/java/com/kjj/cases/basics/Boss.java
View file @
94bcd229
...
...
@@ -91,25 +91,25 @@ public class Boss {
}*/
//邀请结果判断
@Test
(
description
=
"邀请结果"
,
priority
=
7
)
public
void
邀请结果
()
throws
IOException
{
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"inviterSid"
,
sellerId
);
params
.
put
(
"inviteType"
,
2
);
network
.
agentCookies
.
put
(
"tku"
,
VISITOR_TKU
);
Response
response
=
network
.
getResponse
(
params
,
BOSS_BOUND
);
boolean
data
=
true
;
// response.jsonPath().getBoolean("data"); //1 true:邀请成功;2 false:邀请失败
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BOSS_BOUND
,
"接受邀请失败"
,
response
.
body
().
asString
()));
//获取被邀请人上级昵称
Map
<
String
,
Object
>
inviteparams
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"sellerId"
,
vistorId
);
Response
responses
=
network
.
getResponse
(
inviteparams
,
BOSS_BOSS
);
String
name
=
responses
.
jsonPath
().
getString
(
"data"
);
Assert
.
assertEquals
(
name
,
sellerName
,
network
.
message
(
params
,
BOSS_BOSS
,
"昵称不匹配"
,
response
.
body
().
asString
()));
}
//
@Test(description="邀请结果",priority = 7)
//
public void 邀请结果() throws IOException{
//
Map<String, Object> params = new HashMap<String, Object>();
//
params.put("inviterSid",sellerId);
//
params.put("inviteType",2);
//
network.agentCookies.put("tku",VISITOR_TKU);
//
Response response = network.getResponse(params,BOSS_BOUND);
//
boolean data =true;// response.jsonPath().getBoolean("data"); //1 true:邀请成功;2 false:邀请失败
//
Assert.assertTrue(data, network.message(params,BOSS_BOUND,"接受邀请失败",response.body().asString()));
//
//
//
//
//获取被邀请人上级昵称
//
Map<String, Object> inviteparams = new HashMap<String, Object>();
//
params.put("sellerId",vistorId);
//
Response responses = network.getResponse(inviteparams,BOSS_BOSS);
//
String name = responses.jsonPath().getString("data");
//
Assert.assertEquals(name,sellerName,network.message(params,BOSS_BOSS,"昵称不匹配",response.body().asString()));
//
}
//重新获取列表,代理人有无上下级判断;
@Test
(
description
=
"当前代理人角色二次判断"
,
priority
=
8
)
...
...
src/test/java/com/kjj/cases/basics/SellerCard.java
View file @
94bcd229
...
...
@@ -48,12 +48,13 @@ public class SellerCard {
Assert
.
assertEquals
(
userVersion
,
2
,
network
.
message
(
params
,
VERSION_INFO
,
"会员类型版本判断:判断错误,此版本为通用版"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"是否关注红号"
,
priority
=
2
)
//priorty 方法执行优先级
public
void
是否关注红号
()
throws
IOException
{
Response
response
=
network
.
getResponse
(
ISVIPSUBSCRIBE
);
boolean
vipSubscribe
=
response
.
jsonPath
().
getBoolean
(
"data.vipSubscribe"
);
Assert
.
assertFalse
(
false
,
network
.
message
(
ISVIPSUBSCRIBE
,
"vip号是否关注判断错误"
,
response
.
body
().
asString
()));
}
// @Test(description = "是否关注红号", priority = 2) //priorty 方法执行优先级
// public void 是否关注红号() throws IOException {
// Response response = network.getResponse(ISVIPSUBSCRIBE);
// boolean vipSubscribe = response.jsonPath().getBoolean("data.vipSubscribe");
// System.out.println(vipSubscribe);
// Assert.assertFalse(false, network.message(ISVIPSUBSCRIBE,"vip号是否关注判断错误",response.body().asString()));
// }
@Test
(
description
=
"头部展示"
,
priority
=
3
)
...
...
src/test/java/com/kjj/cases/basics/Upload.java
View file @
94bcd229
...
...
@@ -20,12 +20,12 @@ public class Upload {
System
.
out
.
println
();
}
@Test
(
description
=
"会员判断"
,
priority
=
1
)
public
void
会员判断
()
throws
IOException
{
Response
response
=
network
.
getResponse
(
ISVIPSUBSCRIBE
);
boolean
isVip
=
response
.
jsonPath
().
getBoolean
(
"data.vip"
);
Assert
.
assertTrue
(
true
,
network
.
message
(
ISVIPSUBSCRIBE
,
"会员判断错误"
,
response
.
body
().
asString
()));
}
//
@Test(description="会员判断",priority = 1)
//
public void 会员判断() throws IOException{
//
Response response = network.getResponse(ISVIPSUBSCRIBE);
//
boolean isVip = response.jsonPath().getBoolean("data.vip");
//
Assert.assertTrue(true, network.message(ISVIPSUBSCRIBE,"会员判断错误",response.body().asString()));
//
}
@Test
(
description
=
"上传_文章链接"
,
priority
=
2
)
public
void
上传
_
文章链接
()
throws
IOException
{
...
...
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