Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
oto
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
龚小红
oto
Commits
ab1403cd
Commit
ab1403cd
authored
Jul 09, 2020
by
Su-Yi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改tku
parent
4d8ef740
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
27 additions
and
5 deletions
+27
-5
Pay.java
src/test/java/com/kjj/qa/cases/Pay.java
+26
-4
BasicConfig.java
src/test/java/com/kjj/qa/config/BasicConfig.java
+1
-1
Article.class
target/test-classes/com/kjj/qa/cases/Article.class
+0
-0
Novice.class
target/test-classes/com/kjj/qa/cases/Novice.class
+0
-0
Pay.class
target/test-classes/com/kjj/qa/cases/Pay.class
+0
-0
BasicConfig.class
target/test-classes/com/kjj/qa/config/BasicConfig.class
+0
-0
NetworkUtil.class
target/test-classes/com/kjj/qa/utils/NetworkUtil.class
+0
-0
No files found.
src/test/java/com/kjj/qa/cases/Pay.java
View file @
ab1403cd
...
@@ -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);
}
}
*/
}
}
...
...
src/test/java/com/kjj/qa/config/BasicConfig.java
View file @
ab1403cd
...
@@ -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
=
"T3gM31f18jAW2MCeE8iyG6ZRjTSJXb2zMDShzwbxiB1QfXDa
WAXtDDZxwdjpfuyTDCHS5SP8KgvsECQm5o
"
;
public
static
final
String
AGENT_TKU
=
"T3gM31f18jAW2MCeE8iyG6ZRjTSJXb2zMDShzwbxiB1QfXDa
Vp8vuhk96sY6hxUTTo5qLE2jpAM4ihPTsG
"
;
// *************** 钉钉机器人 ***************
// *************** 钉钉机器人 ***************
// 线上-告警群
// 线上-告警群
...
...
target/test-classes/com/kjj/qa/cases/Article.class
View file @
ab1403cd
No preview for this file type
target/test-classes/com/kjj/qa/cases/Novice.class
View file @
ab1403cd
No preview for this file type
target/test-classes/com/kjj/qa/cases/Pay.class
View file @
ab1403cd
No preview for this file type
target/test-classes/com/kjj/qa/config/BasicConfig.class
View file @
ab1403cd
No preview for this file type
target/test-classes/com/kjj/qa/utils/NetworkUtil.class
View file @
ab1403cd
No preview for this file type
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