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
d16ca00b
Commit
d16ca00b
authored
Jul 16, 2019
by
吕雯燕
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lv
parent
fc46d50f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
193 additions
and
2 deletions
+193
-2
自有新优惠券_兑换限制测试_ExchangeTest.java
...es/ExchangeTest/自有_商品兑换限制/自有新优惠券_兑换限制测试_ExchangeTest.java
+54
-0
自有新卡密_兑换限制测试_ExchangeTest.java
...ses/ExchangeTest/自有_商品兑换限制/自有新卡密_兑换限制测试_ExchangeTest.java
+52
-0
自有新实物_兑换流程测试_ExchangeTest.java
...ses/ExchangeTest/自有_商品兑换限制/自有新实物_兑换流程测试_ExchangeTest.java
+30
-2
自有新虚拟商品_充值_兑换限制_ExchangeTest.java
.../ExchangeTest/自有_商品兑换限制/自有新虚拟商品_充值_兑换限制_ExchangeTest.java
+57
-0
No files found.
src/test/java/http/cases/ExchangeTest/自有_商品兑换限制/自有新优惠券_兑换限制测试_ExchangeTest.java
View file @
d16ca00b
...
@@ -576,5 +576,59 @@ public class 自有新优惠券_兑换限制测试_ExchangeTest extends CheckTem
...
@@ -576,5 +576,59 @@ public class 自有新优惠券_兑换限制测试_ExchangeTest extends CheckTem
@Test
(
description
=
"新优惠券用户id篡改测试"
)
public
void
优惠券用户
id
篡改测试
()
throws
Exception
{
//uid: 大富翁app
//商品: lv测试应用55
int
uid
=
6999
;
String
appItemId
=
"197048"
;
String
message
=
""
;
//优惠券兑换
try
{
Response
response
=
gawService
.
couponExchange
(
uid
,
appItemId
,
175
);
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
=
7028
;
String
appItemId
=
"197048"
;
String
message
=
""
;
//优惠券兑换,skuId改为其它商品的
try
{
Response
response
=
gawService
.
couponExchange
(
uid
,
appItemId
,
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 @
d16ca00b
...
@@ -480,6 +480,58 @@ public class 自有新卡密_兑换限制测试_ExchangeTest extends CheckTemple
...
@@ -480,6 +480,58 @@ public class 自有新卡密_兑换限制测试_ExchangeTest extends CheckTemple
@Test
(
description
=
"卡密用户id篡改测试"
)
public
void
卡密用户
id
篡改测试
()
throws
Exception
{
//uid: 大富翁app
//商品: lv测试应用55
int
uid
=
6997
;
String
appItemId
=
"197049"
;
String
message
=
""
;
//卡密兑换
try
{
Response
response
=
gawService
.
couponExchange
(
uid
,
appItemId
,
176
);
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
=
7294
;
String
appItemId
=
"197049"
;
String
message
=
""
;
//优惠券兑换,skuId改为其它商品的
try
{
Response
response
=
gawService
.
couponExchange
(
uid
,
appItemId
,
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 @
d16ca00b
...
@@ -407,7 +407,7 @@ public class 自有新实物_兑换流程测试_ExchangeTest extends CheckTemple
...
@@ -407,7 +407,7 @@ public class 自有新实物_兑换流程测试_ExchangeTest extends CheckTemple
@Test
(
description
=
"新
自有实物用户id修
改测试"
)
@Test
(
description
=
"新
实物用户id篡
改测试"
)
public
void
实物用户
id
篡改测试
()
throws
Exception
{
public
void
实物用户
id
篡改测试
()
throws
Exception
{
//uid: 大富翁app
//uid: 大富翁app
...
@@ -435,7 +435,7 @@ public class 自有新实物_兑换流程测试_ExchangeTest extends CheckTemple
...
@@ -435,7 +435,7 @@ public class 自有新实物_兑换流程测试_ExchangeTest extends CheckTemple
}
}
@Test
(
description
=
"新
自有
实物积分修改测试"
)
@Test
(
description
=
"新实物积分修改测试"
)
public
void
实物积分篡改测试
()
throws
Exception
{
public
void
实物积分篡改测试
()
throws
Exception
{
int
uid
=
7288
;
int
uid
=
7288
;
...
@@ -462,6 +462,34 @@ public class 自有新实物_兑换流程测试_ExchangeTest extends CheckTemple
...
@@ -462,6 +462,34 @@ public class 自有新实物_兑换流程测试_ExchangeTest extends CheckTemple
}
}
@Test
(
description
=
"新实物skuId篡改测试"
)
public
void
实物
skuId
篡改测试
()
throws
Exception
{
int
uid
=
7288
;
String
appItemId
=
"197042"
;
String
itemId
=
null
;
String
message
=
""
;
Map
cookies
=
authorization
.
dafuwengLogin
(
uid
);
//实物兑换,skuId改为其它商品的
try
{
Response
response
=
gawService
.
objectExchange
(
cookies
,
appItemId
,
itemId
,
"36"
);
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 @
d16ca00b
...
@@ -443,4 +443,61 @@ public class 自有新虚拟商品_充值_兑换限制_ExchangeTest extends Chec
...
@@ -443,4 +443,61 @@ public class 自有新虚拟商品_充值_兑换限制_ExchangeTest extends Chec
}
}
@Test
(
description
=
"新虚拟商品用户id篡改测试"
)
public
void
虚拟商品用户
id
篡改测试
()
throws
Exception
{
//uid: 大富翁app
//商品: lv测试应用55
int
uid
=
6970
;
String
appItemId
=
"197050"
;
String
message
=
""
;
Map
cookies
=
authorization
.
dafuwengLogin
(
uid
);
//虚拟商品兑换
try
{
Response
response
=
gawService
.
virtualExchange
(
cookies
,
appItemId
,
177
);
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
=
7295
;
String
appItemId
=
"197050"
;
String
message
=
""
;
Map
cookies
=
authorization
.
dafuwengLogin
(
uid
);
//优惠券兑换,skuId改为其它商品的
try
{
Response
response
=
gawService
.
virtualExchange
(
cookies
,
appItemId
,
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篡改无法兑换成功"
);
}
}
}
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