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
59b1de28
Commit
59b1de28
authored
Jul 11, 2019
by
马博
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
加延时
parent
9ccb2dc0
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
157 additions
and
0 deletions
+157
-0
兑吧老优惠券_兑换流程测试_ExchangeTest.java
...a/http/cases/ExchangeTest/兑吧老优惠券_兑换流程测试_ExchangeTest.java
+1
-0
test.java
src/test/java/ui/cases/test.java
+156
-0
No files found.
src/test/java/http/cases/ExchangeTest/兑吧老优惠券_兑换流程测试_ExchangeTest.java
View file @
59b1de28
...
...
@@ -224,6 +224,7 @@ public class 兑吧老优惠券_兑换流程测试_ExchangeTest extends CheckTem
map
.
put
(
"itemId"
,
"30319"
);
map
.
put
(
"token"
,
"yrJRr7Cddp2YeQd"
);
Thread
.
sleep
(
4000
);
Response
response
=
given
().
contentType
(
"application/x-www-form-urlencoded;charset=UTF-8"
).
cookies
(
authorization
.
dafuwengLogin
(
uid
)).
params
(
map
).
post
(
url
+
"/couponExchange/exchange"
);
response
.
prettyPrint
();
...
...
src/test/java/ui/cases/test.java
View file @
59b1de28
...
...
@@ -395,4 +395,160 @@ public class test extends DuibaBases {
@Test
public
void
日历签到
(){
// Map<String,String> map = new HashMap<>();
// map.put("id","90");
//// map.put("signDate",getTime(0));
//
// String url = "http://activity.m.duibatest.com.cn";
//
// Map<String,String> header = new HashMap<>();
// header.put("User-Agent","windows mabo");
//
//
// Map<String,String> cookie = new HashMap<>(authorization.dafuwengLoginTest(6));
// Response response = given().headers(header).cookies(cookie).params(map).get(url+"/signactivity/doSign");
// response.prettyPrint();
Map
<
String
,
String
>
map
=
new
HashMap
<>();
map
.
put
(
"id"
,
"90"
);
map
.
put
(
"signDate"
,
getTime
(
0
));
String
url
=
"http://activity.m.duibatest.com.cn"
;
Map
<
String
,
String
>
header
=
new
HashMap
<>();
header
.
put
(
"User-Agent"
,
"windows mabo"
);
Map
<
String
,
String
>
cookie
=
new
HashMap
<>(
authorization
.
dafuwengLoginTest
(
6
));
Response
response
=
given
().
headers
(
header
).
cookies
(
cookie
).
params
(
map
).
get
(
url
+
"/signactivity/reSign"
);
response
.
prettyPrint
();
}
@Test
public
void
契约签到
(){
// Map<String,String> map = new HashMap<>();
// map.put("activityId","149");
// map.put("betAmount","100");
//
// String url = "http://activity.m.duibatest.com.cn";
//
// Map<String,String> header = new HashMap<>();
// header.put("User-Agent","windows mabo");
//
//
// Map<String,String> cookie = new HashMap<>(authorization.dafuwengLoginTest(2));
// Response response = given().headers(header).cookies(cookie).params(map).get(url+"/sign/contract/doJoin");
// response.prettyPrint();
// Map<String,String> map = new HashMap<>();
// map.put("activityId","149");
//
// String url = "http://activity.m.duibatest.com.cn";
//
// Map<String,String> header = new HashMap<>();
// header.put("User-Agent","windows mabo");
//
//
// Map<String,String> cookie = new HashMap<>(authorization.dafuwengLoginTest(2));
// Response response = given().headers(header).cookies(cookie).params(map).get(url+"/sign/contract/doSign");
// response.prettyPrint();
Map
<
String
,
String
>
map
=
new
HashMap
<>();
map
.
put
(
"contractId"
,
"3123"
);
String
url
=
"http://activity.m.duibatest.com.cn"
;
Map
<
String
,
String
>
header
=
new
HashMap
<>();
header
.
put
(
"User-Agent"
,
"windows mabo"
);
Map
<
String
,
String
>
cookie
=
new
HashMap
<>(
authorization
.
dafuwengLoginTest
(
5
));
Response
response
=
given
().
headers
(
header
).
cookies
(
cookie
).
params
(
map
).
get
(
url
+
"/sign/contract/getReward"
);
response
.
prettyPrint
();
}
@Test
public
void
宠物养成
(){
Map
<
String
,
String
>
map
=
new
HashMap
<>();
map
.
put
(
"activityId"
,
"18"
);
map
.
put
(
"petName"
,
"66"
);
String
url
=
"http://activity.m.duibatest.com.cn"
;
Map
<
String
,
String
>
header
=
new
HashMap
<>();
header
.
put
(
"User-Agent"
,
"windows mabo"
);
Map
<
String
,
String
>
cookie
=
new
HashMap
<>(
authorization
.
dafuwengLoginTest
(
3580
));
Response
response
=
given
().
headers
(
header
).
cookies
(
cookie
).
params
(
map
).
post
(
url
+
"/signpet/adopte"
);
response
.
prettyPrint
();
}
// 获取时间方法
public
String
getTime
(
int
amount
){
SimpleDateFormat
dateFormat
=
new
SimpleDateFormat
(
"EEE MMM d yyyy"
,
Locale
.
ENGLISH
);
Date
date
=
new
Date
();
Calendar
calendar
=
Calendar
.
getInstance
();
calendar
.
setTime
(
date
);
calendar
.
add
(
Calendar
.
DAY_OF_MONTH
,
amount
);
date
=
calendar
.
getTime
();
// System.out.println(dateFormat.format(date));
String
time
=
dateFormat
.
format
(
date
)+
" 08:00:00 GMT+0800 (CST)"
;
// System.out.println(time);
return
time
;
}
}
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