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
390d6a1a
Commit
390d6a1a
authored
Jul 20, 2021
by
张艳玲
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
翻牌集字提交
parent
76faf9e9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
41 deletions
+27
-41
WhoSawMe.java
src/test/java/com/kjj/cases/assistant/whoSawMe/WhoSawMe.java
+1
-10
LiveLater.java
src/test/java/com/kjj/cases/live/agent/LiveLater.java
+21
-7
wechatTestNG.xml
src/test/wechatTestNG.xml
+5
-24
No files found.
src/test/java/com/kjj/cases/assistant/whoSawMe/WhoSawMe.java
View file @
390d6a1a
...
@@ -93,16 +93,7 @@ public class WhoSawMe implements Authorization {
...
@@ -93,16 +93,7 @@ public class WhoSawMe implements Authorization {
Assert
.
assertEquals
(
userVersion
,
"2"
,
network
.
message
(
BasicConfig
.
USING_VERSION
,
"代理人当前使用版本错误,实际为2.保险专业版"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
userVersion
,
"2"
,
network
.
message
(
BasicConfig
.
USING_VERSION
,
"代理人当前使用版本错误,实际为2.保险专业版"
,
response
.
body
().
asString
()));
}
}
// 判断是否今日首次进入
@Test
(
description
=
"判断是否今日首次进入"
,
priority
=
5
)
public
void
判断是否今日首次进入
()
throws
IOException
{
// 判断是否今日首次进入
response
=
network
.
getResponse
(
BasicConfig
.
DAILY_FIRST
);
Object
data
=
response
.
jsonPath
().
getJsonObject
(
"data"
);
Boolean
needShow
=
response
.
jsonPath
().
getBoolean
(
"data.needShow"
);
Assert
.
assertNotNull
(
data
,
network
.
message
(
BasicConfig
.
DAILY_FIRST
,
"判断是否今日首次进入失败,data字段为空"
,
response
.
body
().
asString
()));
Assert
.
assertNotNull
(
needShow
,
network
.
message
(
BasicConfig
.
DAILY_FIRST
,
"判断是否今日首次进入失败,data.needShow字段为空"
,
response
.
body
().
asString
()));
}
// 判断是否展示续费弹窗
// 判断是否展示续费弹窗
@Test
(
description
=
"判断是否展示续费弹窗"
,
priority
=
6
)
@Test
(
description
=
"判断是否展示续费弹窗"
,
priority
=
6
)
...
...
src/test/java/com/kjj/cases/live/agent/LiveLater.java
View file @
390d6a1a
...
@@ -127,7 +127,7 @@ public class LiveLater implements Authorization {
...
@@ -127,7 +127,7 @@ public class LiveLater implements Authorization {
Object
data
=
response
.
jsonPath
().
getJsonObject
(
"data"
);
Object
data
=
response
.
jsonPath
().
getJsonObject
(
"data"
);
System
.
out
.
println
(
data
);
System
.
out
.
println
(
data
);
long
totalCount
=
response
.
jsonPath
().
getLong
(
"data.totalCount"
);
long
totalCount
=
response
.
jsonPath
().
getLong
(
"data.totalCount"
);
Assert
.
assertTrue
(
totalCount
==
3
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_ClueList
,
"直接邀请线索数量不对"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
totalCount
>
0
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_ClueList
,
"直接邀请线索数量不对"
,
response
.
body
().
asString
()));
}
}
...
@@ -161,7 +161,7 @@ public class LiveLater implements Authorization {
...
@@ -161,7 +161,7 @@ public class LiveLater implements Authorization {
Object
data
=
response
.
jsonPath
().
getJsonObject
(
"data"
);
Object
data
=
response
.
jsonPath
().
getJsonObject
(
"data"
);
System
.
out
.
println
(
data
);
System
.
out
.
println
(
data
);
long
totalCount
=
response
.
jsonPath
().
getLong
(
"data.totalCount"
);
long
totalCount
=
response
.
jsonPath
().
getLong
(
"data.totalCount"
);
Assert
.
assertTrue
(
totalCount
==
7
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_ClueList
,
"中奖线索数量不对"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
totalCount
>
0
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_ClueList
,
"中奖线索数量不对"
,
response
.
body
().
asString
()));
...
@@ -225,7 +225,6 @@ public class LiveLater implements Authorization {
...
@@ -225,7 +225,6 @@ public class LiveLater implements Authorization {
// params.put("liveId","Kj21MzYyNjM");
// params.put("liveId","Kj21MzYyNjM");
params
.
put
(
"liveUserId"
,
this
.
liveUserId
.
get
(
0
).
getLiveUserId
());
params
.
put
(
"liveUserId"
,
this
.
liveUserId
.
get
(
0
).
getLiveUserId
());
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_getClueDetail
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_getClueDetail
);
Object
data
=
response
.
jsonPath
().
getJsonObject
(
"data"
);
System
.
out
.
println
(
response
.
body
().
asString
());
System
.
out
.
println
(
response
.
body
().
asString
());
int
visitorInviteNum
=
response
.
jsonPath
().
getInt
(
"data.visitorInviteNum"
);
int
visitorInviteNum
=
response
.
jsonPath
().
getInt
(
"data.visitorInviteNum"
);
Assert
.
assertTrue
(
visitorInviteNum
==
1
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_getClueDetail
,
"访客邀请数不对"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
visitorInviteNum
==
1
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_getClueDetail
,
"访客邀请数不对"
,
response
.
body
().
asString
()));
...
@@ -250,7 +249,22 @@ public class LiveLater implements Authorization {
...
@@ -250,7 +249,22 @@ public class LiveLater implements Authorization {
}
}
@Test
(
description
=
"获取回复建议"
,
priority
=
13
)
@Test
(
description
=
"查看客户B答题线索详情"
,
priority
=
13
)
public
void
查看客户
B
答题线索详情
()
{
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
// params.put("liveId","Kj21MzYyNjM");
params
.
put
(
"liveUserId"
,
this
.
liveUserId
.
get
(
1
).
getLiveUserId
());
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_getClueDetail
);
System
.
out
.
println
(
response
.
body
().
asString
());
int
answerRecords
=
response
.
jsonPath
().
getInt
(
"data.answerRecords"
);
Assert
.
assertNotNull
(
answerRecords
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_getClueDetail
,
"答题线索为null"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"获取回复建议"
,
priority
=
14
)
public
void
获取回复建议
()
{
public
void
获取回复建议
()
{
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
...
@@ -264,7 +278,7 @@ public class LiveLater implements Authorization {
...
@@ -264,7 +278,7 @@ public class LiveLater implements Authorization {
}
}
//需要校验返回结果
//需要校验返回结果
@Test
(
description
=
"访客邀请列表"
,
priority
=
1
4
)
@Test
(
description
=
"访客邀请列表"
,
priority
=
1
5
)
public
void
public
void
访客邀请列表
()
{
访客邀请列表
()
{
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
...
@@ -281,7 +295,7 @@ public class LiveLater implements Authorization {
...
@@ -281,7 +295,7 @@ public class LiveLater implements Authorization {
}
}
@Test
(
description
=
"备注客户姓名"
,
priority
=
1
5
)
@Test
(
description
=
"备注客户姓名"
,
priority
=
1
6
)
public
void
备注客户姓名
()
{
public
void
备注客户姓名
()
{
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"remarkName"
,
"访客A"
);
params
.
put
(
"remarkName"
,
"访客A"
);
...
@@ -296,7 +310,7 @@ public class LiveLater implements Authorization {
...
@@ -296,7 +310,7 @@ public class LiveLater implements Authorization {
//代理人首页已结束直播,查询待跟进线索数
//代理人首页已结束直播,查询待跟进线索数
@Test
(
description
=
"查询待跟进线索数"
,
priority
=
1
6
)
@Test
(
description
=
"查询待跟进线索数"
,
priority
=
1
7
)
public
void
查询待跟进线索数
()
{
public
void
查询待跟进线索数
()
{
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
...
...
src/test/wechatTestNG.xml
View file @
390d6a1a
...
@@ -7,29 +7,9 @@
...
@@ -7,29 +7,9 @@
<class
name=
"com.kjj.cases.basics.Pay"
/>
<class
name=
"com.kjj.cases.basics.Pay"
/>
</classes>
</classes>
</test>
</test>
<test
preserve-order=
"true"
name=
"上传"
>
<test
preserve-order=
"true"
name =
"首页"
>
<classes>
<class
name=
"com.kjj.cases.basics.Upload"
/>
</classes>
</test>
<test
preserve-order=
"true"
name=
"发圈"
>
<classes>
<class
name=
"com.kjj.cases.basics.CircleFriends"
/>
</classes>
</test>
<test
preserve-order=
"true"
name=
"boss看板"
>
<classes>
<class
name=
"com.kjj.cases.basics.Boss"
/>
</classes>
</test>
<test
preserve-order=
"true"
name=
"boss看板演示版"
>
<classes>
<class
name=
"com.kjj.cases.basics.BossTest"
/>
</classes>
</test>
<test
preserve-order=
"true"
name=
"贺卡"
>
<classes>
<classes>
<class
name=
"com.kjj.cases.
basics.GreetingCard
"
/>
<class
name=
"com.kjj.cases.
assistant.homePage
"
/>
</classes>
</classes>
</test>
</test>
<test
preserve-order=
"true"
name=
"我的名片"
>
<test
preserve-order=
"true"
name=
"我的名片"
>
...
@@ -52,11 +32,12 @@
...
@@ -52,11 +32,12 @@
<class
name=
"com.kjj.cases.assistant.DailyPaper"
/>
<class
name=
"com.kjj.cases.assistant.DailyPaper"
/>
</classes>
</classes>
</test>
</test>
<test
preserve-order=
"true"
name =
"
首页
"
>
<test
preserve-order=
"true"
name =
"
谁看过我_团队看板
"
>
<classes>
<classes>
<class
name=
"com.kjj.cases.assistant.
homePag
e"
/>
<class
name=
"com.kjj.cases.assistant.
whoSawMe.WhoSawM
e"
/>
</classes>
</classes>
</test>
</test>
</suite>
</suite>
<!-- Suite -->
<!-- Suite -->
...
...
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