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
78e8c0bb
Commit
78e8c0bb
authored
Jul 16, 2020
by
Su-Yi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增贺卡、修改tku
parent
f5a32d69
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
483 additions
and
375 deletions
+483
-375
Boss.java
src/test/java/com/kjj/qa/cases/Boss.java
+1
-0
GreetingCard.java
src/test/java/com/kjj/qa/cases/GreetingCard.java
+83
-0
SellerCard.java
src/test/java/com/kjj/qa/cases/SellerCard.java
+2
-2
BasicConfig.java
src/test/java/com/kjj/qa/config/BasicConfig.java
+27
-8
testNG.xml
src/test/testNG.xml
+5
-0
Article.class
target/test-classes/com/kjj/qa/cases/Article.class
+0
-0
report.html
test-output/report.html
+365
-365
No files found.
src/test/java/com/kjj/qa/cases/Boss.java
View file @
78e8c0bb
...
...
@@ -21,6 +21,7 @@ import static com.kjj.qa.config.BasicConfig.BOSS_USERINFO;
public
class
Boss
{
private
static
final
NetworkUtil
network
=
NetworkUtil
.
getInstance
();
String
sellerId
=
""
;
String
usellerId
=
""
;
String
sids
=
""
;
...
...
src/test/java/com/kjj/qa/cases/GreetingCard.java
0 → 100644
View file @
78e8c0bb
package
com
.
kjj
.
qa
.
cases
;
import
com.kjj.qa.utils.NetworkUtil
;
import
io.restassured.response.Response
;
import
org.testng.Assert
;
import
org.testng.annotations.AfterClass
;
import
org.testng.annotations.BeforeClass
;
import
org.testng.annotations.Test
;
import
java.io.IOException
;
import
java.util.HashMap
;
import
java.util.Map
;
import
static
com
.
kjj
.
qa
.
config
.
BasicConfig
.*;
public
class
GreetingCard
{
private
static
final
NetworkUtil
network
=
NetworkUtil
.
getInstance
();
int
tagId
=
0
;
String
contentId
=
""
;
@BeforeClass
public
void
setUp
()
{
}
// BANNER
@Test
(
description
=
"BANNER"
,
priority
=
1
)
public
void
BANNER
()
throws
IOException
{
Response
response
=
network
.
getResponse
(
GREETING_BANNER
);
boolean
hasList
=
response
.
jsonPath
().
getInt
(
"data.size()"
)
>
0
;
Assert
.
assertTrue
(
hasList
,
network
.
message
(
GREETING_BANNER
,
"获取Banner列表失败"
));
}
// 转发最多
@Test
(
description
=
"大家都在发"
,
priority
=
2
)
public
void
大家都在发
()
throws
IOException
{
Response
response
=
network
.
getResponse
(
GREETING_ALLFORWARD
);
boolean
hasList
=
response
.
jsonPath
().
getInt
(
"data.size()"
)
>
0
;
Assert
.
assertTrue
(
hasList
,
network
.
message
(
GREETING_ALLFORWARD
,
"获取大家都在发列表失败"
));
}
// 贺卡tab
@Test
(
description
=
"贺卡tab"
,
priority
=
3
)
public
void
贺卡
tab
()
throws
IOException
{
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"tagType"
,
"greeting_card"
);
params
.
put
(
"exclusiveArea"
,
0
);
Response
response
=
network
.
getResponse
(
params
,
GREETING_FINDBYTYPE
);
int
totalCount
=
response
.
jsonPath
().
getInt
(
"data.list.size()"
);
tagId
=
response
.
jsonPath
().
getInt
(
"data.list[-1].id"
);
Assert
.
assertEquals
(
totalCount
,
3
,
network
.
message
(
params
,
GREETING_FINDBYTYPE
,
"获取贺卡tab失败"
));
}
// 获取539的贺卡列表
@Test
(
description
=
"生日tab贺卡列表"
,
priority
=
3
)
public
void
生日
tab
贺卡列表
()
throws
IOException
{
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"pageIndex"
,
1
);
params
.
put
(
"pageSize"
,
10
);
params
.
put
(
"type"
,
6
);
params
.
put
(
"tag1Id"
,
tagId
);
Response
response
=
network
.
getResponse
(
params
,
GREETING_PAGELIST
);
boolean
hasList
=
response
.
jsonPath
().
getInt
(
"data.list.size()"
)
>
0
;
contentId
=
response
.
jsonPath
().
getString
(
"data.list[0].id"
);
Assert
.
assertTrue
(
hasList
,
network
.
message
(
params
,
GREETING_PAGELIST
,
"获取贺卡tab失败"
));
}
// 我送出的贺卡列表
@Test
(
description
=
"我送出的贺卡列表"
,
priority
=
3
)
public
void
我送出的贺卡列表
()
throws
IOException
{
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"pageIndex"
,
1
);
params
.
put
(
"pageSize"
,
10
);
Response
response
=
network
.
getResponse
(
params
,
GREETING_CONFLIST
);
boolean
hasList
=
response
.
jsonPath
().
getInt
(
"data.list.size()"
)
>
0
;
Assert
.
assertFalse
(
hasList
,
network
.
message
(
params
,
GREETING_CONFLIST
,
"获取我的贺卡初始列表数量有误"
));
}
@AfterClass
public
static
void
tearDown
(){
apiCount
+=
5
;
}
}
src/test/java/com/kjj/qa/cases/SellerCard.java
View file @
78e8c0bb
...
...
@@ -146,7 +146,7 @@ public class SellerCard {
params
.
put
(
"scid"
,
scid
);
Response
response
=
network
.
getResponse
(
params
,
SELLERCARD_ISDISPLAYACTIVITY
);
String
contentId
=
response
.
jsonPath
().
getString
(
"data.contentId"
);
//写死风险评测id
Assert
.
assertEquals
(
contentId
,
"Kj21Mz
Y5OTk
"
,
network
.
message
(
params
,
SELLERCARD_ISDISPLAYACTIVITY
,
"风险评测-获取失败"
));
Assert
.
assertEquals
(
contentId
,
"Kj21Mz
c0NzE
"
,
network
.
message
(
params
,
SELLERCARD_ISDISPLAYACTIVITY
,
"风险评测-获取失败"
));
}
//
...
...
@@ -156,7 +156,7 @@ public class SellerCard {
params
.
put
(
"pageIndex"
,
1
);
params
.
put
(
"pageSize"
,
200
);
Response
response
=
network
.
getResponse
(
params
,
SELLERCARD_COMPANYLIST
);
String
companyId
=
response
.
jsonPath
().
getString
(
"data.list.find {it.companyName == '
杭州兑吧网络科技有限公司
'}.id"
);
String
companyId
=
response
.
jsonPath
().
getString
(
"data.list.find {it.companyName == '
太平洋保险
'}.id"
);
Assert
.
assertNotNull
(
companyId
,
network
.
message
(
params
,
SELLERCARD_COMPANYLIST
,
"公司列表-获取失败"
));
...
...
src/test/java/com/kjj/qa/config/BasicConfig.java
View file @
78e8c0bb
...
...
@@ -6,11 +6,11 @@ public class BasicConfig {
// *************** 配置信息,每次重新配置以下信息就ok ***************
// 是否推送
public
static
final
boolean
isPushReport
=
fals
e
;
//true
public
static
final
boolean
isPushReport
=
tru
e
;
//true
// 用户微信昵称
public
static
final
String
WECHAT_NAME
=
"小疙瘩人寿"
;
//true
// 用户tku
public
static
final
String
AGENT_TKU
=
"T3gM31f18jAW
2PVEuxwPreHo8jGtZ4RXgxzf6auDUuycYgcqWT9RW2qrbYKFVpTCj4yhhp9BfQ6RDrgfYK
"
;
public
static
final
String
AGENT_TKU
=
"T3gM31f18jAW
Cm8UgfhkgUGK6keS7psk3kRcFaD3xYNRpmGEK2sydf3d6vD6vzJzcwuQW844ndqTRHq7mX
"
;
// *************** 钉钉机器人 ***************
// 线上-告警群
...
...
@@ -18,6 +18,7 @@ public class BasicConfig {
// 测试
// public static final String DINGTALKPATH = "https://oapi.dingtalk.com/robot/send?access_token=e4b7d997fb9f90b17672dcdb9c9922d52c59f741b82081a368f4d3c305c1afcd";
// *************** 客集集域名 ***************
public
static
final
String
HOST
=
"https://kjj.m.duibatest.com.cn"
;
...
...
@@ -29,6 +30,7 @@ public class BasicConfig {
// *************** TKU ***************
public
static
final
String
VISITOR_TKU
=
"T3gM31f18jAW2hicRDxbwHFSuwA4MMVLLeHZ5G4yvb3kN3GLCWAGnZVPFsnr6i8exgC4uYrYUctn4qheph"
;
// *************** 素材ID ***************
public
static
final
String
ARTICLE_CONTENTID
=
"Kj21NjM4NDc"
;
...
...
@@ -158,6 +160,7 @@ public class BasicConfig {
public
static
final
String
ARTICLE_GETEXPLOSIONCONTENTLIST
=
"/kjy/mp/explosioncontent/getExplosionContentList"
;
// ************** 发圈素材 ***************
public
static
final
String
FRIENDS_GETMATERIALTAGS
=
"/kjy/mp/materialContent/getmaterialTags"
;
...
...
@@ -189,11 +192,6 @@ 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"
;
// ************** BOSS看板 ***************
public
static
final
String
BOSS_VERSIONINFO
=
"/kjy/mp/version/info"
;
...
...
@@ -213,11 +211,31 @@ public class BasicConfig {
public
static
final
String
BOSS_MEMBER
=
"/kjy/mp/seller/team/member"
;
// 管理后台
// *************** 贺卡 ***************
public
static
final
String
GREETING_BANNER
=
"/kjy/mp/greeting/banner"
;
public
static
final
String
GREETING_SHOW
=
"/kjy/mp/seller/parctice/show"
;
public
static
final
String
GREETING_ALLFORWARD
=
"/kjy/mp/greeting/allForward"
;
public
static
final
String
GREETING_FINDBYTYPE
=
"/kjy/mp/tag/findByType"
;
public
static
final
String
GREETING_GETTIPSBYPAGE
=
"/kjy/mp/tips/getTipsByPage"
;
public
static
final
String
GREETING_SHOWLAYER
=
"/kjy/mp/festival/showLayer"
;
public
static
final
String
GREETING_PAGELIST
=
"/kjy/mp/greeting/pageList"
;
public
static
final
String
GREETING_CONFLIST
=
"/kjy/mp/greeting/conf/list"
;
// *************** 管理后台 ***************
public
static
final
String
SSO_DOLOGIN
=
"/doLogin"
;
public
static
final
String
SSO_INDEX
=
"/sso/ssoIndex"
;
public
static
final
String
TESTUSER_DISABLEUSER
=
"kjj-mng.duibatest.com.cn/kjy/manager/testUser/disableUser"
;
public
static
final
String
MANAGER_AUTH
=
"/auth/getAuthList"
;
public
static
final
String
MANAGER_CHANGECOMPANY
=
"/kjy/manager/seller/changeCompany"
;
...
...
@@ -227,4 +245,5 @@ public class BasicConfig {
public
static
final
String
MANAGER_SETINTERALSELLER
=
"/kjy/manager/seller/setInternalSeller"
;
public
static
final
String
MANAGER_ADMININFO
=
"/kjy/manager/admin/info"
;
}
src/test/testNG.xml
View file @
78e8c0bb
...
...
@@ -41,6 +41,11 @@
<class
name=
"com.kjj.qa.cases.Boss"
/>
</classes>
</test>
<test
preserve-order=
"true"
name=
"贺卡"
>
<classes>
<class
name=
"com.kjj.qa.cases.GreetingCard"
/>
</classes>
</test>
<!-- 监听器-->
<listeners>
<listener
class-name=
"com.kjj.qa.config.ExtentTestNGIReporterListener"
/>
...
...
target/test-classes/com/kjj/qa/cases/Article.class
View file @
78e8c0bb
No preview for this file type
test-output/report.html
View file @
78e8c0bb
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