Commit ab1403cd authored by Su-Yi's avatar Su-Yi

修改tku

parent 4d8ef740
...@@ -10,6 +10,7 @@ import org.testng.annotations.Test; ...@@ -10,6 +10,7 @@ import org.testng.annotations.Test;
import java.io.IOException; import java.io.IOException;
import java.net.CookieStore;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
...@@ -231,6 +232,12 @@ public class Pay { ...@@ -231,6 +232,12 @@ public class Pay {
public static void tearDown() throws IOException{ public static void tearDown() throws IOException{
apiCount += 9; apiCount += 9;
} }
/*
@Test (description = "测试",priority = 11)
public void 测试() throws IOException {
switchvip();
}
//切换vip //切换vip
private static void switchvip() { private static void switchvip() {
...@@ -240,7 +247,6 @@ public class Pay { ...@@ -240,7 +247,6 @@ public class Pay {
//1.先进入SSO登录框 登入管理后台 //1.先进入SSO登录框 登入管理后台
network.host = SSO_HOST; network.host = SSO_HOST;
Map<String, Object> loginParams = new HashMap<String, Object>(); Map<String, Object> loginParams = new HashMap<String, Object>();
loginParams.put("email","lihaohong"); loginParams.put("email","lihaohong");
loginParams.put("password","duiba123456"); loginParams.put("password","duiba123456");
...@@ -250,16 +256,31 @@ public class Pay { ...@@ -250,16 +256,31 @@ public class Pay {
response = network.postResponse(loginParams,SSO_DOLOGIN); response = network.postResponse(loginParams,SSO_DOLOGIN);
Cookies cookies = response.getDetailedCookies(); Cookies cookies = response.getDetailedCookies();
System.out.println(cookies); network.agentCookies.putAll(response.getCookies());
System.out.println(response.headers());
String redirectPath = response.jsonPath().getString("redirect");
long ssoStamp = Long.parseLong(redirectPath.substring(redirectPath.length()-13));
// 2.登录成功,切到管理后台 // 2.登录成功,切到管理后台
// network.host = MANAGER_HOST; network.host = MANAGER_HOST;
Map<String, Object> params = new HashMap<String, Object>();
params.put("redirect",MANAGER_HOST);
params.put("ssoStamp",ssoStamp);
response = network.getResponse(params,SSO_INDEX);
response.body().prettyPrint();
System.out.println("头部:"+ response.headers());
System.out.println("登录后cookies:"+ response.getDetailedCookies());
System.out.println("cookies:" + network.agentCookies);
// cookies = response.getCookies();
// network.agentCookies.putAll(cookies);
// System.out.println("coookies:"+ network.agentCookies);
// 3.切换公司为客集集 // 3.切换公司为客集集
Map<String, Object> changeParams = new HashMap<String, Object>(); Map<String, Object> changeParams = new HashMap<String, Object>();
changeParams.put("id",sellerId); changeParams.put("id",sellerId);
changeParams.put("companyId",6); changeParams.put("companyId",6);
response = network.getResponse(changeParams,MANAGER_CHANGECOMPANY); response = network.getResponse(changeParams,MANAGER_CHANGECOMPANY);
response.body().prettyPrint();
// 4.切换vip // 4.切换vip
Map<String, Object> switchVipParams = new HashMap<String, Object>(); Map<String, Object> switchVipParams = new HashMap<String, Object>();
...@@ -275,8 +296,9 @@ public class Pay { ...@@ -275,8 +296,9 @@ public class Pay {
changeParams.remove("companyId",6); //去掉公司 changeParams.remove("companyId",6); //去掉公司
response = network.getResponse(changeParams,MANAGER_CHANGECOMPANY); response = network.getResponse(changeParams,MANAGER_CHANGECOMPANY);
}
}
*/
} }
......
...@@ -10,7 +10,7 @@ public class BasicConfig { ...@@ -10,7 +10,7 @@ public class BasicConfig {
// 用户微信昵称 // 用户微信昵称
public static final String WECHAT_NAME = "小疙瘩人寿"; //true public static final String WECHAT_NAME = "小疙瘩人寿"; //true
// 用户tku // 用户tku
public static final String AGENT_TKU = "T3gM31f18jAW2MCeE8iyG6ZRjTSJXb2zMDShzwbxiB1QfXDaWAXtDDZxwdjpfuyTDCHS5SP8KgvsECQm5o"; public static final String AGENT_TKU = "T3gM31f18jAW2MCeE8iyG6ZRjTSJXb2zMDShzwbxiB1QfXDaVp8vuhk96sY6hxUTTo5qLE2jpAM4ihPTsG";
// *************** 钉钉机器人 *************** // *************** 钉钉机器人 ***************
// 线上-告警群 // 线上-告警群
......
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