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
327133ba
Commit
327133ba
authored
Jul 15, 2019
by
吕雯燕
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lv
parent
f349709b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
77 additions
and
16 deletions
+77
-16
兑吧新实物_兑换流程测试_ExchangeTest.java
...va/http/cases/ExchangeTest/兑吧新实物_兑换流程测试_ExchangeTest.java
+52
-15
自有新实物_兑换流程测试_ExchangeTest.java
...ses/ExchangeTest/自有_商品兑换限制/自有新实物_兑换流程测试_ExchangeTest.java
+25
-1
No files found.
src/test/java/http/cases/ExchangeTest/兑吧新实物_兑换流程测试_ExchangeTest.java
View file @
327133ba
...
...
@@ -446,29 +446,66 @@ public class 兑吧新实物_兑换流程测试_ExchangeTest extends CheckTemple
}
@Test
(
description
=
"新实物确认下单页面"
)
public
void
实物确认下单测试
()
throws
Exception
{
String
appItemId
=
"196218"
;
String
appSkuId
=
"145"
;
Response
response
=
gawService
.
confirmItemDetail
(
uid
,
appItemId
,
appSkuId
);
response
.
prettyPrint
();
@Test
(
description
=
"新实物用户id篡改测试"
)
public
void
实物用户
id
篡改测试
()
throws
Exception
{
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.items[0].sku.attr[0].value"
),
"白色"
,
"校验sku信息颜色失败"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.items[0].sku.attr[1].value"
),
"S"
,
"校验sku信息尺寸失败"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.items[0].sku.credits"
),
"100"
,
"校验sku商品积分失败"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.items[0].multiImage"
),
"//yun.dui88.com/images/201906/9p72lmu1qn.jpg"
,
"校验图片信息失败"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.items[0].title"
),
"【自动化勿动】自有实物sku"
,
"校验实物名称失败"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.orderCredits"
),
"100"
,
"校验订单积分失败"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.expressPrice"
),
"500"
,
"校验订单运费金额失败"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.consumerPayPrice"
),
"500"
,
"校验订单支付金额失败"
);
//uid: 大富翁app
//商品: lv测试应用55
int
uid
=
8
;
String
appItemId
=
"197040"
;
String
itemId
=
"32655"
;
String
message
=
""
;
Map
cookies
=
authorization
.
dafuwengLogin
(
uid
);
logger
.
info
(
"校验新实物确认下单页正确"
);
//实物兑换
try
{
Response
response
=
gawService
.
objectExchange
(
cookies
,
appItemId
,
itemId
,
"163"
);
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
=
"197040"
;
String
itemId
=
"32655"
;
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
(
"校验实物用户id篡改无法兑换成功"
);
}
...
...
src/test/java/http/cases/ExchangeTest/自有_商品兑换限制/自有新实物_兑换流程测试_ExchangeTest.java
View file @
327133ba
...
...
@@ -357,7 +357,6 @@ public class 自有新实物_兑换流程测试_ExchangeTest extends CheckTemple
}
@Test
(
description
=
"新自有实物会员兑换限制"
)
public
void
会员兑换限制
()
throws
Exception
{
String
appItemId
=
"193810"
;
...
...
@@ -383,6 +382,31 @@ public class 自有新实物_兑换流程测试_ExchangeTest extends CheckTemple
}
@Test
(
description
=
"新实物确认下单页面"
)
public
void
实物确认下单测试
()
throws
Exception
{
int
uid
=
7290
;
String
appItemId
=
"196218"
;
String
appSkuId
=
"145"
;
Response
response
=
gawService
.
confirmItemDetail
(
uid
,
appItemId
,
appSkuId
);
response
.
prettyPrint
();
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.items[0].sku.attr[0].value"
),
"白色"
,
"校验sku信息颜色失败"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.items[0].sku.attr[1].value"
),
"S"
,
"校验sku信息尺寸失败"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.items[0].sku.credits"
),
"100"
,
"校验sku商品积分失败"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.items[0].multiImage"
),
"//yun.dui88.com/images/201906/9p72lmu1qn.jpg"
,
"校验图片信息失败"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.items[0].title"
),
"【自动化勿动】自有实物sku"
,
"校验实物名称失败"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.orderCredits"
),
"100"
,
"校验订单积分失败"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.expressPrice"
),
"500"
,
"校验订单运费金额失败"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.consumerPayPrice"
),
"500"
,
"校验订单支付金额失败"
);
logger
.
info
(
"校验新实物确认下单页正确"
);
}
@Test
(
description
=
"新自有实物用户id修改测试"
)
public
void
实物用户
id
篡改测试
()
throws
Exception
{
...
...
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