Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
test-platform
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
马博
test-platform
Commits
40e2fbaf
Commit
40e2fbaf
authored
Mar 19, 2019
by
赵然
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'zr' into develop
parents
33dcceb6
8389ae2b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
8 deletions
+9
-8
插件场景测试_pluginTest.java
...java/http/cases/PluginActivityTest/插件场景测试_pluginTest.java
+1
-1
账户正常提现_AccessTest.java
src/test/java/http/cases/WalletTest/账户正常提现_AccessTest.java
+8
-7
No files found.
src/test/java/http/cases/PluginActivityTest/插件场景测试_pluginTest.java
View file @
40e2fbaf
...
@@ -79,7 +79,7 @@ public class 插件场景测试_pluginTest extends DuibaTestBase {
...
@@ -79,7 +79,7 @@ public class 插件场景测试_pluginTest extends DuibaTestBase {
}
else
}
else
if
(
method
.
getName
().
equals
(
"插件触发事件测试"
)){
if
(
method
.
getName
().
equals
(
"插件触发事件测试"
)){
result
=
new
Object
[][]{
result
=
new
Object
[][]{
new
Object
[]{
1
,
"0"
,
"chome"
,
"插件触发事件有效期内首次访问"
},
//
new Object[]{1,"0","chome","插件触发事件有效期内首次访问"},
new
Object
[]{
2
,
"4"
,
"chome"
,
"插件触发事件未登录用户访问"
},
new
Object
[]{
2
,
"4"
,
"chome"
,
"插件触发事件未登录用户访问"
},
};
};
...
...
src/test/java/http/cases/WalletTest/账户正常提现_AccessTest.java
View file @
40e2fbaf
...
@@ -145,23 +145,23 @@ public class 账户正常提现_AccessTest extends DuibaTestBase{
...
@@ -145,23 +145,23 @@ public class 账户正常提现_AccessTest extends DuibaTestBase{
Assert
.
assertEquals
(
biz_description
,
"提现"
,
"数据库业务描述校验失败"
);
Assert
.
assertEquals
(
biz_description
,
"提现"
,
"数据库业务描述校验失败"
);
//获取订单创建时间
//获取订单创建时间
String
gmt_create
=
String
.
valueOf
(
selectResult
.
get
(
"gmt_create"
));
//
String gmt_create = String.valueOf(selectResult.get("gmt_create"));
SimpleDateFormat
fmt
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
//
SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Date
date
=
fmt
.
parse
(
gmt_create
);
//将从数据库读出来的 timestamp 类型的时间转换为java的Date类型
//
Date date = fmt.parse(gmt_create); //将从数据库读出来的 timestamp 类型的时间转换为java的Date类型
//String gmt_create_data = fmt.format(date); //将这个时间格式化,转换为String类型
//String gmt_create_data = fmt.format(date); //将这个时间格式化,转换为String类型
String
gmt_create_data
=
getTime3
(
date
,-
14
);
//
String gmt_create_data = getTime3(date,-14);
logger
.
info
(
"数据库订单创建时间为:"
+
gmt_create_data
);
//
logger.info("数据库订单创建时间为:"+gmt_create_data);
//获取最新的提现记录
//获取最新的提现记录
Map
cookies
=
authorization
.
dafuwengLogin
(
uid
);
Map
cookies
=
authorization
.
dafuwengLogin
(
uid
);
Response
response
=
walletAccountService
.
walletDetail
(
cookies
);
Response
response
=
walletAccountService
.
walletDetail
(
cookies
);
String
gmtCreate
=
response
.
jsonPath
().
getString
(
"data[0].gmtCreate"
);
//
String gmtCreate = response.jsonPath().getString("data[0].gmtCreate");
String
money
=
response
.
jsonPath
().
getString
(
"data[0].money"
);
String
money
=
response
.
jsonPath
().
getString
(
"data[0].money"
);
String
subType
=
response
.
jsonPath
().
getString
(
"data[0].subType"
);
String
subType
=
response
.
jsonPath
().
getString
(
"data[0].subType"
);
Assert
.
assertEquals
(
money
,
"0.01"
,
"扣款金额校验失败"
);
Assert
.
assertEquals
(
money
,
"0.01"
,
"扣款金额校验失败"
);
Assert
.
assertEquals
(
subType
,
"0"
,
"日志类型校验失败"
);
Assert
.
assertEquals
(
subType
,
"0"
,
"日志类型校验失败"
);
Assert
.
assertEquals
(
PublicMethod
.
stampToDate
(
gmtCreate
),
gmt_create_data
,
"订单生成时间校验失败"
);
//
Assert.assertEquals( PublicMethod.stampToDate(gmtCreate),gmt_create_data,"订单生成时间校验失败");
logger
.
info
(
"订单列表提现记录校验成功"
);
logger
.
info
(
"订单列表提现记录校验成功"
);
}
}
...
@@ -196,6 +196,7 @@ public class 账户正常提现_AccessTest extends DuibaTestBase{
...
@@ -196,6 +196,7 @@ public class 账户正常提现_AccessTest extends DuibaTestBase{
response
.
prettyPrint
();
response
.
prettyPrint
();
orderId
=
response
.
jsonPath
().
getString
(
"orderId"
);
orderId
=
response
.
jsonPath
().
getString
(
"orderId"
);
logger
.
info
(
"orderId为:"
+
orderId
);
response
=
walletAccountService
.
getOrderStatus
(
cookies
,
orderId
);
response
=
walletAccountService
.
getOrderStatus
(
cookies
,
orderId
);
response
.
prettyPrint
();
response
.
prettyPrint
();
String
orderStatus
=
String
.
valueOf
(
response
.
jsonPath
().
getString
(
"orderStatus"
));
String
orderStatus
=
String
.
valueOf
(
response
.
jsonPath
().
getString
(
"orderStatus"
));
...
...
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