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
a6e8c677
Commit
a6e8c677
authored
Jan 06, 2022
by
龚小红
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
线索重构,删除客户列表和部分接口,替换部分接口
parent
864cd769
Changes
9
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
361 additions
and
228 deletions
+361
-228
HomePage.java
src/test/java/com/kjj/cases/assistant/homePage/HomePage.java
+137
-34
NoviceGuidance.java
...est/java/com/kjj/cases/assistant/menu/NoviceGuidance.java
+24
-35
Cashback.java
src/test/java/com/kjj/cases/assistant/pay/Cashback.java
+8
-8
ForwardAndRead.java
...java/com/kjj/cases/assistant/whoSawMe/ForwardAndRead.java
+85
-12
MyCustomer.java
...est/java/com/kjj/cases/assistant/whoSawMe/MyCustomer.java
+53
-72
WhoSawMe.java
src/test/java/com/kjj/cases/assistant/whoSawMe/WhoSawMe.java
+45
-61
BasicConfig.java
src/test/java/com/kjj/config/BasicConfig.java
+6
-5
BaseUtils.java
src/test/java/com/kjj/utils/BaseUtils.java
+2
-0
NetworkUtils.java
src/test/java/com/kjj/utils/NetworkUtils.java
+1
-1
No files found.
src/test/java/com/kjj/cases/assistant/homePage/HomePage.java
View file @
a6e8c677
This diff is collapsed.
Click to expand it.
src/test/java/com/kjj/cases/assistant/menu/NoviceGuidance.java
View file @
a6e8c677
...
...
@@ -30,7 +30,7 @@ public class NoviceGuidance implements Authorization {
private
long
dataID
;
//资料包的contentID
private
long
dataContentID
;
//资料包的ID
private
long
articleDataID
;
//文章插入资料包后的包id
private
lo
ng
clueId
;
//线索ID
private
Stri
ng
clueId
;
//线索ID
private
long
qaID
;
//互助问答ID
private
String
questionId
;
//互助问答加密后的ID
private
static
final
NetworkUtils
network
=
NetworkUtils
.
getInstance
();
...
...
@@ -366,7 +366,7 @@ public class NoviceGuidance implements Authorization {
boolean
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
String
result
=
response
.
jsonPath
().
getString
(
"data."
);
Assert
.
assertTrue
(
success
,
network
.
message
(
params
,
SELLERCARD_SENDPUSHFORSCAN
,
"接口返回失败"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
result
,
"success"
,
network
.
message
(
params
,
SELLERCARD_SENDPUSHFORSCAN
,
"领
取赠险
失败"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
result
,
"success"
,
network
.
message
(
params
,
SELLERCARD_SENDPUSHFORSCAN
,
"领
资料包
失败"
,
response
.
body
().
asString
()));
}
// 查看谁看过我首页我的跟进机会列表
...
...
@@ -376,17 +376,12 @@ public class NoviceGuidance implements Authorization {
sleep
(
2000
);
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
List
<
Object
>
customerTagIds
=
Lists
.
newArrayList
();
params
.
put
(
"customerTagIds"
,
customerTagIds
);
params
.
put
(
"lastClueId"
,
0
);
params
.
put
(
"listType"
,
4
);
params
.
put
(
"pageSize"
,
20
);
params
.
put
(
"grassContentListType"
,
5
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WHOSAWME_CUSTCLUELISTV3
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WHOSAWME_clueList
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.list.size()"
);
Assert
.
assertTrue
(
size
>
0
,
network
.
message
(
params
,
BasicConfig
.
WHOSAWME_
CUSTCLUELISTV3
,
"接口请求失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
size
>
0
,
network
.
message
(
params
,
BasicConfig
.
WHOSAWME_
clueList
,
"接口请求失败"
,
response
.
body
().
asString
()));
clueId
=
response
.
jsonPath
().
get
Long
(
"data.l
ist[0].clueId"
);
clueId
=
response
.
jsonPath
().
get
String
(
"data.list[0].clueInfoL
ist[0].clueId"
);
}
@Test
(
description
=
"代理人点击谁看过我显示备注引导"
,
priority
=
26
)
...
...
@@ -495,17 +490,12 @@ public class NoviceGuidance implements Authorization {
sleep
(
2000
);
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
List
<
Object
>
customerTagIds
=
Lists
.
newArrayList
();
params
.
put
(
"customerTagIds"
,
customerTagIds
);
params
.
put
(
"lastClueId"
,
0
);
params
.
put
(
"listType"
,
4
);
params
.
put
(
"pageSize"
,
20
);
params
.
put
(
"grassContentListType"
,
5
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WHOSAWME_CUSTCLUELISTV3
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WHOSAWME_clueList
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.list.size()"
);
Assert
.
assertTrue
(
size
>
0
,
network
.
message
(
params
,
BasicConfig
.
WHOSAWME_
CUSTCLUELISTV3
,
"接口请求失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
size
>
0
,
network
.
message
(
params
,
BasicConfig
.
WHOSAWME_
clueList
,
"接口请求失败"
,
response
.
body
().
asString
()));
clueId
=
response
.
jsonPath
().
get
Long
(
"data.l
ist[0].clueId"
);
clueId
=
response
.
jsonPath
().
get
String
(
"data.list[0].clueInfoL
ist[0].clueId"
);
}
// 销售线索_线索详情
@Test
(
description
=
"查看_线索详情"
,
priority
=
31
)
...
...
@@ -513,12 +503,14 @@ public class NoviceGuidance implements Authorization {
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"clueId"
,
clueId
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
CLUEINFO
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.faqCluePathListInfoVo.faqCluePathDetailInfoVos.get(0).subtitle"
),
"直接访问"
,
network
.
message
(
params
,
BasicConfig
.
CLUEINFO
,
"文章标题错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.faqCluePathListInfoVo.faqCluePathDetailInfoVos.get(0).title"
),
"《一线城市打拼,二线城市买房,80%以上年轻人都在做的这事靠谱吗?》"
,
network
.
message
(
params
,
BasicConfig
.
CLUEINFO
,
"文章标题错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.faqCluePathListInfoVo.faqCluePathDetailInfoVos.get(1).subtitle"
),
"查看问答"
,
network
.
message
(
params
,
BasicConfig
.
CLUEINFO
,
"文章标题错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.faqCluePathListInfoVo.faqCluePathDetailInfoVos.get(1).title"
),
"[自动化专用互助问答]"
,
network
.
message
(
params
,
BasicConfig
.
CLUEINFO
,
"文章标题错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.faqCluePathListInfoVo.faqCluePathDetailInfoVos.get(2).subtitle"
),
"领取资料"
,
network
.
message
(
params
,
BasicConfig
.
CLUEINFO
,
"文章标题错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.faqCluePathListInfoVo.faqCluePathDetailInfoVos.get(2).title"
),
"《自动化专用资料包》"
,
network
.
message
(
params
,
BasicConfig
.
CLUEINFO
,
"文章标题错误"
,
response
.
body
().
asString
()));
int
clueBizType
=
response
.
jsonPath
().
getInt
(
"data.clueBizType"
);
Assert
.
assertEquals
(
clueBizType
,
3
,
network
.
message
(
params
,
BasicConfig
.
WHOSAWME_clueList
,
"线索类型错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.faqCluePathDetails.get(0).subTitle"
),
"直接访问"
,
network
.
message
(
params
,
BasicConfig
.
CLUEINFO
,
"文章访问类型错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.faqCluePathDetails.get(0).title"
),
"《一线城市打拼,二线城市买房,80%以上年轻人都在做的这事靠谱吗?》"
,
network
.
message
(
params
,
BasicConfig
.
CLUEINFO
,
"文章标题错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.faqCluePathDetails.get(1).subTitle"
),
"查看问答"
,
network
.
message
(
params
,
BasicConfig
.
CLUEINFO
,
"问答线索描述错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.faqCluePathDetails.get(1).title"
),
"[自动化专用互助问答]"
,
network
.
message
(
params
,
BasicConfig
.
CLUEINFO
,
"问答标题错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.faqCluePathDetails.get(2).subTitle"
),
"领取资料"
,
network
.
message
(
params
,
BasicConfig
.
CLUEINFO
,
"资料包描述线索错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.faqCluePathDetails.get(2).title"
),
"《自动化专用资料包》"
,
network
.
message
(
params
,
BasicConfig
.
CLUEINFO
,
"资料包标题错误"
,
response
.
body
().
asString
()));
}
// 销售线索_跟进建议
...
...
@@ -560,18 +552,13 @@ public class NoviceGuidance implements Authorization {
newUser1
();
sleep
(
2000
);
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
List
<
Object
>
customerTagIds
=
Lists
.
newArrayList
();
params
.
put
(
"customerTagIds"
,
customerTagIds
);
params
.
put
(
"lastClueId"
,
0
);
params
.
put
(
"listType"
,
4
);
Map
<
String
,
Object
>
params
=
new
HashMap
<>();;
params
.
put
(
"pageSize"
,
20
);
params
.
put
(
"grassContentListType"
,
5
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WHOSAWME_CUSTCLUELISTV3
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WHOSAWME_clueList
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.list.size()"
);
Assert
.
assertTrue
(
size
>
0
,
network
.
message
(
params
,
BasicConfig
.
WHOSAWME_
CUSTCLUELISTV3
,
"接口请求失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
size
>
0
,
network
.
message
(
params
,
BasicConfig
.
WHOSAWME_
clueList
,
"接口请求失败"
,
response
.
body
().
asString
()));
clueId
=
response
.
jsonPath
().
get
Long
(
"data.l
ist[0].clueId"
);
clueId
=
response
.
jsonPath
().
get
String
(
"data.list[0].clueInfoL
ist[0].clueId"
);
}
// 销售线索_线索详情
@Test
(
description
=
"查看关联提问_线索详情"
,
priority
=
35
)
...
...
@@ -579,8 +566,10 @@ public class NoviceGuidance implements Authorization {
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"clueId"
,
clueId
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
CLUEINFO
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.questionAnswerVo.extraQuestion"
),
"自动化关联问题"
,
network
.
message
(
params
,
BasicConfig
.
CLUEINFO
,
"文章标题错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.clueSummary"
),
"发起提问"
,
network
.
message
(
params
,
BasicConfig
.
CLUEINFO
,
"文章标题错误"
,
response
.
body
().
asString
()));
int
clueBizType
=
response
.
jsonPath
().
getInt
(
"data.clueBizType"
);
Assert
.
assertEquals
(
clueBizType
,
4
,
network
.
message
(
params
,
BasicConfig
.
WHOSAWME_clueList
,
"线索类型错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.question"
),
"自动化专用互助问答"
,
network
.
message
(
params
,
BasicConfig
.
CLUEINFO
,
"问题题目错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.extraQuestion"
),
"自动化关联问题"
,
network
.
message
(
params
,
BasicConfig
.
CLUEINFO
,
"问题题目错误"
,
response
.
body
().
asString
()));
}
...
...
src/test/java/com/kjj/cases/assistant/pay/Cashback.java
View file @
a6e8c677
...
...
@@ -65,14 +65,14 @@ public class Cashback implements Authorization {
public
void
默认付费
_
一级用户邀请付费页
()
{
//代理人续费状态
Map
<
String
,
Object
>
payParams
=
new
HashMap
<
String
,
Object
>();
payParams
.
put
(
"entryDiscountType"
,
1
);
//入口折扣类型,1-普通,3-邀请,4-优惠码
Response
response
=
network
.
getResponse
(
PAY_info
);
int
discountType
=
response
.
jsonPath
().
getInt
(
"data.discountType"
);
String
superiorName
=
response
.
jsonPath
().
getString
(
"data.invitation.superiorName"
);
int
preferentialPrice
=
response
.
jsonPath
().
getInt
(
"data.preferentialPrice"
);
Assert
.
assertEquals
(
discountType
,
3
,
network
.
message
(
PAY_info
,
"非邀请付费逻辑"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
superiorName
,
"吉吉"
,
network
.
message
(
PAY_info
,
"上级不是吉吉"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
preferentialPrice
,
3
,
network
.
message
(
PAY_info
,
"邀请价格非0.03"
,
response
.
body
().
asString
()));
//
payParams.put("entryDiscountType",1); //入口折扣类型,1-普通,3-邀请,4-优惠码
//
Response response = network.getResponse(PAY_info);
//
int discountType = response.jsonPath().getInt("data.discountType");
//
String superiorName = response.jsonPath().getString("data.invitation.superiorName");
//
int preferentialPrice = response.jsonPath().getInt("data.preferentialPrice");
//
Assert.assertEquals(discountType,3,network.message(PAY_info,"非邀请付费逻辑",response.body().asString()));
//
Assert.assertEquals(superiorName,"吉吉",network.message(PAY_info,"上级不是吉吉",response.body().asString()));
//
Assert.assertEquals(preferentialPrice,3,network.message(PAY_info,"邀请价格非0.03",response.body().asString()));
}
@Test
(
description
=
"邀请的待支付好友列表"
,
priority
=
3
)
...
...
src/test/java/com/kjj/cases/assistant/whoSawMe/ForwardAndRead.java
View file @
a6e8c677
...
...
@@ -3,6 +3,7 @@ package com.kjj.cases.assistant.whoSawMe;
import
com.kjj.cases.admin.Authorization
;
import
com.kjj.config.BasicConfig
;
import
com.kjj.utils.BaseUtils
;
import
com.kjj.utils.IdMakeUtil
;
import
io.restassured.response.Response
;
import
org.testng.Assert
;
import
org.testng.annotations.BeforeClass
;
...
...
@@ -14,6 +15,8 @@ import java.util.*;
import
static
com
.
kjj
.
config
.
BasicConfig
.*;
import
static
com
.
kjj
.
config
.
BasicConfig
.
DYNAMIC_addVisit
;
import
static
com
.
kjj
.
utils
.
BaseUtils
.
ssoLogin
;
import
static
com
.
kjj
.
utils
.
BaseUtils
.
tku1
;
import
static
com
.
kjj
.
utils
.
IdMakeUtil
.
encodingId
;
import
static
com
.
kjj
.
utils
.
ThreadSleepUtils
.
sleep
;
...
...
@@ -41,15 +44,19 @@ public class ForwardAndRead implements Authorization {
@Test
(
description
=
"获取二度访客起始线索数据"
,
priority
=
1
)
public
void
获取二度访客起始线索数据
(){
long
userId
=
decodeTku
(
BasicConfig
.
VISITOR1_TKU
).
get
(
"userId"
);
param
=
new
HashMap
<>();
custClueStatistics
=
new
HashMap
<>();
param
.
put
(
"userId"
,
userId
);
response
=
network
.
getResponse
(
param
,
BasicConfig
.
CLUESTATISTICS
);
int
drawMaterial
=
response
.
jsonPath
().
getInt
(
"data.drawMaterial"
);
int
grassCount
=
response
.
jsonPath
().
getInt
(
"data.grassCount"
);
param
.
put
(
"custUserId"
,
userId
);
param
.
put
(
"type"
,
2
);
response
=
network
.
getResponse
(
param
,
BasicConfig
.
CUSTSTATISTIC
);
Assert
.
assertTrue
(
response
.
jsonPath
().
getBoolean
(
"success"
),
network
.
message
(
param
,
BasicConfig
.
CUSTSTATISTIC
,
"接口请求失败"
,
response
.
body
().
asString
()));
int
visitCount
=
response
.
jsonPath
().
getInt
(
"data.visitCount"
);
custClueStatistics
.
put
(
"drawMaterial"
,
drawMaterial
);
custClueStatistics
.
put
(
"grassCount"
,
grassCount
);
int
grassNum
=
response
.
jsonPath
().
getInt
(
"data.grassNum"
);
int
datagramNum
=
response
.
jsonPath
().
getInt
(
"data.datagramNum"
);
custClueStatistics
=
new
HashMap
<>();
custClueStatistics
.
put
(
"datagramNum"
,
datagramNum
);
custClueStatistics
.
put
(
"grassNum"
,
grassNum
);
custClueStatistics
.
put
(
"visitCount"
,
visitCount
);
}
...
...
@@ -103,7 +110,7 @@ public class ForwardAndRead implements Authorization {
param
.
clear
();
param
.
put
(
"scid"
,
articleScId
);
param
.
put
(
"forwardTime"
,
System
.
currentTimeMillis
()
);
param
.
put
(
"forwardTime"
,
forwardTime
);
response
=
network
.
postResponse
(
param
,
DYNAMIC_addVisit
);
boolean
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
Object
data
=
response
.
jsonPath
().
getJsonObject
(
"data"
);
...
...
@@ -134,7 +141,7 @@ public class ForwardAndRead implements Authorization {
param
.
clear
();
param
.
put
(
"scid"
,
articleScId
);
param
.
put
(
"fromUserId"
,
fromUserId
);
param
.
put
(
"traceId"
,
traceId
);
param
.
put
(
"traceId"
,
null
);
param
.
put
(
"visitPath"
,
0
);
response
=
network
.
postResponse
(
param
,
BasicConfig
.
CONTENT_visit
);
System
.
out
.
println
(
response
.
body
().
asString
());
...
...
@@ -142,7 +149,7 @@ public class ForwardAndRead implements Authorization {
param
.
clear
();
param
.
put
(
"scid"
,
articleScId
);
param
.
put
(
"forwardTime"
,
System
.
currentTimeMillis
()
);
param
.
put
(
"forwardTime"
,
forwardTime
);
response
=
network
.
postResponse
(
param
,
DYNAMIC_addVisit
);
boolean
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
Object
data
=
response
.
jsonPath
().
getJsonObject
(
"data"
);
...
...
@@ -158,7 +165,7 @@ public class ForwardAndRead implements Authorization {
param
=
new
HashMap
<>();
param
.
put
(
"scid"
,
articleScId
);
param
.
put
(
"fromUserId"
,
fromUserId
);
param
.
put
(
"traceId"
,
traceId
);
param
.
put
(
"traceId"
,
null
);
param
.
put
(
"visitPath"
,
0
);
response
=
network
.
postResponse
(
param
,
BasicConfig
.
CONTENT_visit
);
jjvisitId
=
response
.
jsonPath
().
getString
(
"data.userVisitId"
);
...
...
@@ -169,7 +176,7 @@ public class ForwardAndRead implements Authorization {
public
void
添加访问记录
()
throws
IOException
{
param
.
clear
();
param
.
put
(
"scid"
,
articleScId
);
param
.
put
(
"forwardTime"
,
System
.
currentTimeMillis
()
);
param
.
put
(
"forwardTime"
,
forwardTime
);
response
=
network
.
postResponse
(
param
,
DYNAMIC_addVisit
);
boolean
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
Object
data
=
response
.
jsonPath
().
getJsonObject
(
"data"
);
...
...
@@ -223,11 +230,77 @@ public class ForwardAndRead implements Authorization {
param
.
put
(
"scId"
,
articleScId
);
param
.
put
(
"sourceId"
,
articleScId
);
param
.
put
(
"sourceType"
,
1
);
param
.
put
(
"delayFlag"
,
false
);
response
=
network
.
postResponse
(
param
,
BasicConfig
.
SELLERCARD_SENDPUSHFORSCAN
);
String
data
=
response
.
jsonPath
().
getString
(
"data"
);
Assert
.
assertEquals
(
data
,
"success"
,
network
.
message
(
param
,
BasicConfig
.
SELLERCARD_SENDPUSHFORSCAN
,
"领取资料失败"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"访客_访问文章并参与测评"
,
priority
=
60
)
public
void
访客
_
访问文章并参与测评
()
{
//打开测评
param
.
clear
();
param
.
put
(
"contentId"
,
encodingId
(
4700L
));
param
.
put
(
"sid"
,
encodingId
((
long
)
sellerId
));
response
=
network
.
getResponse
(
param
,
GETSCID
);
String
activityScid
=
response
.
jsonPath
().
getString
(
"data"
);
Assert
.
assertNotNull
(
activityScid
,
network
.
message
(
param
,
GETSCID
,
"获取scid失败"
,
response
.
body
().
asString
()));
param
.
clear
();
param
.
put
(
"scid"
,
activityScid
);
param
.
put
(
"fromUserId"
,
fromUserId
);
//代理人的用户id
param
.
put
(
"sourceScid"
,
articleScId
);
//文章对应的Scid
param
.
put
(
"visitPath"
,
1
);
response
=
network
.
postResponse
(
param
,
CONTENT_visit
);
String
visitId
=
response
.
jsonPath
().
getString
(
"data.userVisitId"
);
Assert
.
assertNotNull
(
visitId
,
network
.
message
(
param
,
CONTENT_visit
,
"访客记录查看素材失败"
,
response
.
body
().
asString
()));
//发送测试结果-多次提交接口返回失败
param
.
clear
();
param
.
put
(
"scid"
,
activityScid
);
param
.
put
(
"completed"
,
1
);
param
.
put
(
"sourceScId"
,
articleScId
);
param
.
put
(
"visitExtra"
,
"{\"食物\":\"爱吃垃圾食品\",\"喝酒\":\"爱喝酒\",\"睡觉\":\"习惯早睡\",\"早餐\":\"按时吃早饭\",\"心情\":\"心情烦闷\"}"
);
response
=
network
.
postResponse
(
param
,
GAME_sendInfo
);
//申请领取报告
param
.
clear
();
param
.
put
(
"scid"
,
activityScid
);
param
.
put
(
"completed"
,
1
);
param
.
put
(
"sourceScId"
,
articleScId
);
param
.
put
(
"originScId"
,
articleScId
);
param
.
put
(
"riskTestOperateType"
,
2
);
param
.
put
(
"sourceType"
,
"1"
);
param
.
put
(
"visitId"
,
visitId
);
response
=
network
.
postResponse
(
param
,
GAME_sendInfoForRisk
);
System
.
out
.
println
(
response
.
body
().
asString
());
boolean
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
boolean
result
=
response
.
jsonPath
().
getJsonObject
(
"data"
);
Assert
.
assertTrue
(
success
,
network
.
message
(
param
,
GAME_sendInfoForRisk
,
"接口返回失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
result
,
network
.
message
(
param
,
GAME_sendInfoForRisk
,
"申请领取食谱失败"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"访客领取赠险"
,
priority
=
35
)
public
void
访客领取赠险
()
{
//领取资料包
Map
<
String
,
Object
>
param
=
new
HashMap
<>();
param
.
put
(
"scId"
,
articleScId
);
param
.
put
(
"companyInsuranceId"
,
IdMakeUtil
.
encodingId
(
17L
));
param
.
put
(
"clueTypeName"
,
"COMPANY_INSURANCE"
);
param
.
put
(
"locationSource"
,
2
);
param
.
put
(
"sourceId"
,
articleScId
);
param
.
put
(
"sourceType"
,
1
);
param
.
put
(
"delayFlag"
,
false
);
Response
response
=
network
.
postResponse
(
param
,
SELLERCARD_SENDPUSHFORSCAN
);
boolean
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
String
result
=
response
.
jsonPath
().
getString
(
"data."
);
Assert
.
assertTrue
(
success
,
network
.
message
(
param
,
SELLERCARD_SENDPUSHFORSCAN
,
"接口返回失败"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
result
,
"success"
,
network
.
message
(
param
,
SELLERCARD_SENDPUSHFORSCAN
,
"领资料包失败"
,
response
.
body
().
asString
()));
}
// 通过素材contentId获取线索员文章scId
public
static
String
getContentScId
(
String
contentId
){
param
=
new
HashMap
<>();
...
...
src/test/java/com/kjj/cases/assistant/whoSawMe/MyCustomer.java
View file @
a6e8c677
This diff is collapsed.
Click to expand it.
src/test/java/com/kjj/cases/assistant/whoSawMe/WhoSawMe.java
View file @
a6e8c677
This diff is collapsed.
Click to expand it.
src/test/java/com/kjj/config/BasicConfig.java
View file @
a6e8c677
...
...
@@ -767,7 +767,7 @@ public class BasicConfig {
public
static
final
String
MANAGER_updateTeam
=
MANAGER_HOST
+
"/kjy/manager/live/ques/reward/updateTeamAssignmentType"
;
// *************** 素材ID ***************
public
static
final
String
ARTICLE_CONTENTID
=
"Kj2
1NjM4NDc
"
;
public
static
final
String
ARTICLE_CONTENTID
=
"Kj2
2MTk4NDg2Mw
"
;
public
static
final
String
ANIMATION_CONTENTID
=
"Kj21MzgzMTk"
;
public
static
final
String
GAME_CONTENTID
=
"Kj21NjIxNTk"
;
public
static
final
String
UPLOAD_CONTENTID
=
"Kj21NjA1NTE"
;
...
...
@@ -786,7 +786,7 @@ public class BasicConfig {
public
static
final
String
LAYER_RENEW
=
HOST
+
"/kjy/mp/layer/renew"
;
public
static
final
String
DISTRIBUTION_LAYER
=
HOST
+
"/kjy/sp/seller/distributionLayer"
;
public
static
final
String
ROOKIECLUEGUIDE
=
HOST
+
"/kjy/mp/rookieGuide/clueGuide"
;
public
static
final
String
VISITHEADER
=
HOST
+
"/kj
y/mp/visit/header/v2
"
;
public
static
final
String
VISITHEADER
=
HOST
+
"/kj
j/visit/header
"
;
public
static
final
String
SELLERWEEKLY
=
HOST
+
"/kjy/mp/whoSawMe/sellerWeekly"
;
public
static
final
String
WEEKLY_LIST
=
HOST
+
"/kjy/mp/seller/weekly/list"
;
public
static
final
String
NEWFUNC_FIRSTVISIT
=
HOST
+
"/kjy/mp/newFunction/sellerFirstVisit"
;
...
...
@@ -883,7 +883,7 @@ public class BasicConfig {
// *************** 谁看过我 ***************
public
static
final
String
WHOSAWME_
CUSTCLUELISTV3
=
HOST
+
"/kjy/mp/whoSawMe/custClueList/v3
"
;
public
static
final
String
WHOSAWME_
visitList
=
HOST
+
"/kjj/visit/list
"
;
public
static
final
String
FORWARDHEADER
=
HOST
+
"/kjy/mp/whoSawMe/forward/header"
;
public
static
final
String
FORWARD_LIST
=
HOST
+
"/kjy/mp/whoSawMe/forward/list/v2"
;
public
static
final
String
FORWARD_CONTENTHEADER
=
HOST
+
"/kjy/mp/whoSawMe/forward/contentHeader"
;
...
...
@@ -891,10 +891,11 @@ public class BasicConfig {
public
static
final
String
SELLERUNREADMESSAGE
=
HOST
+
"/kjy/mp/custmarketing/sellerUnreadMsg"
;
public
static
final
String
CUSTOMERSEARCH
=
HOST
+
"/kjy/mp/whoSawMe/customerSearch"
;
public
static
final
String
DYNAMIC_ADDVISIT
=
HOST
+
"/kjy/mp/seller/dynamic/addVisit"
;
public
static
final
String
CLUEINFO
=
HOST
+
"/kj
y/mp/whoSawMe/clue/info
"
;
public
static
final
String
CLUEADVISE
=
HOST
+
"/kj
y/mp/whoSawMe/clue/info/advis
e"
;
public
static
final
String
CLUEINFO
=
HOST
+
"/kj
j/content/clue/detail
"
;
public
static
final
String
CLUEADVISE
=
HOST
+
"/kj
j/content/clue/advic
e"
;
public
static
final
String
FOLLOWADVICE
=
HOST
+
"/kjy/mp/whoSawMe/clue/followAdvice"
;
public
static
final
String
WHOSAWME_clientInfo
=
HOST
+
"/kjy/mp/whoSawMe/clue/clientInfo"
;
public
static
final
String
WHOSAWME_clueList
=
HOST
+
"/kjj/visit/clue/list"
;
// *************** 运营周报 ***************
public
static
final
String
WEEKLY_INDEXINFO
=
HOST
+
"/kjy/mp/weekly/getWeeklyIndexInfo"
;
...
...
src/test/java/com/kjj/utils/BaseUtils.java
View file @
a6e8c677
...
...
@@ -73,6 +73,7 @@ public class BaseUtils {
Map
<
String
,
Object
>
result
=
KjyUserDB
.
getInstance
().
findSimpleResult
(
UserSqlFactory
.
selectUserIdByOpenId
,
openId
);
Object
userId
=
result
.
get
(
"user_id"
);
sleep
(
1000
);
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"userId"
,
userId
);
params
.
put
(
"validDays"
,
365
);
...
...
@@ -95,6 +96,7 @@ public class BaseUtils {
System
.
out
.
println
(
"取关\n"
+
response
.
body
().
asString
());
network
.
agentHeaders
.
put
(
"Content-Type"
,
"application/json"
);
Object
userId
=
result
.
get
(
"user_id"
);
System
.
out
.
println
(
userId
);
return
userId
;
}
...
...
src/test/java/com/kjj/utils/NetworkUtils.java
View file @
a6e8c677
...
...
@@ -28,7 +28,7 @@ public class NetworkUtils {
//cookies中的tku
agentCookies
.
put
(
"tku"
,
AGENT_TKU
);
//多场景测试标志
// agentCookies.put("_duibaServiceGroupKey","miria-2679
");
agentCookies
.
put
(
"_duibaServiceGroupKey"
,
"miria-2652
"
);
//json类型的headers
agentHeaders
.
put
(
"Content-Type"
,
"application/json"
);
//二进制文件的headers
...
...
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