Commit 16148d6f authored by 龚小红's avatar 龚小红

更换秒杀中代理人用户,作为真实用户实现下单成功,超时返回库存

parent 1882fd75
package com.kjj.cases.admin;
import com.kjj.utils.BaseUtils;
import com.kjj.utils.NetworkUtils;
import static com.kjj.config.BasicConfig.*;
......@@ -101,11 +100,18 @@ public interface Authorization {
}
//代理人(小疙瘩人寿)授权,ID:995
//代理人(陈家梦)授权,ID:210
default void agentAuth1(){
// 创建用户 并传到network里
network.agentCookies.put("authKey",agentAuth);
System.out.println("用户AUTH_KEY:"+agentAuth);
network.agentCookies.put("authKey", agentAuth1);
System.out.println("用户AUTH_KEY:"+ agentAuth1);
}
//代理人(陈正茜)授权,ID:282
default void agentAuth2(){
// 创建用户 并传到network里
network.agentCookies.put("authKey", agentAuth2);
System.out.println("用户AUTH_KEY:"+ agentAuth2);
}
//访客A(志勇)授权,代理人指定中奖用户,ID:107
......
package com.kjj.cases.assistant.pay;
import static com.kjj.config.BasicConfig.*;
import static com.kjj.utils.BaseUtils.tku1;
import static com.kjj.utils.BaseUtils.updateTypeOrDate;
import static com.kjj.utils.BaseUtils.*;
import static com.kjj.utils.ThreadSleepUtils.sleep;
import com.kjj.cases.admin.Authorization;
......
......@@ -12,6 +12,9 @@ public class ConnectLive implements Authorization {
agentAuth();
connectSuccess();
agentAuth2();
connectSuccess();
visitorAuth1();
connectSuccess();
......@@ -23,6 +26,5 @@ public class ConnectLive implements Authorization {
visitorAuth9();
connectSuccess();
}
}
......@@ -66,6 +66,9 @@ public class LiveBinding implements Authorization {
agentAuth1();
binding(this.shareSign);;
agentAuth2();
binding(this.shareSign);;
}
@Test(description = "代理人A分享直播间", priority = 2)
......
......@@ -23,6 +23,7 @@ import org.testng.annotations.Test;
import java.util.*;
import static com.kjj.utils.BaseUtils.deleteTestUser;
import static com.kjj.utils.BaseUtils.ssoLogin;
public class SaveLive implements Authorization {
......@@ -36,7 +37,8 @@ public class SaveLive implements Authorization {
@BeforeClass
public void setUp() {
ssoLogin(); }
ssoLogin();
}
/**
* 创建直播
......
......@@ -19,9 +19,6 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import static com.kjj.config.BasicConfig.MOBILE_allLottery;
import static com.kjj.config.BasicConfig.agentAuth;
public class ConfSecondKill implements Authorization {
private final long companyId = 101;
......
......@@ -36,10 +36,12 @@ public class SecondKill implements Authorization {
@BeforeClass
public void setUp(){
BaseUtils.ssoLogin();
//假用户到场
//到场
visitorAuto1();
connectSuccess();
deleteTestUser(5287);
agentAuth2();
connectSuccess();
}
/**
......@@ -597,7 +599,7 @@ public class SecondKill implements Authorization {
@Test(description = "代理人成功下单-占用库存", priority = 29)
public void 代理人成功下单() {
agentAuth();
agentAuth2();
// 下单
Map<String, Object> orderPar = new HashMap<>();
orderPar.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
......@@ -1156,11 +1158,6 @@ public class SecondKill implements Authorization {
}
}
@AfterClass
public void Tear(){
insertTestUser(5287);
}
}
......@@ -18,7 +18,9 @@ public class BasicConfig {
// 直播代理人 (艳玲)ID:826
public static String AUTH_KEY ="LEH7epeHVDJWzhZ6DiexTHnfZVkhkqorGGQahRCuzyKj3hQkSYMpkYma5RmZHQAbv8fiPzFX5BgoJgjF2gUVz175wz3dY";
// 直播代理人 (陈家梦)ID:210
public static String agentAuth ="LEH7epeHVDJWzhZ6DiexTHnserXQHEH2m81qW19iFaHnxksF9ujtq2D5q2yNrSJvXtWdBXjNTVa2KvbDj4Mpbs2Kc3LUf";
public static String agentAuth1 ="LEH7epeHVDJWzhZ6DiexTHnserXQHEH2m81qW19iFaHnxksF9ujtq2D5q2yNrSJvXtWdBXjNTVa2KvbDj4Mpbs2Kc3LUf";
// 直播代理人 (陈正茜)ID:282
public static String agentAuth2 ="LEH7epeHVDJWzhZ6DiexTHnseov3LSnFErGisxDcRejf1z9JQuHY2DztyaR9QD8XYk53YCfMVvVtFuLXmQzmESFUqDJW8";
//直播访客 (随波逐流)ID:343
public static String visitorAuth="LEH7epeHVDJWzhZ6DiexTHnserXQHEuKCxVgdZuBLF7iVyUDgnmQWGD8hwPhJQr1XHoGAvgv1ufg9N11YubEfdG3K7cC7";
//直播访客 (Porco)ID:101
......
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