Commit 59b1de28 authored by 马博's avatar 马博

加延时

parent 9ccb2dc0
...@@ -224,6 +224,7 @@ public class 兑吧老优惠券_兑换流程测试_ExchangeTest extends CheckTem ...@@ -224,6 +224,7 @@ public class 兑吧老优惠券_兑换流程测试_ExchangeTest extends CheckTem
map.put("itemId","30319"); map.put("itemId","30319");
map.put("token","yrJRr7Cddp2YeQd"); 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 response = given().contentType("application/x-www-form-urlencoded;charset=UTF-8").cookies(authorization.dafuwengLogin(uid)).params(map).post(url + "/couponExchange/exchange");
response.prettyPrint(); response.prettyPrint();
......
...@@ -395,4 +395,160 @@ public class test extends DuibaBases { ...@@ -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;
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment