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
34afb6f0
Commit
34afb6f0
authored
Jul 15, 2019
by
吕雯燕
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lv
parent
e58c9c8b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
55 additions
and
2 deletions
+55
-2
兑吧新优惠券_兑换流程测试_ExchangeTest.java
...a/http/cases/ExchangeTest/兑吧新优惠券_兑换流程测试_ExchangeTest.java
+53
-0
兑吧新实物_兑换流程测试_ExchangeTest.java
...va/http/cases/ExchangeTest/兑吧新实物_兑换流程测试_ExchangeTest.java
+2
-2
No files found.
src/test/java/http/cases/ExchangeTest/兑吧新优惠券_兑换流程测试_ExchangeTest.java
View file @
34afb6f0
...
...
@@ -498,5 +498,58 @@ public class 兑吧新优惠券_兑换流程测试_ExchangeTest extends CheckTem
@Test
(
description
=
"新优惠券用户id篡改测试"
)
public
void
优惠券用户
id
篡改测试
()
throws
Exception
{
//uid: 大富翁app
//商品: lv测试应用55
int
uid
=
10
;
String
appItemId
=
"197044"
;
String
itemId
=
"32656"
;
String
message
=
""
;
Map
cookies
=
authorization
.
dafuwengLogin
(
uid
);
//优惠券兑换
try
{
Response
response
=
gawService
.
couponExchange
(
cookies
,
appItemId
,
itemId
,
"172"
);
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
{
int
uid
=
7289
;
String
appItemId
=
"197044"
;
String
itemId
=
"32656"
;
String
message
=
""
;
Map
cookies
=
authorization
.
dafuwengLogin
(
uid
);
//优惠券兑换,skuId改为其它商品的
try
{
Response
response
=
gawService
.
couponExchange
(
cookies
,
appItemId
,
itemId
,
"105"
);
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 @
34afb6f0
...
...
@@ -495,9 +495,9 @@ public class 兑吧新实物_兑换流程测试_ExchangeTest extends CheckTemple
}
logger
.
info
(
message
);
Assert
.
assertTrue
(
message
.
contains
(
"\"desc\":\"
无权访问
\""
),
"校验message失败"
);
Assert
.
assertTrue
(
message
.
contains
(
"\"desc\":\"
商品不存在
\""
),
"校验message失败"
);
Assert
.
assertTrue
(
message
.
contains
(
"\"success\":false"
),
"校验success失败"
);
logger
.
info
(
"校验实物
用户i
d篡改无法兑换成功"
);
logger
.
info
(
"校验实物
skuI
d篡改无法兑换成功"
);
}
...
...
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