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