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
7965fb6c
Commit
7965fb6c
authored
Aug 05, 2021
by
张艳玲
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
准客户需求
parent
d1db4f51
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
314 additions
and
377 deletions
+314
-377
Novice.java
src/test/java/com/kjj/cases/basics/Novice.java
+0
-251
Agent.java
src/test/java/com/kjj/cases/live/agent/Agent.java
+5
-6
Customer.java
src/test/java/com/kjj/cases/live/agent/Customer.java
+148
-108
LiveLater.java
src/test/java/com/kjj/cases/live/agent/LiveLater.java
+2
-2
Potential.java
src/test/java/com/kjj/cases/live/agent/Potential.java
+110
-0
LiveVisitors.java
src/test/java/com/kjj/cases/live/anchor/LiveVisitors.java
+29
-6
FlipCard.java
src/test/java/com/kjj/cases/live/flipCard/FlipCard.java
+1
-1
BasicConfig.java
src/test/java/com/kjj/config/BasicConfig.java
+14
-3
liveTestNG.xml
src/test/liveTestNG.xml
+5
-0
No files found.
src/test/java/com/kjj/cases/basics/Novice.java
deleted
100644 → 0
View file @
d1db4f51
This diff is collapsed.
Click to expand it.
src/test/java/com/kjj/cases/live/agent/Agent.java
View file @
7965fb6c
...
...
@@ -22,8 +22,6 @@ import static com.kjj.config.BasicConfig.*;
public
class
Agent
implements
Authorization
{
@BeforeClass
public
void
setUp
()
{
agentAuth
();
}
public
String
id
;
public
String
videoId
;
public
String
videoTitle
;
...
...
@@ -35,14 +33,15 @@ public class Agent implements Authorization {
public
String
teamName
;
public
String
sellerName
;
@BeforeClass
public
void
setUp
()
{
agentAuth
();
}
@Test
(
description
=
"获取用户信息判断是否是代理人"
,
priority
=
1
)
public
void
获取用户信息判断是否是代理人
()
{
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_userInfo1
);
Object
data
=
response
.
jsonPath
().
getJsonObject
(
"data"
);
System
.
out
.
println
(
data
);
System
.
out
.
println
(
response
.
body
().
asString
());
Object
jobNumber
=
response
.
jsonPath
().
getJsonObject
(
"data.jobNumber"
);
System
.
out
.
println
(
jobNumber
);
Assert
.
assertNotNull
(
jobNumber
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_userInfo1
,
"用户非代理人"
,
response
.
body
().
asString
()));
}
...
...
@@ -52,8 +51,8 @@ public class Agent implements Authorization {
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"appid"
,
"wx4d7276f866bd24c8"
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_isForbidden
);
System
.
out
.
println
(
response
.
body
().
asString
());
Boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
System
.
out
.
println
(
data
);
Assert
.
assertFalse
(
data
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_isForbidden
,
"禁止分享"
,
response
.
body
().
asString
()));
}
...
...
src/test/java/com/kjj/cases/live/agent/Customer.java
View file @
7965fb6c
This diff is collapsed.
Click to expand it.
src/test/java/com/kjj/cases/live/agent/LiveLater.java
View file @
7965fb6c
...
...
@@ -17,11 +17,11 @@ import java.util.List;
import
java.util.Map
;
public
class
LiveLater
implements
Authorization
{
public
String
pageSize
;
public
List
<
LiveUserList
>
liveUserId
;
@BeforeClass
public
void
setUp
()
{
agentAuth
();
}
public
String
pageSize
;
public
List
<
LiveUserList
>
liveUserId
;
//获取回收成功案例
...
...
src/test/java/com/kjj/cases/live/agent/Potential.java
0 → 100644
View file @
7965fb6c
package
com
.
kjj
.
cases
.
live
.
agent
;
import
com.kjj.cases.admin.Authorization
;
import
com.kjj.config.BasicConfig
;
import
com.kjj.constants.LiveConstants
;
import
com.kjj.utils.ThreadSleepUtils
;
import
io.restassured.response.Response
;
import
org.testng.Assert
;
import
org.testng.annotations.BeforeClass
;
import
org.testng.annotations.Test
;
import
java.util.HashMap
;
import
java.util.Map
;
public
class
Potential
implements
Authorization
{
public
String
bizConfId
;
@BeforeClass
public
void
setUp
()
{
visitorAuth
();
}
@Test
(
description
=
"直播间名片"
,
priority
=
1
)
public
void
直播间名片
()
{
Map
<
String
,
Object
>
Params
=
new
HashMap
<>();
Params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
Response
response
=
network
.
getResponse
(
Params
,
BasicConfig
.
ANCHOR_card
);
System
.
out
.
println
(
response
.
body
().
asString
());
Object
data
=
response
.
jsonPath
().
getJsonObject
(
"data"
);
Assert
.
assertNotNull
(
data
,
network
.
message
(
Params
,
BasicConfig
.
ANCHOR_card
,
"未获取直播间名片信息"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"获取推送问题咨询"
,
priority
=
2
)
public
void
获取推送问题
()
{
Map
<
String
,
Object
>
Params
=
new
HashMap
<>();
Params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
Response
response
=
network
.
getResponse
(
Params
,
BasicConfig
.
ANCHOR_questions
);
System
.
out
.
println
(
response
.
body
().
asString
());
bizConfId
=
response
.
jsonPath
().
getString
(
"data[0].id"
);
Assert
.
assertNotNull
(
bizConfId
,
network
.
message
(
Params
,
BasicConfig
.
ANCHOR_questions
,
"为获取到问题ID"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"潜在客户提交咨询信息"
,
priority
=
3
)
public
void
潜在客户提交信息
()
{
Map
<
String
,
Object
>
Params
=
new
HashMap
<>();
Params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
Params
.
put
(
"bizConfId"
,
bizConfId
);
Params
.
put
(
"chanceType"
,
1
);
Response
response
=
network
.
postResponse
(
Params
,
BasicConfig
.
ANCHOR_submit
);
System
.
out
.
println
(
response
.
body
().
asString
());
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
Params
,
BasicConfig
.
ANCHOR_submit
,
"客户提交信息失败"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"潜在客户标记同意"
,
priority
=
4
)
public
void
潜在客户标记同意
()
{
Map
<
String
,
Object
>
Params
=
new
HashMap
<>();
Params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
Params
.
put
(
"bizConfId"
,
bizConfId
);
Params
.
put
(
"chanceType"
,
1
);
Params
.
put
(
"agreeFlag"
,
true
);
Response
response
=
network
.
postResponse
(
Params
,
BasicConfig
.
ANCHOR_agree
);
System
.
out
.
println
(
response
.
body
().
asString
());
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
Params
,
BasicConfig
.
ANCHOR_agree
,
"客户未标记同意"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"获取访客已提交的问题"
,
priority
=
5
)
public
void
获取访客已提交的问题
()
{
Map
<
String
,
Object
>
Params
=
new
HashMap
<>();
Params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
Response
response
=
network
.
getResponse
(
Params
,
BasicConfig
.
ANCHOR_questionSubmitted
);
System
.
out
.
println
(
response
.
body
().
asString
());
String
id
=
response
.
jsonPath
().
getString
(
"data.id"
);
Assert
.
assertEquals
(
id
,
bizConfId
,
network
.
message
(
Params
,
BasicConfig
.
ANCHOR_questionSubmitted
,
"访客已提交的问题为null"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"获取访客跟进机会同意状态"
,
priority
=
6
)
public
void
获取访客跟进机会同意状态
()
{
ThreadSleepUtils
.
sleep
(
1000
);
Map
<
String
,
Object
>
Params
=
new
HashMap
<>();
Params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
Params
.
put
(
"chanceType"
,
1
);
Params
.
put
(
"bizConfId"
,
bizConfId
);
Response
response
=
network
.
getResponse
(
Params
,
BasicConfig
.
ANCHOR_agreeStatus
);
System
.
out
.
println
(
response
.
body
().
asString
());
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
Params
,
BasicConfig
.
ANCHOR_agreeStatus
,
"客跟进机会同意状态为false"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"获取对话模版oss地址"
,
priority
=
7
)
public
void
获取对话模版
oss
地址
()
{
Response
response
=
network
.
getResponse
(
BasicConfig
.
ANCHOR_ossDialogue
);
System
.
out
.
println
(
response
.
body
().
asString
());
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertNotNull
(
data
,
network
.
message
(
BasicConfig
.
ANCHOR_ossDialogue
,
"未获取到对话模版oss地址"
,
response
.
body
().
asString
()));
}
}
src/test/java/com/kjj/cases/live/anchor/LiveVisitors.java
View file @
7965fb6c
...
...
@@ -19,7 +19,6 @@ import java.util.Map;
public
class
LiveVisitors
implements
Authorization
{
public
String
confId_imageText
;
public
String
confId_form
;
public
String
confId_link
;
...
...
@@ -28,8 +27,6 @@ public class LiveVisitors implements Authorization
public
String
id
;
public
List
<
ResourcePushList
>
PushList
;
/*助播端端权益列表*/
@Test
(
description
=
"助播端权益列表"
,
priority
=
1
)
public
void
助播端权益列表
()
...
...
@@ -251,9 +248,6 @@ public class LiveVisitors implements Authorization
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_ResourceTestSubmit
,
"提交秒薪测试失败"
,
response
.
body
().
asString
()));
}
//********************代理人*************//
//********************代理人*************//
//********************代理人*************//
/*代理人端权益列表查询*/
@Test
(
description
=
"代理人端权益列表查询"
,
priority
=
14
)
public
void
代理人端权益列表查询
()
...
...
@@ -418,6 +412,7 @@ public class LiveVisitors implements Authorization
public
void
获取推送列表
()
{
adminAuth
();
ThreadSleepUtils
.
sleep
(
1000
);
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
params
.
put
(
"confId"
,
this
.
PushList
.
get
(
5
).
getConfId
());
...
...
@@ -454,9 +449,37 @@ public class LiveVisitors implements Authorization
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_pasterOff
,
"贴片下架失败"
,
response
.
body
().
asString
()));
}
/**
* 资料-我要咨询
*/
@Test
(
description
=
"资料咨询时客户标记同意"
,
priority
=
28
)
public
void
资料咨询时客户标记同意
()
{
Map
<
String
,
Object
>
Params
=
new
HashMap
<>();
Params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
Params
.
put
(
"bizConfId"
,
confId_link
);
Params
.
put
(
"chanceType"
,
2
);
Params
.
put
(
"agreeFlag"
,
true
);
Response
response
=
network
.
postResponse
(
Params
,
BasicConfig
.
ANCHOR_agree
);
System
.
out
.
println
(
response
.
body
().
asString
());
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
Params
,
BasicConfig
.
ANCHOR_agree
,
"客户未标记同意"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"获取访客跟进机会同意状态"
,
priority
=
29
)
public
void
获取访客跟进机会同意状态
()
{
Map
<
String
,
Object
>
Params
=
new
HashMap
<>();
Params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
Params
.
put
(
"chanceType"
,
2
);
Params
.
put
(
"bizConfId"
,
confId_link
);
Response
response
=
network
.
getResponse
(
Params
,
BasicConfig
.
ANCHOR_agreeStatus
);
System
.
out
.
println
(
response
.
body
().
asString
());
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
Params
,
BasicConfig
.
ANCHOR_agreeStatus
,
"客跟进机会同意状态为false"
,
response
.
body
().
asString
()));
}
}
src/test/java/com/kjj/cases/live/flipCard/FlipCard.java
View file @
7965fb6c
...
...
@@ -164,7 +164,7 @@ public class FlipCard implements Authorization {
params
.
put
(
"shareType"
,
2
);
Response
signRes
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_sign
);
String
data
=
signRes
.
jsonPath
().
getString
(
"data"
);
this
.
shareSign
=
data
;
shareSign
=
data
;
System
.
out
.
println
(
shareSign
);
Assert
.
assertNotNull
(
shareSign
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_sign
,
"分享失败"
,
signRes
.
body
().
asString
()));
...
...
src/test/java/com/kjj/config/BasicConfig.java
View file @
7965fb6c
...
...
@@ -97,6 +97,15 @@ public class BasicConfig {
public
static
final
String
ANCHOR_getConfDetail
=
MOBILE_HOST
+
"/conf/pre/getConfDetail"
;
public
static
final
String
ANCHOR_CLOSE
=
MOBILE_HOST
+
"/conf/live/close"
;
// *************** 准客户 ***************
public
static
final
String
ANCHOR_card
=
MOBILE_HOST
+
"/clue/agent/card"
;
public
static
final
String
ANCHOR_questions
=
MOBILE_HOST
+
"/kjy/live/agent/potential/questions"
;
public
static
final
String
ANCHOR_submit
=
MOBILE_HOST
+
"/kjy/live/agent/potential/submit"
;
public
static
final
String
ANCHOR_agree
=
MOBILE_HOST
+
"/kjy/live/agent/potential/agree"
;
public
static
final
String
ANCHOR_questionSubmitted
=
MOBILE_HOST
+
"/kjy/live/agent/potential/questionSubmitted"
;
public
static
final
String
ANCHOR_agreeStatus
=
MOBILE_HOST
+
"/kjy/live/agent/potential/agreeStatus"
;
public
static
final
String
ANCHOR_ossDialogue
=
MOBILE_HOST
+
"/kjy/live/agent/potential/ossDialogue"
;
// *************** 预告页配置 ***************
public
static
final
String
MANAGER_preViewWelfareList
=
MANAGER_HOST
+
"/kjy/manager/preView/conf/welfareList"
;
public
static
final
String
MANAGER_confMainWelfare
=
MANAGER_HOST
+
"/kjy/manager/preView/conf/confMainWelfare"
;
...
...
@@ -360,15 +369,17 @@ public class BasicConfig {
//客户管理
public
static
final
String
MOBILE_potentialCount
=
MOBILE_HOST
+
"/kjy/live/agent/customer/potentialCount"
;
public
static
final
String
MOBILE_customerList
=
MOBILE_HOST
+
"/kjy/live/agent/customer/list"
;
public
static
final
String
MOBILE_
count
=
MOBILE_HOST
+
"/kjy/live/agent/customer/coun
t"
;
public
static
final
String
MOBILE_
lastLiveList
=
MOBILE_HOST
+
"/kjy/live/agent/customer/lastLiveLis
t"
;
public
static
final
String
MOBILE_basicInfo
=
MOBILE_HOST
+
"/kjy/live/agent/customer/basicInfo"
;
public
static
final
String
MOBILE_clueInfo
=
MOBILE_HOST
+
"/kjy/live/agent/customer/clueInfo"
;
public
static
final
String
MOBILE_customerUpdate
=
MOBILE_HOST
+
"/kjy/live/agent/customer/update"
;
public
static
final
String
MOBILE_customerDetail
=
MOBILE_HOST
+
"/kjy/live/agent/customer/detail"
;
public
static
final
String
MOBILE_liveInfo
=
MOBILE_HOST
+
"/kjy/live/agent/customer/liveInfo"
;
// public static final String MOBILE_updateRemarkName = MOBILE_HOST + "/kjy/live/agent/customer/updateRemarkName";
public
static
final
String
MOBILE_followChanceList
=
MOBILE_HOST
+
"/kjy/live/agent/customer/followChanceList"
;
public
static
final
String
MOBILE_customerGetReplyAdvice
=
MOBILE_HOST
+
"/kjy/live/agent/customer/getReplyAdvice"
;
public
static
final
String
MOBILE_followChanceDetail
=
MOBILE_HOST
+
"/kjy/live/agent/customer/followChanceDetail"
;
// *************** 代理人 ***************
public
static
final
String
MOBILE_recycleSuccessCase
=
MOBILE_HOST
+
"/kjy/live/agent/clue/recycleSuccessCase"
;
public
static
final
String
MOBILE_providerInfo
=
MOBILE_HOST
+
"/kjy/live/agent/clue/providerInfo"
;
...
...
src/test/liveTestNG.xml
View file @
7965fb6c
...
...
@@ -125,6 +125,11 @@
<class
name=
"com.kjj.cases.live.FreeReward.FreeReward"
/>
</classes>
</test>
<test
preserve-order=
"true"
name=
"我要咨询"
>
<classes>
<class
name=
"com.kjj.cases.live.agent.Potential"
/>
</classes>
</test>
<test
preserve-order=
"true"
name=
"访客领取资料"
>
<classes>
...
...
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