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
579191b8
Commit
579191b8
authored
May 28, 2020
by
赵然
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
zr
parent
6a1cd26b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
5 deletions
+13
-5
CustomActivity_DuibaTest.java
...p/cases/DefinedActivityTest/CustomActivity_DuibaTest.java
+9
-3
自有活动出奖_DuibaTest.java
src/test/java/http/cases/DeveloperTest/自有活动出奖_DuibaTest.java
+2
-1
页面元素测试_DuibaTest.java
...est/java/http/cases/NewActivityTest/页面元素测试_DuibaTest.java
+1
-0
NewActivityService.java
src/test/java/http/service/Activity/NewActivityService.java
+1
-1
No files found.
src/test/java/http/cases/DefinedActivityTest/CustomActivity_DuibaTest.java
View file @
579191b8
...
...
@@ -257,11 +257,17 @@ public class CustomActivity_DuibaTest extends DuibaTestBase {
Thread
.
sleep
(
1000
);
response
=
newActivityService
.
getOrderStatus2
(
7496
,
orderId
,
device
);
String
result
=
String
.
valueOf
(
response
.
jsonPath
().
getString
(
"result"
));
int
i
=
8
;
while
(
i
>
0
&&
(
result
.
equals
(
"0"
)))
{
int
i
=
3
;
// while (i > 0 && (result.equals("0"))) {
// Thread.sleep(1000);
// response = newActivityService.getOrderStatus2(7496,orderId, device);
// result = String.valueOf(response.jsonPath().getString("result"));
// i--;
// response.prettyPrint();
// }
while
(
i
>
0
)
{
Thread
.
sleep
(
1000
);
response
=
newActivityService
.
getOrderStatus2
(
7496
,
orderId
,
device
);
result
=
String
.
valueOf
(
response
.
jsonPath
().
getString
(
"result"
));
i
--;
response
.
prettyPrint
();
}
...
...
src/test/java/http/cases/DeveloperTest/自有活动出奖_DuibaTest.java
View file @
579191b8
...
...
@@ -252,6 +252,7 @@ public class 自有活动出奖_DuibaTest extends DuibaTestBase {
result
=
response
.
jsonPath
().
getString
(
"result"
);
i
--;
}
response
.
prettyPrint
();
String
id
=
response
.
jsonPath
().
getString
(
"lottery.id"
);
String
imgurl
=
response
.
jsonPath
().
getString
(
"lottery.imgurl"
);
...
...
@@ -261,7 +262,7 @@ public class 自有活动出奖_DuibaTest extends DuibaTestBase {
String
coupon_code
=
response
.
jsonPath
().
getString
(
"lottery.coupon_code"
);
String
coupon_key
=
response
.
jsonPath
().
getString
(
"lottery.coupon_key"
);
Assert
.
assertEquals
(
id
,
"
15810
"
,
"id不正确"
);
Assert
.
assertEquals
(
id
,
"
36248
"
,
"id不正确"
);
Assert
.
assertTrue
(
link
.
contains
(
"//activity.m.duibatest.com.cn/crecord/recordDetailNew?orderId="
),
"link不正确"
);
Assert
.
assertEquals
(
title
,
"【自动化】优惠券-普通"
,
"title不正确"
);
Assert
.
assertEquals
(
type
,
"coupon"
,
"type不正确"
);
...
...
src/test/java/http/cases/NewActivityTest/页面元素测试_DuibaTest.java
View file @
579191b8
...
...
@@ -49,6 +49,7 @@ public class 页面元素测试_DuibaTest extends AbstractTestNGSpringContextTes
@Test
(
description
=
"校验接口返回的奖品"
)
public
void
奖品显示测试
()
throws
Exception
{
Response
response
=
newActivityService
.
ajaxElement
(
"duiba"
,
"3347"
,
"19204"
,
"false"
);
response
.
prettyPrint
();
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"options[0].prizeType"
),
"thanks"
,
"校验显示谢谢参与失败"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"options[1].prizeType"
),
"coupon"
,
"校验显示优惠券失败"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"options[2].prizeType"
),
"object"
,
"校验显示实物失败"
);
...
...
src/test/java/http/service/Activity/NewActivityService.java
View file @
579191b8
...
...
@@ -543,7 +543,7 @@ public class NewActivityService {
public
void
submit
(
int
uid
,
String
orderId
)
throws
Exception
{
Map
<
String
,
String
>
map
=
new
HashMap
<>();
map
.
put
(
"orderId"
,
orderId
);
map
.
put
(
"answerData"
,
"[{\"id\":46
5,\"option\":3
}]"
);
map
.
put
(
"answerData"
,
"[{\"id\":46
3,\"option\":1
}]"
);
logger
.
info
(
"请求/hdtool/submit接口,orderId="
+
orderId
);
Response
response
=
given
().
cookies
(
authorization
.
dafuwengLogin
(
uid
)).
params
(
map
).
post
(
url
+
"/hdtool/submit"
);
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