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
b84171cf
Commit
b84171cf
authored
Dec 10, 2019
by
吕雯燕
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of gitlab2.dui88.com:mabo/test-platform
parents
9cb7ba63
d4fdd551
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
52 additions
and
0 deletions
+52
-0
积分夺宝开奖_AccessTest.java
...t/java/http/cases/HappyCodeNewTest/积分夺宝开奖_AccessTest.java
+1
-0
权益一期线上用户核销中匹配兑换码兑换_DuibaTest.java
...cases/equitySubjectTest/权益一期线上用户核销中匹配兑换码兑换_DuibaTest.java
+0
-0
equityPrizeService.java
src/test/java/http/service/Activity/equityPrizeService.java
+51
-0
No files found.
src/test/java/http/cases/HappyCodeNewTest/积分夺宝开奖_AccessTest.java
View file @
b84171cf
...
...
@@ -167,6 +167,7 @@ public class 积分夺宝开奖_AccessTest extends DuibaTestBase {
String
prizeDetailUrl
=
String
.
valueOf
(
rewardResponse
.
jsonPath
().
getString
(
"data.prizeDetailUrl"
));
//夺宝详情页面
Thread
.
sleep
(
5000
);
Response
detailResponse
=
happyCodeNewService
.
detail
(
uid
,
activityId
,
basicId
,
phaseId
);
detailResponse
.
prettyPrint
();
String
prizeType
=
String
.
valueOf
(
detailResponse
.
jsonPath
().
getString
(
"data.prizeType"
));
...
...
src/test/java/http/cases/equitySubjectTest/权益一期线上用户核销中匹配兑换码兑换_DuibaTest.java
0 → 100644
View file @
b84171cf
This diff is collapsed.
Click to expand it.
src/test/java/http/service/Activity/equityPrizeService.java
0 → 100644
View file @
b84171cf
package
http
.
service
.
Activity
;
import
http.service.Authorization
;
import
io.restassured.http.Cookies
;
import
io.restassured.response.Response
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
org.testng.Assert
;
import
java.util.HashMap
;
import
java.util.Map
;
import
static
io
.
restassured
.
RestAssured
.
given
;
@Service
public
class
equityPrizeService
{
@Value
(
"${activity.host}"
)
String
activityHost
;
@Autowired
Authorization
authorization
;
/**
* 核销一期 /aaw/equityPrize/exchange
* Request Method: POST
*
* @param excCode 兑换码
* @return
* @throws Exception
*/
public
Response
exchange
(
Map
cookies
,
String
excCode
,
String
validate
)
throws
Exception
{
Map
<
String
,
String
>
map
=
new
HashMap
<>();
map
.
put
(
"excCode"
,
excCode
);
map
.
put
(
"validate"
,
validate
);
Response
response
=
given
().
cookies
(
cookies
).
params
(
map
).
post
(
activityHost
+
"/aaw/equityPrize/exchange"
);
try
{
// Assert.assertEquals(response.jsonPath().getString("success"), "true", "/aaw/equityPrize/exchange接口失败");
Assert
.
assertEquals
(
String
.
valueOf
(
response
.
getStatusCode
()),
"200"
,
"/aaw/equityPrize/exchange接口失败"
);
}
catch
(
Exception
e
)
{
throw
new
Exception
(
"/aaw/equityPrize/exchange接口失败,返回信息:"
+
response
.
asString
());
}
catch
(
Error
er
)
{
throw
new
Exception
(
"/aaw/equityPrize/exchange接口失败,返回信息:"
+
response
.
asString
());
}
return
response
;
}
}
\ No newline at end of file
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