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
d71f801b
Commit
d71f801b
authored
Feb 21, 2019
by
赵然
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
zr
parent
6216f845
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
26 additions
and
26 deletions
+26
-26
ObjectExchange_ExchangeTest.java
.../http/cases/ExchangeTest/ObjectExchange_ExchangeTest.java
+1
-1
Qb_兑换流程测试_ExchangeTest.java
.../java/http/cases/ExchangeTest/Qb_兑换流程测试_ExchangeTest.java
+1
-1
优惠券_兑换流程测试_ExchangeTest.java
...java/http/cases/ExchangeTest/优惠券_兑换流程测试_ExchangeTest.java
+18
-18
商品订单失败测试_ExchangeTest.java
...t/java/http/cases/ExchangeTest/商品订单失败测试_ExchangeTest.java
+1
-1
支付宝_兑换流程测试_ExchangeTest.java
...java/http/cases/ExchangeTest/支付宝_兑换流程测试_ExchangeTest.java
+1
-1
虚拟商品_兑换异常测试_ExchangeTest.java
...ava/http/cases/ExchangeTest/虚拟商品_兑换异常测试_ExchangeTest.java
+2
-2
AlipayExchangeService.java
src/test/java/http/service/app/AlipayExchangeService.java
+1
-1
AppPlatformCouponService.java
src/test/java/http/service/app/AppPlatformCouponService.java
+1
-1
No files found.
src/test/java/http/cases/ExchangeTest/ObjectExchange_ExchangeTest.java
View file @
d71f801b
...
...
@@ -439,7 +439,7 @@ public class ObjectExchange_ExchangeTest extends CheckTemplet {
}
//直充类流量兑换
@Test
(
description
=
"直充类流量兑换"
)
//
@Test(description = "直充类流量兑换")
public
void
流量兑换
()
throws
Exception
{
int
uid
=
4376
;
Thread
.
sleep
(
2000
);
...
...
src/test/java/http/cases/ExchangeTest/Qb_兑换流程测试_ExchangeTest.java
View file @
d71f801b
...
...
@@ -151,7 +151,7 @@ public class Qb_兑换流程测试_ExchangeTest extends CheckTemplet {
message
=
e
.
toString
();
}
logger
.
info
(
message
);
Assert
.
assertTrue
(
message
.
contains
(
"
没有兑换成功
"
));
Assert
.
assertTrue
(
message
.
contains
(
"
已兑完
"
));
Assert
.
assertTrue
(
message
.
contains
(
"\"success\":false"
));
}
...
...
src/test/java/http/cases/ExchangeTest/优惠券_兑换流程测试_ExchangeTest.java
View file @
d71f801b
...
...
@@ -72,16 +72,16 @@ public class 优惠券_兑换流程测试_ExchangeTest extends CheckTemplet {
Object
[][]
result
=
null
;
if
(
method
.
getName
().
equals
(
"优惠券日期兑换限制测试"
))
{
result
=
new
Object
[][]{
new
Object
[]{
1
,
"171479"
,
"29538"
,
"
69xjl0a
"
,
"优惠券日期兑换限制未开始"
},
//case1
new
Object
[]{
2
,
"171480"
,
"29539"
,
"
z9sydmcs
"
,
"优惠券日期兑换限制进行中"
},
//case2
new
Object
[]{
3
,
"171481"
,
"29540"
,
"
cmixdqn
"
,
"优惠券日期兑换限制已结束"
},
//case2
new
Object
[]{
1
,
"171479"
,
"29538"
,
"
yrJRr7Cddp2YeQd
"
,
"优惠券日期兑换限制未开始"
},
//case1
new
Object
[]{
2
,
"171480"
,
"29539"
,
"
yrJRr7Cddp2YeQd
"
,
"优惠券日期兑换限制进行中"
},
//case2
new
Object
[]{
3
,
"171481"
,
"29540"
,
"
yrJRr7Cddp2YeQd
"
,
"优惠券日期兑换限制已结束"
},
//case2
};
}
if
(
method
.
getName
().
equals
(
"优惠券库存不足测试"
))
{
result
=
new
Object
[][]{
new
Object
[]{
"169775"
,
"29180"
,
"
69xjl0a
"
,
"优惠券商品库存不足测试"
},
//case1
new
Object
[]{
"172163"
,
"29677"
,
"
z9sydmcs
"
,
"优惠券定向库存不足测试"
},
//case2
new
Object
[]{
"174773"
,
"30286"
,
"
qyarwreq
"
,
"优惠券预分配库存不足测试"
},
new
Object
[]{
"169775"
,
"29180"
,
"
yrJRr7Cddp2YeQd
"
,
"优惠券商品库存不足测试"
},
//case1
new
Object
[]{
"172163"
,
"29677"
,
"
yrJRr7Cddp2YeQd
"
,
"优惠券定向库存不足测试"
},
//case2
new
Object
[]{
"174773"
,
"30286"
,
"
yrJRr7Cddp2YeQd
"
,
"优惠券预分配库存不足测试"
},
};
}
...
...
@@ -101,17 +101,17 @@ public class 优惠券_兑换流程测试_ExchangeTest extends CheckTemplet {
}
if
(
method
.
getName
().
equals
(
"自有优惠券会员等级测试"
)){
result
=
new
Object
[][]{
new
Object
[]{
1
,
"172713"
,
"
pmqy9
"
,
"优惠券会员等级范围测试"
},
//case1
new
Object
[]{
2
,
"172715"
,
"
3bam907y
"
,
"优惠券会员特定等级测试"
},
//case2
new
Object
[]{
1
,
"172713"
,
"
yrJRr7Cddp2YeQd
"
,
"优惠券会员等级范围测试"
},
//case1
new
Object
[]{
2
,
"172715"
,
"
yrJRr7Cddp2YeQd
"
,
"优惠券会员特定等级测试"
},
//case2
};
}
if
(
method
.
getName
().
equals
(
"优惠券地区兑换限制测试"
)){
result
=
new
Object
[][]{
new
Object
[]{
1
,
"175459"
,
"30434"
,
"
pmqy9
"
,
"优惠券地区黑名单不可兑测试"
},
//case1
new
Object
[]{
2
,
"175603"
,
"30435"
,
"
3bam907y
"
,
"优惠券地区黑名单可兑测试"
},
//case2
new
Object
[]{
3
,
"175604"
,
"30436"
,
"
6dc8ntp
"
,
"优惠券地区白名单可兑测试"
},
//case3
new
Object
[]{
4
,
"175605"
,
"30437"
,
"
tvtgya6
"
,
"优惠券地区白名单不可兑测试"
},
//case4
new
Object
[]{
1
,
"175459"
,
"30434"
,
"
yrJRr7Cddp2YeQd
"
,
"优惠券地区黑名单不可兑测试"
},
//case1
new
Object
[]{
2
,
"175603"
,
"30435"
,
"
yrJRr7Cddp2YeQd
"
,
"优惠券地区黑名单可兑测试"
},
//case2
new
Object
[]{
3
,
"175604"
,
"30436"
,
"
yrJRr7Cddp2YeQd
"
,
"优惠券地区白名单可兑测试"
},
//case3
new
Object
[]{
4
,
"175605"
,
"30437"
,
"
yrJRr7Cddp2YeQd
"
,
"优惠券地区白名单不可兑测试"
},
//case4
};
...
...
@@ -218,7 +218,7 @@ public class 优惠券_兑换流程测试_ExchangeTest extends CheckTemplet {
Map
<
String
,
String
>
map
=
new
HashMap
<>();
map
.
put
(
"appItemId"
,
"174928"
);
map
.
put
(
"itemId"
,
"30319"
);
map
.
put
(
"token"
,
"
uvbhjc
"
);
map
.
put
(
"token"
,
"
yrJRr7Cddp2YeQd
"
);
Response
response
=
given
().
contentType
(
"application/x-www-form-urlencoded;charset=UTF-8"
).
cookies
(
authorization
.
dafuwengLogin
(
uid
)).
params
(
map
).
post
(
url
+
"/couponExchange/exchange"
);
response
.
prettyPrint
();
...
...
@@ -385,7 +385,7 @@ public class 优惠券_兑换流程测试_ExchangeTest extends CheckTemplet {
Map
<
String
,
String
>
map
=
new
HashMap
<>();
map
.
put
(
"appItemId"
,
"170294"
);
map
.
put
(
"itemId"
,
"29293"
);
map
.
put
(
"token"
,
"
69xjl0a
"
);
map
.
put
(
"token"
,
"
yrJRr7Cddp2YeQd
"
);
try
{
//优惠券兑换,用户兑换限制次数1次
...
...
@@ -427,7 +427,7 @@ public class 优惠券_兑换流程测试_ExchangeTest extends CheckTemplet {
Map
<
String
,
String
>
map
=
new
HashMap
<>();
map
.
put
(
"appItemId"
,
"171478"
);
map
.
put
(
"itemId"
,
"29531"
);
map
.
put
(
"token"
,
"
69xjl0a
"
);
map
.
put
(
"token"
,
"
yrJRr7Cddp2YeQd
"
);
try
{
//优惠券兑换,用户兑换限制次数1次
...
...
@@ -468,7 +468,7 @@ public class 优惠券_兑换流程测试_ExchangeTest extends CheckTemplet {
Map
<
String
,
String
>
map
=
new
HashMap
<>();
map
.
put
(
"appItemId"
,
"170295"
);
map
.
put
(
"itemId"
,
"29294"
);
map
.
put
(
"token"
,
"
69xjl0a
"
);
map
.
put
(
"token"
,
"
yrJRr7Cddp2YeQd
"
);
try
{
//优惠券兑换,用户兑换限制次数1次
...
...
@@ -562,7 +562,7 @@ public class 优惠券_兑换流程测试_ExchangeTest extends CheckTemplet {
Map
<
String
,
String
>
map
=
new
HashMap
<>();
map
.
put
(
"appItemId"
,
"172079"
);
map
.
put
(
"itemId"
,
"29667"
);
map
.
put
(
"token"
,
"
69xjl0a
"
);
map
.
put
(
"token"
,
"
yrJRr7Cddp2YeQd
"
);
//兑换
Response
response
=
given
().
contentType
(
"application/x-www-form-urlencoded;charset=UTF-8"
).
cookies
(
authorization
.
dafuwengLogin
(
uid
)).
params
(
map
).
post
(
url
+
"/couponExchange/exchange"
);
...
...
@@ -608,7 +608,7 @@ public class 优惠券_兑换流程测试_ExchangeTest extends CheckTemplet {
* @param caseName 用例名称打印
* @throws Exception
*/
@Test
(
dataProvider
=
"providerMethod"
)
//
@Test(dataProvider = "providerMethod")
public
void
优惠券马上使用按钮测试
(
int
caseNum
,
String
appItemId
,
String
itemId
,
String
caseName
)
throws
Exception
{
logger
.
info
(
caseName
);
...
...
src/test/java/http/cases/ExchangeTest/商品订单失败测试_ExchangeTest.java
View file @
d71f801b
...
...
@@ -139,7 +139,7 @@ public class 商品订单失败测试_ExchangeTest extends CheckTemplet {
//校验订单状态,校验返回库存和积分
Assert
.
assertEquals
(
orderStatus
,
"fail"
,
"校验数据库status失败"
);
Assert
.
assertEquals
(
orderError
,
"审核不通过(
备注:
测试订单审核不通过)"
,
"校验数据库error失败"
);
Assert
.
assertEquals
(
orderError
,
"审核不通过(测试订单审核不通过)"
,
"校验数据库error失败"
);
logger
.
info
(
"校验实物订单审核不通过成功"
);
Assert
.
assertEquals
(
stockNew
,
stock
,
"校验stock失败"
);
...
...
src/test/java/http/cases/ExchangeTest/支付宝_兑换流程测试_ExchangeTest.java
View file @
d71f801b
...
...
@@ -213,7 +213,7 @@ public class 支付宝_兑换流程测试_ExchangeTest extends CheckTemplet {
logger
.
info
(
"兑换后的开发者账户余额:"
+
remainMoneyNew
);
Assert
.
assertEquals
(
exchangeText
,
"已兑完"
,
"校验马上兑换按钮状态失败"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"message"
),
"
对不起,没有兑换成功,请挑选其他吧(2)
"
,
"校验message失败"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"message"
),
"
已兑完
"
,
"校验message失败"
);
Assert
.
assertEquals
(
remainMoneyNew
,
remainMoney
,
"校验开发者账户余额失败"
);
logger
.
info
(
"校验支付宝商品余额不足成功"
);
...
...
src/test/java/http/cases/ExchangeTest/虚拟商品_兑换异常测试_ExchangeTest.java
View file @
d71f801b
...
...
@@ -242,7 +242,7 @@ public class 虚拟商品_兑换异常测试_ExchangeTest extends CheckTemplet {
}
}
@Test
(
description
=
"虚拟商品自定义兑换按钮文案马上使用按钮"
)
//
@Test(description = "虚拟商品自定义兑换按钮文案马上使用按钮")
public
void
虚拟商品自定义兑换按钮文案马上使用按钮
()
throws
Exception
{
logger
.
info
(
"虚拟商品马上使用按钮验证开始"
);
//创建虚拟商品的时候,有自定义兑换按钮文案的文案设置,将文案设置成马上使用
...
...
@@ -419,7 +419,7 @@ public class 虚拟商品_兑换异常测试_ExchangeTest extends CheckTemplet {
}
@Test
(
description
=
"自动化】虚拟商品日期兑换时间进行中"
)
//
@Test(description = "自动化】虚拟商品日期兑换时间进行中")
public
void
虚拟商品日期兑换时间进行中
()
throws
Exception
{
logger
.
info
(
"【自动化】虚拟商品日期兑换时间进行中开始验证"
);
//创建虚拟商品的时候,有自定义兑换按钮文案的文案设置,将文案设置成马上使用
...
...
src/test/java/http/service/app/AlipayExchangeService.java
View file @
d71f801b
...
...
@@ -35,7 +35,7 @@ public class AlipayExchangeService {
map
.
put
(
"realname"
,
realname
);
map
.
put
(
"degreeId"
,
degreeId
);
map
.
put
(
"itemId"
,
"55"
);
map
.
put
(
"token"
,
"
fw7qga0
"
);
map
.
put
(
"token"
,
"
yrJRr7Cddp2YeQd
"
);
logger
.
info
(
"请求/alipayExchange/exchange接口"
);
Response
response
=
given
().
contentType
(
"application/x-www-form-urlencoded;charset=UTF-8"
).
cookies
(
authorization
.
dafuwengLogin
(
uid
)).
params
(
map
).
post
(
url
);
...
...
src/test/java/http/service/app/AppPlatformCouponService.java
View file @
d71f801b
...
...
@@ -45,7 +45,7 @@ public class AppPlatformCouponService {
public
Response
takeOrder
(
int
uid
,
String
pcgId
)
throws
Exception
{
Map
<
String
,
String
>
map
=
new
HashMap
<>();
map
.
put
(
"pcgId"
,
pcgId
);
map
.
put
(
"token"
,
"
dnsog
"
);
map
.
put
(
"token"
,
"
yrJRr7Cddp2YeQd
"
);
logger
.
info
(
"请求/platformCoupon/takeOrder接口"
);
Response
response
=
given
().
contentType
(
"application/x-www-form-urlencoded;charset=UTF-8"
).
cookies
(
authorization
.
dafuwengLogin
(
uid
)).
params
(
map
).
post
(
"http://"
+
goodsHost
+
"/platformCoupon/takeOrder"
);
...
...
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