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
af5a2eb2
Commit
af5a2eb2
authored
Feb 27, 2020
by
赵然
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of gitlab2.dui88.com:mabo/test-platform
parents
254aa17e
43531d78
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
18 additions
and
3 deletions
+18
-3
ObjectExchange_ExchangeTest.java
.../http/cases/ExchangeTest/ObjectExchange_ExchangeTest.java
+4
-0
支付宝_兑换流程测试_ExchangeTest.java
...ases/ExchangeTest/兑吧_直充类商品兑换/支付宝_兑换流程测试_ExchangeTest.java
+3
-1
兑吧老优惠券_兑换流程测试_ExchangeTest.java
...a/http/cases/ExchangeTest/兑吧老优惠券_兑换流程测试_ExchangeTest.java
+6
-1
自有新虚拟商品_充值_兑换限制_ExchangeTest.java
.../ExchangeTest/自有_商品兑换限制/自有新虚拟商品_充值_兑换限制_ExchangeTest.java
+1
-0
秒杀商品_自有新优惠券_兑换限制_SeckillTest.java
...p/cases/SeckillTest/新秒杀/秒杀商品_自有新优惠券_兑换限制_SeckillTest.java
+2
-0
秒杀商品_自有新商家充值_兑换限制_SeckillTest.java
.../cases/SeckillTest/新秒杀/秒杀商品_自有新商家充值_兑换限制_SeckillTest.java
+1
-0
ContractSign_signTest.java
src/test/java/http/cases/SignTest/ContractSign_signTest.java
+1
-1
No files found.
src/test/java/http/cases/ExchangeTest/ObjectExchange_ExchangeTest.java
View file @
af5a2eb2
...
...
@@ -287,6 +287,7 @@ public class ObjectExchange_ExchangeTest extends CheckTemplet {
Map
<
String
,
String
>
map
=
authorization
.
dafuwengLogin
(
uid
);
Assert
.
assertEquals
(
String
.
valueOf
(
response
.
getStatusCode
()),
"200"
,
"活动详情页请求异常"
);
Thread
.
sleep
(
5000
);
//实物兑换
response
=
couponExchangeService
.
objectExchange
(
map
,
"161100"
,
null
,
"null"
,
"yrJRr7Cddp2YeQd"
,
"null"
);
// response.prettyPrint();
...
...
@@ -307,6 +308,7 @@ public class ObjectExchange_ExchangeTest extends CheckTemplet {
message
=
response
.
jsonPath
().
getString
(
"data.message"
);
i
--;
}
Thread
.
sleep
(
2000
);
//查询数据库,获取当前积分
mapuser
=
jdbc
.
findSimpleResult
(
"select * from dafuweng.user where id="
+
uid
);
String
creditsNew
=
String
.
valueOf
(
mapuser
.
get
(
"credits"
));
...
...
@@ -344,6 +346,7 @@ public class ObjectExchange_ExchangeTest extends CheckTemplet {
String
credits
=
String
.
valueOf
(
mapuser
.
get
(
"credits"
));
logger
.
info
(
"兑换前积分:"
+
credits
);
//扣去100积分
credits
=
String
.
valueOf
(
Integer
.
valueOf
(
credits
)
-
1
);
Thread
.
sleep
(
5000
);
//优惠券兑换
Response
response
=
couponExchangeService
.
couponExchange
(
authorization
.
dafuwengLogin
(
uid
),
"159857"
,
null
);
String
orderId
=
response
.
jsonPath
().
getString
(
"orderId"
);
...
...
@@ -361,6 +364,7 @@ public class ObjectExchange_ExchangeTest extends CheckTemplet {
i
--;
}
Thread
.
sleep
(
3000
);
response
.
prettyPrint
();
//查询数据库,获取当前积分
mapuser
=
jdbc
.
findSimpleResult
(
"select * from dafuweng.user where id="
+
uid
);
...
...
src/test/java/http/cases/ExchangeTest/兑吧_直充类商品兑换/支付宝_兑换流程测试_ExchangeTest.java
View file @
af5a2eb2
...
...
@@ -88,10 +88,11 @@ public class 支付宝_兑换流程测试_ExchangeTest extends CheckTemplet {
String
orderId
=
this
.
支付宝兑换订单
(
uid
,
"peeulk6392@sandbox.com"
,
"沙箱环境"
,
"10"
);
logger
.
info
(
"订单号:"
+
orderId
);
Thread
.
sleep
(
3000
);
//订单审核,判断是否在待审核节点
Map
<
String
,
Object
>
mapOrder
=
jdbc
.
findSimpleResult
(
"SELECT * FROM "
+
Database
.
orders_consumer
+
"."
+
Database
.
orders9
+
" WHERE id = "
+
orderId
);
String
flowWork
=
String
.
valueOf
(
mapOrder
.
get
(
"flowwork_stage"
));
Thread
.
sleep
(
300
);
logger
.
info
(
"数据库订单节点:"
+
flowWork
);
Assert
.
assertEquals
(
flowWork
,
"Audit-started"
,
"校验订单审核节点失败"
);
String
orderIdmain
=
String
.
valueOf
(
mapOrder
.
get
(
"order_num"
));
...
...
@@ -113,6 +114,7 @@ public class 支付宝_兑换流程测试_ExchangeTest extends CheckTemplet {
while
(
j
>
0
&&
!
flowWork
.
equals
(
"Success-complete"
))
{
Thread
.
sleep
(
1000
);
auditResponse
=
dsOrderService
.
submitAudit
(
"22542"
,
orderId
,
"pass"
,
authorization
.
hdLoginCommonNew
(
"15833333333"
));
auditResponse
.
prettyPrint
();
mapOrder
=
jdbc
.
findSimpleResult
(
"SELECT * FROM "
+
Database
.
orders_consumer
+
"."
+
Database
.
orders9
+
" WHERE id = "
+
orderId
);
flowWork
=
String
.
valueOf
(
mapOrder
.
get
(
"flowwork_stage"
));
logger
.
info
(
"数据库订单节点:"
+
flowWork
);
...
...
src/test/java/http/cases/ExchangeTest/兑吧老优惠券_兑换流程测试_ExchangeTest.java
View file @
af5a2eb2
...
...
@@ -164,6 +164,7 @@ public class 兑吧老优惠券_兑换流程测试_ExchangeTest extends CheckTem
logger
.
info
(
"兑换前的积分:"
+
credits
);
credits
=
String
.
valueOf
(
Integer
.
valueOf
(
credits
)-
10
);
Thread
.
sleep
(
5000
);
//优惠券兑换
this
.
优惠券兑换
(
"174797"
,
"30290"
,
uid
);
...
...
@@ -192,6 +193,7 @@ public class 兑吧老优惠券_兑换流程测试_ExchangeTest extends CheckTem
logger
.
info
(
"兑换前的优惠券共享库存:"
+
stock
);
stock
=
String
.
valueOf
(
Integer
.
valueOf
(
stock
)-
1
);
Thread
.
sleep
(
5000
);
//优惠券兑换
this
.
优惠券兑换
(
"174923"
,
"30318"
,
uid
);
...
...
@@ -215,6 +217,7 @@ public class 兑吧老优惠券_兑换流程测试_ExchangeTest extends CheckTem
String
ftDate
=
ft
.
format
(
dNow
);
try
{
Thread
.
sleep
(
5000
);
//优惠券第一次兑换
this
.
优惠券兑换
(
"174928"
,
"30319"
,
uid
);
...
...
@@ -317,6 +320,7 @@ public class 兑吧老优惠券_兑换流程测试_ExchangeTest extends CheckTem
// logger.info("兑换前的开发者余额:" + remainMoney);
// String remainMoneyNew =String.valueOf(Integer.valueOf(remainMoney) - 1000) ;
Thread
.
sleep
(
5000
);
//优惠券兑换
String
orderId
=
this
.
优惠券兑换订单
(
appItemId
,
itemId
,
uid
);
logger
.
info
(
"订单号:"
+
orderId
);
...
...
@@ -331,7 +335,7 @@ public class 兑吧老优惠券_兑换流程测试_ExchangeTest extends CheckTem
logger
.
info
(
"兑吧订单号为:"
+
orderIdmain
);
int
i
=
10
;
while
(
i
>
0
&&
!
flowWork
.
equals
(
"Audit-started"
))
{
Thread
.
sleep
(
300
);
Thread
.
sleep
(
300
0
);
mapOrder
=
jdbc
.
findSimpleResult
(
"SELECT * FROM "
+
Database
.
orders_consumer
+
"."
+
Database
.
orders9
+
" WHERE id = "
+
orderId
);
flowWork
=
String
.
valueOf
(
mapOrder
.
get
(
"flowwork_stage"
));
logger
.
info
(
"数据库订单节点:"
+
flowWork
);
...
...
@@ -504,6 +508,7 @@ public class 兑吧老优惠券_兑换流程测试_ExchangeTest extends CheckTem
map
.
put
(
"token"
,
"yrJRr7Cddp2YeQd"
);
try
{
Thread
.
sleep
(
5000
);
//优惠券兑换,用户兑换限制次数1次
Response
response
=
this
.
优惠券兑换
(
"170295"
,
"29294"
,
uid
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"status"
),
"success"
,
"校验兑换失败"
);
...
...
src/test/java/http/cases/ExchangeTest/自有_商品兑换限制/自有新虚拟商品_充值_兑换限制_ExchangeTest.java
View file @
af5a2eb2
...
...
@@ -515,6 +515,7 @@ public class 自有新虚拟商品_充值_兑换限制_ExchangeTest extends Chec
String
stock
=
String
.
valueOf
(
mapStock
.
get
(
"stock"
));
logger
.
info
(
"兑换前的库存:"
+
stock
);
Thread
.
sleep
(
5000
);
Response
response
=
gawService
.
virtualExchange
(
cookies
,
appItemId
,
skuId
);
String
orderId
=
response
.
jsonPath
().
getString
(
"data.orderId"
);
//获取兑换结果
...
...
src/test/java/http/cases/SeckillTest/新秒杀/秒杀商品_自有新优惠券_兑换限制_SeckillTest.java
View file @
af5a2eb2
...
...
@@ -395,10 +395,12 @@ public class 秒杀商品_自有新优惠券_兑换限制_SeckillTest extends Du
//第一次秒杀
Response
response
=
seckillNewService
.
exchange
(
itemId
,
appItemId
,
uid
,
skuId
,
actId
);
response
.
prettyPrint
();
String
orderId
=
response
.
jsonPath
().
getString
(
"data.orderId"
);
Thread
.
sleep
(
1000
);
//获取兑换结果
response
=
seckillNewService
.
orderStatus
(
orderId
,
uid
);
response
.
prettyPrint
();
String
status
=
response
.
jsonPath
().
getString
(
"data.status"
);
int
i
=
10
;
//异步接口,直到兑换成功
...
...
src/test/java/http/cases/SeckillTest/新秒杀/秒杀商品_自有新商家充值_兑换限制_SeckillTest.java
View file @
af5a2eb2
...
...
@@ -74,6 +74,7 @@ public class 秒杀商品_自有新商家充值_兑换限制_SeckillTest extends
//秒杀
Response
response
=
seckillNewService
.
exchange
(
itemId
,
appItemId
,
uid
,
skuId
,
actId
);
response
.
prettyPrint
();
String
orderId
=
response
.
jsonPath
().
getString
(
"data.orderId"
);
Thread
.
sleep
(
1000
);
response
=
seckillNewService
.
orderStatus
(
orderId
,
uid
);
...
...
src/test/java/http/cases/SignTest/ContractSign_signTest.java
View file @
af5a2eb2
...
...
@@ -503,7 +503,7 @@ public class ContractSign_signTest extends DuibaTestBase {
map
.
put
(
"skinId"
,
"46"
);
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
JSON
.
toJSONString
(
map
));
Response
response
=
given
().
contentType
(
"application/json;charset=UTF-8"
).
cookies
(
authorization
.
ssoLogin
()).
body
(
jsonObject
).
post
(
"https://mng.duibatest.com.cn/newmanager/signContract/save"
);
//
response.prettyPrint();
response
.
prettyPrint
();
try
{
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"success"
),
"true"
,
"/signContract/save接口失败"
);
}
catch
(
Exception
e
)
{
...
...
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