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
9003940d
Commit
9003940d
authored
Aug 07, 2021
by
xiamengchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新我的客户用例
parent
5b175a1f
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
94 additions
and
118 deletions
+94
-118
ForwardAndRead.java
...java/com/kjj/cases/assistant/whoSawMe/ForwardAndRead.java
+0
-36
MyCustomer.java
...est/java/com/kjj/cases/assistant/whoSawMe/MyCustomer.java
+18
-7
BasicConfig.java
src/test/java/com/kjj/config/BasicConfig.java
+1
-0
wechatTestNG.xml
src/test/wechatTestNG.xml
+75
-75
No files found.
src/test/java/com/kjj/cases/assistant/whoSawMe/ForwardAndRead.java
View file @
9003940d
...
...
@@ -8,7 +8,6 @@ import io.restassured.response.Response;
import
org.testng.Assert
;
import
org.testng.annotations.BeforeClass
;
import
org.testng.annotations.Test
;
import
org.w3c.dom.events.UIEvent
;
import
java.io.IOException
;
import
java.util.*
;
...
...
@@ -242,41 +241,6 @@ public class ForwardAndRead implements Authorization {
ThreadSleepUtils
.
sleep
(
10000
);
}
@Test
(
description
=
"获取文章测评"
,
priority
=
14
)
public
void
获取文章测评
()
throws
IOException
{
// 获取测评contentId
param
.
clear
();
param
.
put
(
"scid"
,
articleScId
);
response
=
network
.
getResponse
(
param
,
BasicConfig
.
SELLERCARD_RECOMMENDLISTV3
);
Map
<
String
,
Object
>
clueActivityDisplayVo
=
response
.
jsonPath
().
getMap
(
"data.clueActivityDisplayVo"
);
riskTestContentId
=
(
String
)
clueActivityDisplayVo
.
get
(
"contentId"
);
// 获取测评scid
String
sid
=
encodeId
(
sellerId
);
param
.
clear
();
param
.
put
(
"contentId"
,
riskTestContentId
);
param
.
put
(
"sid"
,
sid
);
System
.
out
.
println
(
param
);
response
=
network
.
getResponse
(
param
,
BasicConfig
.
GETSCID
);
riskTestScId
=
response
.
jsonPath
().
getString
(
"data"
);
Assert
.
assertNotNull
(
riskTestScId
,
network
.
message
(
param
,
BasicConfig
.
GETSCID
,
"获取测评scid失败"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"领取测评报告"
,
priority
=
15
)
public
void
领取测评报告
()
throws
IOException
{
param
.
clear
();
param
.
put
(
"completed"
,
1
);
param
.
put
(
"originScId"
,
articleScId
);
param
.
put
(
"riskTestOperateType"
,
2
);
param
.
put
(
"scid"
,
riskTestScId
);
param
.
put
(
"sourceId"
,
articleScId
);
param
.
put
(
"sourceType"
,
1
);
param
.
put
(
"visitExtra"
,
"{\"性别\":\"男\",\"年龄\":\"85后\",\"家庭成员构成\":\"2个子女\",\"不良生活习惯\":\"运动少\",\"出行习惯\":\"骑行\",\"月收入\":\"5000-10000\",\"负债水平\":\"无\"}"
);
response
=
network
.
postResponse
(
param
,
BasicConfig
.
RISKTEST_SENDINFO
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
param
,
BasicConfig
.
RISKTEST_SENDINFO
,
"点击领取测评报告失败"
,
response
.
body
().
asString
()));
}
// 通过素材contentId获取线索员文章scId
public
String
getContentScId
(
String
contentId
){
param
=
new
HashMap
<>();
...
...
src/test/java/com/kjj/cases/assistant/whoSawMe/MyCustomer.java
View file @
9003940d
...
...
@@ -414,8 +414,19 @@ public class MyCustomer implements Authorization {
Assert
.
assertEquals
(
clueType
,
31
,
network
.
message
(
param
,
BasicConfig
.
CUSTVISITLIST
,
"访问记录详情有误"
,
response
.
body
().
asString
()));
}
// 客户线索跟进
@Test
(
description
=
"客户线索跟进_风险评测"
,
priority
=
24
)
public
void
客户线索跟进
_
风险评测
()
throws
IOException
{
// 跟进建议
param
.
clear
();
param
.
put
(
"userId"
,
visitor1UserId
);
response
=
network
.
getResponse
(
param
,
BasicConfig
.
FOLLOWADVICE
);
Object
data
=
response
.
jsonPath
().
getJsonObject
(
"data"
);
Assert
.
assertNotNull
(
data
,
network
.
message
(
param
,
BasicConfig
.
FOLLOWADVICE
,
"接口响应数据为空"
,
response
.
body
().
asString
()));
}
// 客户详情页_任务蒙层
@Test
(
description
=
"客户详情页_任务蒙层"
,
priority
=
2
4
)
@Test
(
description
=
"客户详情页_任务蒙层"
,
priority
=
2
5
)
public
void
客户详情页
_
任务蒙层
()
throws
IOException
{
param
=
new
HashMap
<>();
param
.
put
(
"sceneCode"
,
"noviceTask_visitorsCustomerInfoComplete"
);
...
...
@@ -425,7 +436,7 @@ public class MyCustomer implements Authorization {
}
// 客户详情页_特别关注弹层
@Test
(
description
=
"客户详情页_特别关注弹层"
,
priority
=
2
5
)
@Test
(
description
=
"客户详情页_特别关注弹层"
,
priority
=
2
6
)
public
void
客户详情页
_
特别关注弹层
()
throws
IOException
{
response
=
network
.
getResponse
(
BasicConfig
.
ISDISPLAYSPECIAL
);
Object
data
=
response
.
jsonPath
().
getJsonObject
(
"data"
);
...
...
@@ -433,7 +444,7 @@ public class MyCustomer implements Authorization {
}
// 客户详情页_素材访问记录
@Test
(
description
=
"客户详情页_素材访问记录"
,
priority
=
2
6
)
@Test
(
description
=
"客户详情页_素材访问记录"
,
priority
=
2
7
)
public
void
客户详情页
_
素材访问记录
()
throws
IOException
{
param
=
new
HashMap
<>();
param
.
put
(
"custUserId"
,
visitor1UserId
);
...
...
@@ -445,7 +456,7 @@ public class MyCustomer implements Authorization {
}
// 客户详情页_关键线索_提交资料
@Test
(
description
=
"客户详情页_资料信息"
,
priority
=
2
7
)
@Test
(
description
=
"客户详情页_资料信息"
,
priority
=
2
8
)
public
void
关键线索
_
提交资料
()
throws
IOException
{
param
=
new
HashMap
<>();
param
.
put
(
"custUserId"
,
visitor1UserId
);
...
...
@@ -454,7 +465,7 @@ public class MyCustomer implements Authorization {
}
// 客户详情页_关键线索_中奖记录
@Test
(
description
=
"客户详情页_关键信息_中奖记录"
,
priority
=
2
8
)
@Test
(
description
=
"客户详情页_关键信息_中奖记录"
,
priority
=
2
9
)
public
void
关键线索
_
中奖记录
()
throws
IOException
{
param
=
new
HashMap
<>();
param
.
put
(
"custUserId"
,
visitor1UserId
);
...
...
@@ -463,7 +474,7 @@ public class MyCustomer implements Authorization {
}
// 客户详情页_关键信息_喜欢的内容
@Test
(
description
=
"关键信息_喜欢的内容"
,
priority
=
29
)
@Test
(
description
=
"关键信息_喜欢的内容"
,
priority
=
30
)
public
void
关键信息
_
喜欢的内容
()
throws
IOException
{
param
=
new
HashMap
<>();
param
.
put
(
"custUserId"
,
visitor1UserId
);
...
...
@@ -477,7 +488,7 @@ public class MyCustomer implements Authorization {
}
// 客户信息_客户管理_备注和标签
@Test
(
description
=
"备注和标签"
,
priority
=
3
0
)
@Test
(
description
=
"备注和标签"
,
priority
=
3
1
)
public
void
客户信息
_
客户管理
_
备注和标签
()
throws
IOException
{
List
<
String
>
tagIds
=
new
ArrayList
<>();
tagIds
.
add
(
createTagId
);
...
...
src/test/java/com/kjj/config/BasicConfig.java
View file @
9003940d
...
...
@@ -735,6 +735,7 @@ public class BasicConfig {
public
static
final
String
DYNAMIC_ADDVISIT
=
HOST
+
"/kjy/mp/seller/dynamic/addVisit"
;
public
static
final
String
CLUEINFO
=
HOST
+
"/kjy/mp/whoSawMe/clue/info"
;
public
static
final
String
CLUEADVISE
=
HOST
+
"/kjy/mp/whoSawMe/clue/info/advise"
;
public
static
final
String
FOLLOWADVICE
=
HOST
+
"/kjy/mp/whoSawMe/clue/followAdvice"
;
// *************** 运营周报 ***************
public
static
final
String
WEEKLY_INDEXINFO
=
HOST
+
"/kjy/mp/weekly/getWeeklyIndexInfo"
;
...
...
src/test/wechatTestNG.xml
View file @
9003940d
...
...
@@ -6,87 +6,87 @@
<class
name=
"com.kjj.cases.assistant.menu.NoviceGuidance"
/>
</classes>
</test>
<!-- <test preserve-order="true" name="支付">--
>
<!-- <classes>--
>
<!-- <class name="com.kjj.cases.assistant.pay.Pay"/>--
>
<!-- </classes>--
>
<!-- </test>--
>
<!-- <test preserve-order="true" name="邀请返现">--
>
<!-- <classes>--
>
<!-- <class name="com.kjj.cases.assistant.pay.Cashback"/>--
>
<!-- </classes>--
>
<!-- </test>--
>
<!-- <test preserve-order="true" name = "首页">--
>
<!-- <classes>--
>
<!-- <class name="com.kjj.cases.assistant.homePage.HomePage"/>--
>
<!-- </classes>--
>
<!-- </test>--
>
<!-- <test preserve-order="true" name="我的名片">--
>
<!-- <classes>--
>
<!-- <class name="com.kjj.cases.assistant.card.PersonCard"/>--
>
<!-- </classes>--
>
<!-- </test>--
>
<!-- <test preserve-order="true" name="文章中个人名片">--
>
<!-- <classes>--
>
<!-- <class name="com.kjj.cases.assistant.card.ArticalPersonCard"/>--
>
<!-- </classes>--
>
<!-- </test>--
>
<!-- <test preserve-order="true" name = "种草素材">--
>
<!-- <classes>--
>
<!-- <class name="com.kjj.cases.assistant.homePage.RecommendMaterial"/>--
>
<!-- </classes>--
>
<!-- </test>--
>
<!-- <test preserve-order="true" name = "今日早报">--
>
<!-- <classes>--
>
<!-- <class name="com.kjj.cases.assistant.homePage.DailyPaper"/>--
>
<!-- </classes>--
>
<!-- </test>--
>
<!-- <test preserve-order="true" name = "上传链接">--
>
<!-- <classes>--
>
<!-- <class name="com.kjj.cases.assistant.homePage.Upload"/>--
>
<!-- </classes>--
>
<!-- </test>--
>
<test
preserve-order=
"true"
name=
"支付"
>
<classes
>
<class
name=
"com.kjj.cases.assistant.pay.Pay"
/
>
</classes
>
</test
>
<test
preserve-order=
"true"
name=
"邀请返现"
>
<classes
>
<class
name=
"com.kjj.cases.assistant.pay.Cashback"
/
>
</classes
>
</test
>
<test
preserve-order=
"true"
name =
"首页"
>
<classes
>
<class
name=
"com.kjj.cases.assistant.homePage.HomePage"
/
>
</classes
>
</test
>
<test
preserve-order=
"true"
name=
"我的名片"
>
<classes
>
<class
name=
"com.kjj.cases.assistant.card.PersonCard"
/
>
</classes
>
</test
>
<test
preserve-order=
"true"
name=
"文章中个人名片"
>
<classes
>
<class
name=
"com.kjj.cases.assistant.card.ArticalPersonCard"
/
>
</classes
>
</test
>
<test
preserve-order=
"true"
name =
"种草素材"
>
<classes
>
<class
name=
"com.kjj.cases.assistant.homePage.RecommendMaterial"
/
>
</classes
>
</test
>
<test
preserve-order=
"true"
name =
"今日早报"
>
<classes
>
<class
name=
"com.kjj.cases.assistant.homePage.DailyPaper"
/
>
</classes
>
</test
>
<test
preserve-order=
"true"
name =
"上传链接"
>
<classes
>
<class
name=
"com.kjj.cases.assistant.homePage.Upload"
/
>
</classes
>
</test
>
<test
preserve-order=
"true"
name =
"获取访客"
>
<classes>
<class
name=
"com.kjj.cases.assistant.whoSawMe.ForwardAndRead"
/>
</classes>
</test>
<!-- <test preserve-order="true" name = "谁看过我">--
>
<!-- <classes>--
>
<!-- <class name="com.kjj.cases.assistant.whoSawMe.WhoSawMe"/>--
>
<!-- </classes>--
>
<!-- </test>--
>
<!-- <test preserve-order="true" name = "我的转发">--
>
<!-- <classes>--
>
<!-- <class name="com.kjj.cases.assistant.whoSawMe.MyForward"/>--
>
<!-- </classes>--
>
<!-- </test>--
>
<!-- <test preserve-order="true" name = "我的客户">--
>
<!-- <classes>--
>
<!-- <class name="com.kjj.cases.assistant.whoSawMe.MyCustomer"/>--
>
<!-- </classes>--
>
<!-- </test>--
>
<!-- <test preserve-order="true" name = "贺卡">--
>
<!-- <classes>--
>
<!-- <class name="com.kjj.cases.assistant.markettools.GreetingCrad"/>--
>
<!-- </classes>--
>
<!-- </test>--
>
<!-- <test preserve-order="true" name = "抽奖转盘">--
>
<!-- <classes>--
>
<!-- <class name="com.kjj.cases.assistant.markettools.GameLottery"/>--
>
<!-- </classes>--
>
<!-- </test>--
>
<!-- <test preserve-order="true" name = "邀请函和趣味测评">--
>
<!-- <classes>--
>
<!-- <class name="com.kjj.cases.assistant.markettools.InvitationLetter"/>--
>
<!-- </classes>--
>
<!-- </test>--
>
<!-- <test preserve-order="true" name = "使用攻略和设置中心">--
>
<!-- <classes>--
>
<!-- <class name="com.kjj.cases.assistant.menu.PersonalCenter"/>--
>
<!-- </classes>--
>
<!-- </test>--
>
<test
preserve-order=
"true"
name =
"谁看过我"
>
<classes
>
<class
name=
"com.kjj.cases.assistant.whoSawMe.WhoSawMe"
/
>
</classes
>
</test
>
<test
preserve-order=
"true"
name =
"我的转发"
>
<classes
>
<class
name=
"com.kjj.cases.assistant.whoSawMe.MyForward"
/
>
</classes
>
</test
>
<test
preserve-order=
"true"
name =
"我的客户"
>
<classes
>
<class
name=
"com.kjj.cases.assistant.whoSawMe.MyCustomer"
/
>
</classes
>
</test
>
<test
preserve-order=
"true"
name =
"贺卡"
>
<classes
>
<class
name=
"com.kjj.cases.assistant.markettools.GreetingCrad"
/
>
</classes
>
</test
>
<test
preserve-order=
"true"
name =
"抽奖转盘"
>
<classes
>
<class
name=
"com.kjj.cases.assistant.markettools.GameLottery"
/
>
</classes
>
</test
>
<test
preserve-order=
"true"
name =
"邀请函和趣味测评"
>
<classes
>
<class
name=
"com.kjj.cases.assistant.markettools.InvitationLetter"
/
>
</classes
>
</test
>
<test
preserve-order=
"true"
name =
"使用攻略和设置中心"
>
<classes
>
<class
name=
"com.kjj.cases.assistant.menu.PersonalCenter"
/
>
</classes
>
</test
>
</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