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
51b2e4d8
Commit
51b2e4d8
authored
Jul 16, 2019
by
吕雯燕
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lv
parent
34afb6f0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
62 additions
and
0 deletions
+62
-0
兑吧卡密_兑换流程测试_ExchangeTest.java
...ava/http/cases/ExchangeTest/兑吧卡密_兑换流程测试_ExchangeTest.java
+58
-0
兑吧新优惠券_兑换流程测试_ExchangeTest.java
...a/http/cases/ExchangeTest/兑吧新优惠券_兑换流程测试_ExchangeTest.java
+4
-0
No files found.
src/test/java/http/cases/ExchangeTest/兑吧卡密_兑换流程测试_ExchangeTest.java
View file @
51b2e4d8
...
...
@@ -506,6 +506,64 @@ public class 兑吧卡密_兑换流程测试_ExchangeTest extends CheckTemplet {
}
@Test
(
description
=
"兑吧卡密用户id篡改测试"
)
public
void
卡密用户
id
篡改测试
()
throws
Exception
{
//uid: 大富翁app
//商品: lv测试应用55
int
uid
=
11
;
String
appItemId
=
"197045"
;
String
itemId
=
"32657"
;
String
skuId
=
"173"
;
String
message
=
""
;
Map
cookies
=
authorization
.
dafuwengLogin
(
uid
);
//卡密兑换
try
{
Response
response
=
gawService
.
couponExchange
(
cookies
,
appItemId
,
itemId
,
skuId
);
response
.
prettyPrint
();
}
catch
(
Exception
e
){
message
=
e
.
toString
();
}
logger
.
info
(
message
);
Assert
.
assertTrue
(
message
.
contains
(
"\"desc\":\"无权访问\""
),
"校验message失败"
);
Assert
.
assertTrue
(
message
.
contains
(
"\"success\":false"
),
"校验success失败"
);
logger
.
info
(
"校验卡密用户id篡改无法兑换成功"
);
}
@Test
(
description
=
"兑吧卡密skuId篡改测试"
)
public
void
卡密
skuId
篡改测试
()
throws
Exception
{
String
appItemId
=
"197045"
;
String
itemId
=
"32657"
;
String
skuId
=
"106"
;
String
message
=
""
;
Map
cookies
=
authorization
.
dafuwengLogin
(
uid
);
//优惠券兑换,skuId改为其它商品的
try
{
Response
response
=
gawService
.
couponExchange
(
cookies
,
appItemId
,
itemId
,
skuId
);
response
.
prettyPrint
();
}
catch
(
Exception
e
){
message
=
e
.
toString
();
}
logger
.
info
(
message
);
Assert
.
assertTrue
(
message
.
contains
(
"\"desc\":\"商品不存在\""
),
"校验message失败"
);
Assert
.
assertTrue
(
message
.
contains
(
"\"success\":false"
),
"校验success失败"
);
logger
.
info
(
"校验卡密skuId篡改无法兑换成功"
);
}
}
src/test/java/http/cases/ExchangeTest/兑吧新优惠券_兑换流程测试_ExchangeTest.java
View file @
51b2e4d8
...
...
@@ -552,4 +552,8 @@ public class 兑吧新优惠券_兑换流程测试_ExchangeTest extends CheckTem
logger
.
info
(
"校验优惠券skuId篡改无法兑换成功"
);
}
}
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