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
c73bf836
Commit
c73bf836
authored
Nov 16, 2018
by
赵然
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' of gitlab2.dui88.com:mabo/test-platform into develop
parents
0acd24e4
4ea97b43
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
1 deletion
+24
-1
优惠券_兑换异常测试_ExchangeTest.java
...java/http/cases/ExchangeTest/优惠券_兑换异常测试_ExchangeTest.java
+2
-1
虚拟商品_兑换异常测试_ExchangeTest.java
...ava/http/cases/ExchangeTest/虚拟商品_兑换异常测试_ExchangeTest.java
+0
-0
VirtualExchangeService.java
src/test/java/http/service/app/VirtualExchangeService.java
+22
-0
No files found.
src/test/java/http/cases/ExchangeTest/优惠券_兑换
流程测试pyl
_ExchangeTest.java
→
src/test/java/http/cases/ExchangeTest/优惠券_兑换
异常测试
_ExchangeTest.java
View file @
c73bf836
...
@@ -23,7 +23,8 @@ import static io.restassured.RestAssured.given;
...
@@ -23,7 +23,8 @@ import static io.restassured.RestAssured.given;
* Created by panyuli on 2018/07/06.
* Created by panyuli on 2018/07/06.
*/
*/
public
class
优惠券
_
兑换流程测试
pyl_ExchangeTest
extends
CheckTemplet
{
public
class
优惠券
_
兑换异常测试
_ExchangeTest
extends
CheckTemplet
{
@Autowired
@Autowired
private
MobileService
mobileService
;
private
MobileService
mobileService
;
...
...
src/test/java/http/cases/ExchangeTest/虚拟商品_兑换异常测试_ExchangeTest.java
0 → 100644
View file @
c73bf836
This diff is collapsed.
Click to expand it.
src/test/java/http/service/app/VirtualExchangeService.java
View file @
c73bf836
...
@@ -42,4 +42,26 @@ public class VirtualExchangeService {
...
@@ -42,4 +42,26 @@ public class VirtualExchangeService {
return
response
;
return
response
;
}
}
public
Response
exchange2
(
Map
cookies
,
String
appItemId
,
String
degreeId
)
throws
Exception
{
Map
<
String
,
String
>
map
=
new
HashMap
<>();
map
.
put
(
"appItemId"
,
appItemId
);
map
.
put
(
"degreeId"
,
degreeId
);
map
.
put
(
"token"
,
"xz9eyi"
);
logger
.
info
(
"请求/virtualExchange/exchange接口"
);
Response
response
=
given
().
contentType
(
"application/x-www-form-urlencoded;charset=UTF-8"
).
cookies
(
cookies
).
params
(
map
).
post
(
"http://"
+
goodsHost
+
"/virtualExchange/exchange"
);
//couponExchange
try
{
Assert
.
assertEquals
(
String
.
valueOf
(
response
.
getStatusCode
()),
"200"
,
"/objectExchange/exchange接口返回异常"
);
}
catch
(
Exception
e
){
throw
new
Exception
(
"/objectExchange/exchange接口返回异常,返回信息:"
+
response
.
asString
());
}
catch
(
Error
er
){
throw
new
Exception
(
"/objectExchange/exchange接口返回异常,返回信息:"
+
response
.
asString
());
}
return
response
;
}
}
}
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