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
c6ad7b93
Commit
c6ad7b93
authored
Jun 17, 2020
by
Su-Yi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增首页case
parent
83312f4a
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
536 additions
and
1505 deletions
+536
-1505
Article.java
src/test/java/com/kjj/qa/cases/Article.java
+1
-1
Upload.java
src/test/java/com/kjj/qa/cases/Upload.java
+4
-4
BasicConfig.java
src/test/java/com/kjj/qa/config/BasicConfig.java
+8
-3
testNG.xml
src/test/testNG.xml
+12
-7
Upload.class
target/test-classes/com/kjj/qa/cases/Upload.class
+0
-0
NetworkUtil.class
target/test-classes/com/kjj/qa/utils/NetworkUtil.class
+0
-0
report.html
test-output/report.html
+511
-1490
No files found.
src/test/java/com/kjj/qa/cases/Article.java
View file @
c6ad7b93
...
...
@@ -188,7 +188,7 @@ public class Article {
boolean
isDisplay
=
response
.
jsonPath
().
getBoolean
(
"data.isDisplay"
);
String
riskScid
=
response
.
jsonPath
().
getString
(
"data.scid"
);
Assert
.
assertTrue
(
isDisplay
,
network
.
message
(
params
,
ARTICLE_ISDISPLAYACTIVITY
,
"互动区-风险评测显示有误"
));
Assert
.
assert
Equals
(
riskScid
,
RISK_CONTENTID
,
network
.
message
(
params
,
ARTICLE_ISDISPLAYACTIVITY
,
"互动区-风险评测内容有误"
));
Assert
.
assert
NotNull
(
riskScid
,
network
.
message
(
params
,
ARTICLE_ISDISPLAYACTIVITY
,
"互动区-风险评测内容有误"
));
}
// 获取代理人个人专栏
...
...
src/test/java/com/kjj/qa/cases/Upload.java
View file @
c6ad7b93
...
...
@@ -138,16 +138,16 @@ public class Upload {
//获取文章的榜单
Response
response
=
network
.
getResponse
(
UPLOAD_HOT
);
String
contentType
=
response
.
jsonPath
().
getString
(
"data[0].contentType"
);
//列表的素材类型
int
length
=
response
.
jsonPath
().
getInt
(
"data.size()"
)
;
//列表的长度
boolean
isList
=
response
.
jsonPath
().
getInt
(
"data.size()"
)
>
0
;
//列表的长度
Assert
.
assertEquals
(
contentType
,
"article"
,
network
.
message
(
UPLOAD_HOT
,
"获取大家都在转-文章列表内容有误"
));
Assert
.
assert
Equals
(
length
,
10
,
network
.
message
(
UPLOAD_HOT
,
"获取大家都在转-文章列表数量有误"
));
Assert
.
assert
True
(
isList
,
network
.
message
(
UPLOAD_HOT
,
"获取大家都在转-文章列表数量有误"
));
//获取视频的榜单
response
=
network
.
getResponse
(
UPLOAD_VIDEOHOT
);
contentType
=
response
.
jsonPath
().
getString
(
"data[0].contentType"
);
length
=
response
.
jsonPath
().
getInt
(
"data.size()"
)
;
isList
=
response
.
jsonPath
().
getInt
(
"data.size()"
)
>
0
;
Assert
.
assertEquals
(
contentType
,
"video"
,
network
.
message
(
UPLOAD_VIDEOHOT
,
"获取大家都在转-视频列表内容有误"
));
Assert
.
assert
Equals
(
length
,
10
,
network
.
message
(
UPLOAD_VIDEOHOT
,
"获取大家都在转-视频列表数量有误"
));
Assert
.
assert
True
(
isList
,
network
.
message
(
UPLOAD_VIDEOHOT
,
"获取大家都在转-视频列表数量有误"
));
}
//我的上传:
...
...
src/test/java/com/kjj/qa/config/BasicConfig.java
View file @
c6ad7b93
...
...
@@ -8,7 +8,7 @@ public class BasicConfig {
// *************** TKU ***************
public
static
final
String
AGENT_TKU
=
"T3gM31f18jAW
dsgwEXerFu4dYyoQcnhivxyRx2wA2KmB989G6CTqzhTceYm81EiUQqHQZ5r14ZefWuDZrK
"
;
public
static
final
String
AGENT_TKU
=
"T3gM31f18jAW
2hmLVigXt9nYVe4e4H7vTT1e3s9Pfk5uWx7Av1Lf6T51Bs2bLP676zou48U7W5FYYW4nMr
"
;
public
static
final
String
VISITOR_TKU
=
"T3gM31f18jAWudwfTW6o9zs27w5xMjdhLHsKVP3cHo9Aj7Q4Fg7WyEkqXiKWWdLHka1jjGseU7JpgC2UaU"
;
...
...
@@ -30,8 +30,7 @@ public class BasicConfig {
public
static
final
String
UPLOAD_CONTENTID
=
"Kj21NjA1NTE"
;
//风险评测
public
static
final
String
RISK_CONTENTID
=
"Kj20MTM0MDA3"
;
// *************** 公共 ***************
public
static
final
String
VERSION_INFO
=
"/kjy/mp/version/info"
;
...
...
@@ -148,4 +147,10 @@ public class BasicConfig {
// ************** 设置中心 ***************
public
static
final
String
SELLERCONFIG_EDITCONFIG
=
"/kjy/mp/sellerConfig/editConfig"
;
// ************************* 管理后台 **************************
public
static
final
String
TESTUSER_DISABLEUSER
=
"kjj-mng.duibatest.com.cn/kjy/manager/testUser/disableUser"
;
}
src/test/testNG.xml
View file @
c6ad7b93
...
...
@@ -6,11 +6,11 @@
<!-- <class name="com.kjj.qa.cases.Home"/>-->
<!-- </classes>-->
<!-- </test>-->
<test
preserve-order=
"true"
name=
"支付"
>
<classes
>
<class
name=
"com.kjj.qa.cases.Pay"
/
>
</classes
>
</test
>
<!-- <test preserve-order="true" name="支付">--
>
<!-- <classes>--
>
<!-- <class name="com.kjj.qa.cases.Pay"/>--
>
<!-- </classes>--
>
<!-- </test>--
>
<test
preserve-order=
"true"
name=
"名片"
>
<classes>
<class
name=
"com.kjj.qa.cases.SellerCard"
/>
...
...
@@ -21,9 +21,14 @@
<class
name=
"com.kjj.qa.cases.Upload"
/>
</classes>
</test>
<test
preserve-order=
"true"
name=
"新手任务"
>
<!-- <test preserve-order="true" name="新手任务">-->
<!-- <classes>-->
<!-- <class name="com.kjj.qa.cases.Novice"/>-->
<!-- </classes>-->
<!-- </test>-->
<test
preserve-order=
"true"
name=
"文章"
>
<classes>
<class
name=
"com.kjj.qa.cases.
Novic
e"
/>
<class
name=
"com.kjj.qa.cases.
Articl
e"
/>
</classes>
</test>
<!-- 监听器-->
...
...
target/test-classes/com/kjj/qa/cases/Upload.class
View file @
c6ad7b93
No preview for this file type
target/test-classes/com/kjj/qa/utils/NetworkUtil.class
View file @
c6ad7b93
No preview for this file type
test-output/report.html
View file @
c6ad7b93
This source diff could not be displayed because it is too large. You can
view the blob
instead.
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