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
5dc5104d
Commit
5dc5104d
authored
Oct 19, 2020
by
马博
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
自动化环境数据迁移
parent
de650e00
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
20 additions
and
16 deletions
+20
-16
活动优惠券.xls
data/duiba/活动优惠券.xls
+0
-0
ObjectExchange_ExchangeTest.java
.../http/cases/ExchangeTest/ObjectExchange_ExchangeTest.java
+4
-4
兑吧老优惠券_兑换流程测试_ExchangeTest.java
...a/http/cases/ExchangeTest/兑吧老优惠券_兑换流程测试_ExchangeTest.java
+0
-1
自有新卡密_兑换限制测试_ExchangeTest.java
...ses/ExchangeTest/自有_商品兑换限制/自有新卡密_兑换限制测试_ExchangeTest.java
+1
-1
自有新实物_兑换流程测试_ExchangeTest.java
...ses/ExchangeTest/自有_商品兑换限制/自有新实物_兑换流程测试_ExchangeTest.java
+2
-2
Authorization.java
src/test/java/http/service/Authorization.java
+13
-8
No files found.
data/duiba/活动优惠券.xls
View file @
5dc5104d
No preview for this file type
src/test/java/http/cases/ExchangeTest/ObjectExchange_ExchangeTest.java
View file @
5dc5104d
...
...
@@ -337,10 +337,10 @@ public class ObjectExchange_ExchangeTest extends CheckTemplet {
//查询数据库,当前积分
Map
<
String
,
Object
>
mapuser
=
jdbc
.
findSimpleResult
(
"select * from dafuweng.user where id="
+
uid
);
//select * from goods.tb_goods_batch where gid=159857 查询库存id gid=itemid
Map
<
String
,
Object
>
mapStock
=
jdbc
.
findSimpleResult
(
"select * from stock.tb_stock where stock_id = 6
078245660249
20113"
);
Map
<
String
,
Object
>
mapStock
=
jdbc
.
findSimpleResult
(
"select * from stock.tb_stock where stock_id = 6
628194831776
20113"
);
String
stock
=
String
.
valueOf
(
mapStock
.
get
(
"stock"
));
logger
.
info
(
"兑换前库存:"
+
stock
);
//扣去1
//扣去1
x
stock
=
String
.
valueOf
(
Integer
.
valueOf
(
stock
)
-
1
);
String
credits
=
String
.
valueOf
(
mapuser
.
get
(
"credits"
));
...
...
@@ -364,7 +364,7 @@ public class ObjectExchange_ExchangeTest extends CheckTemplet {
i
--;
}
Thread
.
sleep
(
3
000
);
Thread
.
sleep
(
5
000
);
response
.
prettyPrint
();
//查询数据库,获取当前积分
mapuser
=
jdbc
.
findSimpleResult
(
"select * from dafuweng.user where id="
+
uid
);
...
...
@@ -375,7 +375,7 @@ public class ObjectExchange_ExchangeTest extends CheckTemplet {
Assert
.
assertEquals
(
credits
.
trim
(),
creditsNew
,
"优惠券兑换后积分扣除异常"
);
logger
.
info
(
"校验兑换前后积分正确"
);
mapStock
=
jdbc
.
findSimpleResult
(
"select * from stock.tb_stock where stock_id = 6
078245660249
20113"
);
mapStock
=
jdbc
.
findSimpleResult
(
"select * from stock.tb_stock where stock_id = 6
628194831776
20113"
);
String
stockNew
=
String
.
valueOf
(
mapStock
.
get
(
"stock"
));
logger
.
info
(
"兑换后库存:"
+
stockNew
);
//校验比较,兑换前后积分
...
...
src/test/java/http/cases/ExchangeTest/兑吧老优惠券_兑换流程测试_ExchangeTest.java
View file @
5dc5104d
...
...
@@ -136,7 +136,6 @@ public class 兑吧老优惠券_兑换流程测试_ExchangeTest extends CheckTem
//优惠券兑换
this
.
优惠券兑换
(
"169713"
,
"29164"
,
uid
);
//查询优惠券兑换后的库存
mapStock
=
jdbc
.
findSimpleResult
(
"SELECT * FROM stock.tb_stock WHERE stock_id ='705804724784620492'"
);
String
stockNew
=
String
.
valueOf
(
mapStock
.
get
(
"stock"
))
;
...
...
src/test/java/http/cases/ExchangeTest/自有_商品兑换限制/自有新卡密_兑换限制测试_ExchangeTest.java
View file @
5dc5104d
...
...
@@ -327,7 +327,7 @@ public class 自有新卡密_兑换限制测试_ExchangeTest extends CheckTemple
//兑换
try
{
Thread
.
sleep
(
4
000
);
Thread
.
sleep
(
10
000
);
response
=
gawService
.
couponExchange
(
authorization
.
dafuwengLogin
(
uid
),
appItemId
,
skuId
,
bl
);
}
catch
(
Exception
e
){
...
...
src/test/java/http/cases/ExchangeTest/自有_商品兑换限制/自有新实物_兑换流程测试_ExchangeTest.java
View file @
5dc5104d
...
...
@@ -318,8 +318,8 @@ public class 自有新实物_兑换流程测试_ExchangeTest extends CheckTemple
switch
(
caseNum
){
case
1
:
Assert
.
assertTrue
(
message
.
contains
(
"限202
0-05-02至2022-04-15
日期内兑换"
),
"校验message失败"
);
Assert
.
assertEquals
(
exchangeText
,
"限202
0-05-02至2022-04-15
日期内兑换"
,
"校验马上兑换按钮状态失败"
);
Assert
.
assertTrue
(
message
.
contains
(
"限202
1-05-29至2027-04-30
日期内兑换"
),
"校验message失败"
);
Assert
.
assertEquals
(
exchangeText
,
"限202
1-05-29至2027-04-30
日期内兑换"
,
"校验马上兑换按钮状态失败"
);
logger
.
info
(
"校验实物日期兑换限制未开始成功"
);
break
;
...
...
src/test/java/http/service/Authorization.java
View file @
5dc5104d
...
...
@@ -475,14 +475,19 @@ public class Authorization {
// map.get(1);
// map.get(2);
// String url = "http://home.m.duibatest.com.cn/test/generateSign?appKey=2wGQc3MZaQsqYFWcX4gguya5PnnS&uid=3402&vip=5";
String
url
=
"http://activity.m.duibatest.com.cn/ngame/index?id=32075&appKey=3erv8LvBxKBSyuGK5i8FSGyYoFD1&openBs=openbs"
;
Response
response
=
given
().
get
(
url
);
response
.
prettyPrint
();
// url = response.jsonPath().get("url");
// System.out.println(url);
// response=given().redirects().follow(false).get(url);
System
.
out
.
println
(
response
.
getCookies
());
System
.
out
.
println
(
"Set-Cookie的信息为"
+
response
.
getHeader
(
"Set-Cookie"
));
// String url = "http://activity.m.duibatest.com.cn/ngame/index?id=32075&appKey=3erv8LvBxKBSyuGK5i8FSGyYoFD1&openBs=openbs";
// Response response=given().get(url);
// response.prettyPrint();
//// url = response.jsonPath().get("url");
//// System.out.println(url);
//// response=given().redirects().follow(false).get(url);
// System.out.println(response.getCookies());
// System.out.println("Set-Cookie的信息为"+response.getHeader("Set-Cookie"));
}
...
...
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