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
1a32e06b
Commit
1a32e06b
authored
May 21, 2020
by
Su-Yi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新tku
parent
502bca37
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
884 additions
and
571 deletions
+884
-571
SellerCard.java
src/test/java/com/kjj/qa/cases/SellerCard.java
+30
-29
NetworkUtil.java
src/test/java/com/kjj/qa/utils/NetworkUtil.java
+6
-3
testNG.xml
src/test/testNG.xml
+10
-10
report.html
test-output/report.html
+838
-529
No files found.
src/test/java/com/kjj/qa/cases/SellerCard.java
View file @
1a32e06b
...
@@ -118,6 +118,7 @@ public class SellerCard {
...
@@ -118,6 +118,7 @@ public class SellerCard {
int
totalCount
=
response
.
jsonPath
().
getInt
(
"data.appraiseList.totalCount"
);
int
totalCount
=
response
.
jsonPath
().
getInt
(
"data.appraiseList.totalCount"
);
Assert
.
assertEquals
(
totalCount
,
0
,
"获取用户评价失败"
);
Assert
.
assertEquals
(
totalCount
,
0
,
"获取用户评价失败"
);
}
}
@Test
(
description
=
"投保实录"
,
priority
=
7
)
//priorty 方法执行优先级
@Test
(
description
=
"投保实录"
,
priority
=
7
)
//priorty 方法执行优先级
public
void
投保实录
()
throws
IOException
{
public
void
投保实录
()
throws
IOException
{
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
...
@@ -131,35 +132,35 @@ public class SellerCard {
...
@@ -131,35 +132,35 @@ public class SellerCard {
Assert
.
assertEquals
(
totalCount
,
0
,
"获取用户评价失败"
);
Assert
.
assertEquals
(
totalCount
,
0
,
"获取用户评价失败"
);
}
}
@Test
(
description
=
"获奖记录"
,
priority
=
8
)
//priorty 方法执行优先级
//
@Test (description = "获奖记录",priority = 8) //priorty 方法执行优先级
public
void
获奖记录
()
throws
IOException
{
//
public void 获奖记录() throws IOException {
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
//
Map<String, Object> params = new HashMap<String, Object>();
params
.
put
(
"scid"
,
scid
);
//
params.put("scid",scid);
Response
response
=
network
.
getResponse
(
params
,
"/kjy/mp/sellerCardV5/honorList"
);
//
Response response = network.getResponse(params,"/kjy/mp/sellerCardV5/honorList");
boolean
IDAOpen
=
response
.
jsonPath
().
getBoolean
(
"data.authenticationV5[0].open"
);
//
boolean IDAOpen = response.jsonPath().getBoolean("data.authenticationV5[0].open");
boolean
MDRTOpen
=
response
.
jsonPath
().
getBoolean
(
"data.authenticationV5[1].open"
);
//
boolean MDRTOpen = response.jsonPath().getBoolean("data.authenticationV5[1].open");
boolean
CMFOpen
=
response
.
jsonPath
().
getBoolean
(
"data.authenticationV5[2].open"
);
//
boolean CMFOpen = response.jsonPath().getBoolean("data.authenticationV5[2].open");
//
Assert
.
assertFalse
(
IDAOpen
,
"IDA认证匹配错误"
);
//
Assert.assertFalse(IDAOpen,"IDA认证匹配错误");
Assert
.
assertFalse
(
MDRTOpen
,
"MDRT认证匹配错误"
);
//
Assert.assertFalse(MDRTOpen,"MDRT认证匹配错误");
Assert
.
assertFalse
(
CMFOpen
,
"CMF认证匹配错误"
);
//
Assert.assertFalse(CMFOpen,"CMF认证匹配错误");
//
//开启IDA认证
//
//开启IDA认证
Map
<
String
,
Object
>
configParams
=
new
HashMap
<
String
,
Object
>();
//
Map<String, Object> configParams = new HashMap<String, Object>();
configParams
.
put
(
"configKey"
,
"CARD_HONOR_AUTH_3"
);
//
configParams.put("configKey","CARD_HONOR_AUTH_3");
configParams
.
put
(
"configValue"
,
true
);
//
configParams.put("configValue",true);
Response
configResponse
=
network
.
postResponse
(
configParams
,
"/kjy/mp/sellerConfig/editConfig"
);
//
Response configResponse = network.postResponse(configParams,"/kjy/mp/sellerConfig/editConfig");
//
//重新查询获奖记录
//
//重新查询获奖记录
response
=
network
.
getResponse
(
params
,
"/kjy/mp/sellerCardV5/honorList"
);
//
response = network.getResponse(params,"/kjy/mp/sellerCardV5/honorList");
IDAOpen
=
response
.
jsonPath
().
getBoolean
(
"data.authenticationV5[0].open"
);
//
IDAOpen = response.jsonPath().getBoolean("data.authenticationV5[0].open");
MDRTOpen
=
response
.
jsonPath
().
getBoolean
(
"data.authenticationV5[1].open"
);
//
MDRTOpen = response.jsonPath().getBoolean("data.authenticationV5[1].open");
CMFOpen
=
response
.
jsonPath
().
getBoolean
(
"data.authenticationV5[2].open"
);
//
CMFOpen = response.jsonPath().getBoolean("data.authenticationV5[2].open");
//
Assert
.
assertTrue
(
IDAOpen
,
"修改后-IDA认证匹配错误"
);
//
Assert.assertTrue(IDAOpen,"修改后-IDA认证匹配错误");
Assert
.
assertFalse
(
MDRTOpen
,
"修改后-MDRT认证匹配错误"
);
//
Assert.assertFalse(MDRTOpen,"修改后-MDRT认证匹配错误");
Assert
.
assertFalse
(
CMFOpen
,
"修改后-CMF认证匹配错误"
);
//
Assert.assertFalse(CMFOpen,"修改后-CMF认证匹配错误");
}
//
}
// @Test (description = "精彩分享",priority = 9) //priorty 方法执行优先级
// @Test (description = "精彩分享",priority = 9) //priorty 方法执行优先级
...
...
src/test/java/com/kjj/qa/utils/NetworkUtil.java
View file @
1a32e06b
...
@@ -35,15 +35,18 @@ public class NetworkUtil {
...
@@ -35,15 +35,18 @@ public class NetworkUtil {
// private static String host = "https://kjj.m.duiba.com.cn"; //线上
// private static String host = "https://kjj.m.duiba.com.cn"; //线上
private
static
String
host
=
"https://kjj.m.duibatest.com.cn"
;
//测试环境
private
static
String
host
=
"https://kjj.m.duibatest.com.cn"
;
//测试环境
//钉钉机器人域名
private
static
String
dingtalkPath
=
"https://oapi.dingtalk.com/robot/send?access_token=e4b7d997fb9f90b17672dcdb9c9922d52c59f741b82081a368f4d3c305c1afcd"
;
//技术告警群
private
static
String
dingtalkPath
=
"https://oapi.dingtalk.com/robot/send?access_token=f63c9cb36e89dd68e9af82d926933b3afc6544e57b23a3a55ed5b3b772d5e8d2"
;
//测试
// private static String dingtalkPath = "https://oapi.dingtalk.com/robot/send?access_token=e4b7d997fb9f90b17672dcdb9c9922d52c59f741b82081a368f4d3c305c1afcd";
// private static String dingtalkPath = "https://oapi.dingtalk.com/robot/send?access_token=e4b7d997fb9f90b17672dcdb9c9922d52c59f741b82081a368f4d3c305c1afcd";
private
volatile
static
NetworkUtil
network
;
private
volatile
static
NetworkUtil
network
;
// 构造函数 初始化tku、content-type
// 构造函数 初始化tku、content-type
private
NetworkUtil
(){
private
NetworkUtil
(){
agentCookies
.
put
(
"tku"
,
"T3gM31f18jAWdU
BLv7EXHVHzLaJq9FNwuTKfvpGxvwu74bPASjMmFDYTS8dG4jdmWU3fZU7UBe4Vdk4LP5
"
);
agentCookies
.
put
(
"tku"
,
"T3gM31f18jAWdU
CruXfs5ctTjrD7HUxiwWFhgGdsgYUHEcnsw5hkVNdMgsNhrH61CLETLLNt2N4q2wBCyN
"
);
agentHeaders
.
put
(
"Content-Type"
,
"application/json"
);
agentHeaders
.
put
(
"Content-Type"
,
"application/json"
);
}
}
...
...
src/test/testNG.xml
View file @
1a32e06b
...
@@ -16,16 +16,16 @@
...
@@ -16,16 +16,16 @@
<class
name=
"com.kjj.qa.cases.SellerCard"
/>
<class
name=
"com.kjj.qa.cases.SellerCard"
/>
</classes>
</classes>
</test>
</test>
<test
preserve-order=
"true"
name=
"上传"
>
<!-- <test preserve-order="true" name="上传" >--
>
<classes
>
<!-- <classes>--
>
<class
name=
"com.kjj.qa.cases.Upload"
/
>
<!-- <class name="com.kjj.qa.cases.Upload"/>--
>
</classes
>
<!-- </classes>--
>
</test
>
<!-- </test>--
>
<test
preserve-order=
"true"
name=
"新手任务"
>
<!-- <test preserve-order="true" name="新手任务" >--
>
<classes
>
<!-- <classes>--
>
<class
name=
"com.kjj.qa.cases.NewTask"
/
>
<!-- <class name="com.kjj.qa.cases.NewTask"/>--
>
</classes
>
<!-- </classes>--
>
</test
>
<!-- </test>--
>
<!-- 监听器-->
<!-- 监听器-->
<listeners>
<listeners>
<listener
class-name=
"com.kjj.qa.config.ExtentTestNGIReporterListener"
/>
<listener
class-name=
"com.kjj.qa.config.ExtentTestNGIReporterListener"
/>
...
...
test-output/report.html
View file @
1a32e06b
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