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
d12b0324
Commit
d12b0324
authored
Mar 20, 2019
by
马博
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
754db6f6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
5 deletions
+19
-5
兑吧新实物_兑换流程测试_ExchangeTest.java
...va/http/cases/ExchangeTest/兑吧新实物_兑换流程测试_ExchangeTest.java
+3
-3
gawService.java
src/test/java/http/service/app/gawService.java
+16
-2
No files found.
src/test/java/http/cases/ExchangeTest/兑吧新实物_兑换流程测试_ExchangeTest.java
View file @
d12b0324
...
...
@@ -41,11 +41,11 @@ public class 兑吧新实物_兑换流程测试_ExchangeTest extends CheckTemple
int
uid
=
6866
;
//
@Test(description = "兑吧新实物每人限购每日限制")
@Test
(
description
=
"兑吧新实物每人限购每日限制"
)
public
void
每人限购每日限制测试
()
throws
Exception
{
String
appItemId
=
"192950"
;
String
itemId
=
"32439"
;
int
appItemId
=
192950
;
int
itemId
=
32439
;
// try{
//第一次兑换
...
...
src/test/java/http/service/app/gawService.java
View file @
d12b0324
...
...
@@ -11,7 +11,9 @@ import org.springframework.beans.factory.annotation.Value;
import
org.springframework.stereotype.Service
;
import
org.testng.Assert
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
static
io
.
restassured
.
RestAssured
.
given
;
...
...
@@ -28,15 +30,24 @@ public class gawService {
//普通实物兑换接口
public
Response
objectExchange
(
int
uid
,
String
appItemId
,
String
itemId
)
throws
Exception
{
public
Response
objectExchange
(
int
uid
,
int
appItemId
,
int
itemId
)
throws
Exception
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
Map
<
String
,
Object
>
mapList
=
new
HashMap
<>();
List
<
Map
>
list
=
new
ArrayList
<>();
mapList
.
put
(
"itemId"
,
itemId
);
mapList
.
put
(
"skuId"
,
16
);
mapList
.
put
(
"appItemId"
,
appItemId
);
mapList
.
put
(
"credits"
,
"100"
);
mapList
.
put
(
"price"
,
0
);
list
.
add
(
mapList
);
map
.
put
(
"remark"
,
""
);
//买家留言
map
.
put
(
"degreeId"
,
""
);
map
.
put
(
"actualPrice"
,
"0"
);
//总金额
map
.
put
(
"actualCredits"
,
"100"
);
//总积分
map
.
put
(
"itemParam"
,
"[{\"itemId\":"
+
itemId
+
",\"skuId\":16,\"appItemId\":"
+
appItemId
+
",\"credits\":\"100\",\"price\":0}]"
);
map
.
put
(
"itemParam"
,
list
.
toArray
()
);
map
.
put
(
"payType"
,
"3"
);
map
.
put
(
"expressPrice"
,
"0"
);
map
.
put
(
"validate"
,
""
);
...
...
@@ -46,6 +57,9 @@ public class gawService {
logger
.
info
(
"请求实物兑换接口:"
+
"/gaw/objectExchange/create"
);
Response
response
=
given
().
contentType
(
"application/json; charset=UTF-8"
).
cookies
(
authorization
.
dafuwengLogin
(
uid
)).
body
(
jsonParam
).
post
(
"http://"
+
goodsHost
+
"/gaw/objectExchange/create"
);
// Response saveResponse = given().contentType("application/x-www-form-urlencoded;charset=UTF-8").cookies(authorization.dafuwengLogin(uid)).params(map).post("http://"+goodsHost+"/gaw/objectExchange/create");
response
.
prettyPrint
();
try
{
...
...
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