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
d23e0c3d
Commit
d23e0c3d
authored
Dec 10, 2021
by
龚小红
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
删除邀请关系绑定接口取消,并修改获取代理人二维码的轮询规则
parent
4a4b0014
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
15 deletions
+15
-15
Cashback.java
src/test/java/com/kjj/cases/assistant/pay/Cashback.java
+0
-9
AfterLive.java
src/test/java/com/kjj/cases/live/customer/AfterLive.java
+10
-3
BasicConfig.java
src/test/java/com/kjj/config/BasicConfig.java
+0
-1
DingTalkUtils.java
src/test/java/com/kjj/utils/DingTalkUtils.java
+4
-2
wechatTestNG.xml
src/test/wechatTestNG.xml
+1
-0
No files found.
src/test/java/com/kjj/cases/assistant/pay/Cashback.java
View file @
d23e0c3d
...
...
@@ -293,13 +293,4 @@ public class Cashback implements Authorization {
Assert
.
assertTrue
(
changeMoney1
==
35.0
,
network
.
message
(
PAY_accDetail
,
"一级付费普通代理人返现金额不为35"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"删除邀请关系"
,
priority
=
15
)
public
void
删除邀请关系
()
{
Map
<
String
,
Object
>
Params
=
new
HashMap
<>();
Params
.
put
(
"sellerId"
,
186
);
Response
response
=
network
.
postResponse
(
Params
,
PAY_delete
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
PAY_delete
,
"删除失败"
,
response
.
body
().
asString
()));
}
}
src/test/java/com/kjj/cases/live/customer/AfterLive.java
View file @
d23e0c3d
...
...
@@ -6,6 +6,7 @@ import com.kjj.cases.live.anchor.LiveVisitors;
import
com.kjj.cases.live.lottery.Lottery
;
import
com.kjj.config.BasicConfig
;
import
com.kjj.constants.LiveConstants
;
import
com.kjj.utils.IdMakeUtil
;
import
io.restassured.response.Response
;
import
org.testng.Assert
;
import
org.testng.annotations.BeforeClass
;
...
...
@@ -14,19 +15,22 @@ import org.testng.collections.Lists;
import
java.util.*
;
import
static
com
.
kjj
.
utils
.
ThreadSleepUtils
.
sleep
;
public
class
AfterLive
implements
Authorization
{
private
Map
<
String
,
Object
>
params
;
private
String
encodeLiveId
;
@BeforeClass
public
void
SetUp
(){
visitorAuth1
();
}
public
void
SetUp
(){
visitorAuth1
();
params
=
new
HashMap
<>();}
// 获取访客直播结束页样式
@Test
(
description
=
"获取访客直播结束页样式"
,
priority
=
1
)
public
void
获取访客直播结束页样式
(){
encodeLiveId
=
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
());
// 获取直播ID
params
=
new
HashMap
<>();
params
.
put
(
"liveId"
,
encodeLiveId
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
USER_liveEnd
);
Assert
.
assertTrue
(
response
.
jsonPath
().
getBoolean
(
"success"
),
network
.
message
(
params
,
BasicConfig
.
USER_liveEnd
,
"接口调用失败"
,
response
.
body
().
asString
()));
...
...
@@ -55,7 +59,10 @@ public class AfterLive implements Authorization {
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
USER_getAgentQrCode
);
Assert
.
assertTrue
(
response
.
jsonPath
().
getBoolean
(
"success"
),
network
.
message
(
params
,
BasicConfig
.
USER_getAgentQrCode
,
"接口请求失败"
,
response
.
body
().
asString
()));
int
pollingResult
=
response
.
jsonPath
().
getInt
(
"data.pollingResult"
);
while
(
pollingResult
==
2
){
int
i
=
0
;
while
(
pollingResult
==
2
&&
i
!=
10
){
i
++;
sleep
(
1000
);
response
=
network
.
getResponse
(
params
,
BasicConfig
.
USER_getAgentQrCode
);
pollingResult
=
response
.
jsonPath
().
getInt
(
"data.pollingResult"
);
}
...
...
src/test/java/com/kjj/config/BasicConfig.java
View file @
d23e0c3d
...
...
@@ -803,7 +803,6 @@ public class BasicConfig {
public
static
final
String
PAY_popup
=
HOST
+
"/kjj/vip/order/other/popup"
;
public
static
final
String
PAY_distribute
=
HOST
+
"/kjj/auto/test/proCode/distribute"
;
public
static
final
String
PAY_bind
=
HOST
+
"/kjj/auto/test/invitation/bind"
;
public
static
final
String
PAY_delete
=
HOST
+
"/kjj/auto/test/invitation/delete"
;
// *************** 名片 ***************
public
static
final
String
SELLERCARD_topOfDetail
=
HOST
+
"/kjy/mp/sellerCardV5/topOfDetail"
;
...
...
src/test/java/com/kjj/utils/DingTalkUtils.java
View file @
d23e0c3d
...
...
@@ -23,17 +23,19 @@ public class DingTalkUtils {
//测试结果
context
=
"【接口自动化测试结果反馈】\n"
+
context
+
"报告地址: http://10.172.58.199/view/kkk/job/kejiji_interface/HTML_20Report\n"
+
"@龚小红"
;
+
"报告地址: http://10.172.58.199/view/kkk/job/kejiji_interface/HTML_20Report\n"
;
System
.
out
.
println
(
context
);
Map
<
String
,
Object
>
contentParams
=
new
HashMap
<
String
,
Object
>();
contentParams
.
put
(
"content"
,
context
);
Map
<
String
,
Object
>
atParams
=
new
HashMap
<
String
,
Object
>();
atParams
.
put
(
"atMobiles"
,
"17830855590"
);
//钉钉机器人消息体
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"msgtype"
,
"text"
);
params
.
put
(
"text"
,
contentParams
);
params
.
put
(
"at"
,
atParams
);
//发起dingding机器人通知
if
(
isPushReport
){
...
...
src/test/wechatTestNG.xml
View file @
d23e0c3d
...
...
@@ -101,6 +101,7 @@
<class
name=
"com.kjj.cases.assistant.enterpriseAgent.EnterpriseAgent"
/>
</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