Commit 6cdc58d0 authored by 龚小红's avatar 龚小红

1.增加销售工作台的测试配置文件

2.增加管理后台的权限管理部分
parent efff1a87
...@@ -10,6 +10,12 @@ ...@@ -10,6 +10,12 @@
</classes> </classes>
</test> </test>
<test preserve-order="true" name="配置秒杀轮次及秒杀预告">
<classes>
<class name="com.kjj.cases.live.secondKill.ConfSecondKill"/>
</classes>
</test>
<test preserve-order="true" name="绑定关系绑定"> <test preserve-order="true" name="绑定关系绑定">
<classes> <classes>
<class name="com.kjj.cases.live.liveConfig.LiveBinding"/> <class name="com.kjj.cases.live.liveConfig.LiveBinding"/>
...@@ -21,23 +27,16 @@ ...@@ -21,23 +27,16 @@
<class name="com.kjj.cases.live.anchor.OpenLive"/> <class name="com.kjj.cases.live.anchor.OpenLive"/>
</classes> </classes>
</test> </test>
<!-- 仅用于自测-->
<test preserve-order="true" name="访客签到"> <test preserve-order="true" name="秒杀到场">
<classes> <classes>
<class name="com.kjj.cases.live.lotteryCode.SignIn"/> <class name="com.kjj.cases.live.liveConfig.ConnectLive"/>
</classes> </classes>
</test> </test>
<!-- 仅用于自测 --> <test preserve-order="true" name="秒杀互动">
<!-- <test preserve-order="true" name="秒杀到场">-->
<!-- <classes>-->
<!-- <class name="com.kjj.cases.live.liveConfig.ConnectLive"/>-->
<!-- </classes>-->
<!-- </test>-->
<test preserve-order="true" name="红包领取">
<classes> <classes>
<class name="com.kjj.cases.live.red.LiveVistorRed"/> <class name="com.kjj.cases.live.secondKill.SecondKill"/>
</classes> </classes>
</test> </test>
......
...@@ -34,6 +34,11 @@ public interface Authorization { ...@@ -34,6 +34,11 @@ public interface Authorization {
network.agentCookies.put(officeCookieKey,officeCookieValue); network.agentCookies.put(officeCookieKey,officeCookieValue);
} }
//oto后台销售
default void otosellerAuth() {
network.agentCookies.put(otoCookieKey, otoCookieValue);
}
/** /**
* 集客助手相关授权 * 集客助手相关授权
......
This diff is collapsed.
...@@ -1288,21 +1288,32 @@ public class BasicConfig { ...@@ -1288,21 +1288,32 @@ public class BasicConfig {
//OTO销售工作台 //OTO销售工作台
public static final String MANAGER_oto_saveTag = MANAGER_HOST + "/kjy/manager/oto/tag/save"; public static final String MANAGER_oto_saveTag = MANAGER_HOST + "/kjy/manager/oto/tag/save";
public static final String MANAGER_oto_updateTag = MANAGER_HOST + "/kjy/manager/oto/tag/update"; public static final String MANAGER_oto_updateTag = MANAGER_HOST + "/kjy/manager/oto/tag/update";
public static final String MANAGER_oto_deleteTag = MANAGER_HOST +"/kjy/manager/oto/tag/delete";
public static final String MANAGER_oto_tagList = MANAGER_HOST + "/kjy/manager/oto/tag/list"; public static final String MANAGER_oto_tagList = MANAGER_HOST + "/kjy/manager/oto/tag/list";
public static final String MANAGER_oto_switchStatus = MANAGER_HOST + "/kjy/manager/oto/tag/switchStatus"; public static final String MANAGER_oto_switchStatus = MANAGER_HOST + "/kjy/manager/oto/tag/switchStatus";
public static final String MANAGER_oto_sellerList = MANAGER_HOST + "/kjy/manager/oto/seller/list";
public static final String MANAGER_oto_updateSeller = MANAGER_HOST + "/kjy/manager/oto/seller/update";
public static final String MANAGER_oto_customerList = MANAGER_HOST +"/kjy/manager/pub/form/customer/list/v2";
public static final String MANAGER_oto_assignSeller = MANAGER_HOST +"/kjy/manager/pub/form/customer/assignSeller";
public static final String MANAGER_oto_switchSellerStatus = MANAGER_HOST +"/kjy/manager/oto/seller/switchSellerStatus";
public static final String MANAGER_oto_switchCallPermissio = MANAGER_HOST +"/kjy/manager/oto/seller/switchCallPermission";
public static final String MANAGER_oto_searchSeller = MANAGER_HOST +"/kjy/manager/pub/form/customer/searchSeller";
public static final String MANAGER_oto_customerPhone = MANAGER_HOST +"/kjy/manager/pub/form/customer/customerPhone";
public static final String MANAGER_oto_qaDetail = MANAGER_HOST +"/kjy/manager/pub/form/customer/qaDetail";
public static final String MANAGER_oto_channelList = MANAGER_HOST +"/kjy/manager/pub/form/channelList";
public static final String WORK_getCaptcha = WORK_HOST + "/kjy/oto/manager/auth/captcha"; public static final String WORK_getCaptcha = WORK_HOST + "/kjy/oto/manager/auth/captcha";
public static final String WORK_login = WORK_HOST + "/kjy/oto/manager/auth/login"; public static final String WORK_login = WORK_HOST + "/kjy/oto/manager/auth/login";
public static final String WORK_userInfo = WORK_HOST + "/kjy/oto/manager/auth/userInfo"; public static final String WORK_userInfo = WORK_HOST + "/kjy/oto/manager/auth/userInfo";
public static final String FORM_submit = FORM_HOST + "/kjy/live/pub/form/user/submit"; public static final String FORM_submit = FORM_HOST + "/kjy/live/pub/form/user/submit";
public static final String FORM_submitQuestion = FORM_HOST + "/kjy/live/pub/form/question/submit";
public static final String WORK_staticHeader = WORK_HOST + "/kjy/oto/manager/customer/statistic/header"; public static final String WORK_staticHeader = WORK_HOST + "/kjy/oto/manager/customer/statistic/header";
public static final String WORK_staticChart = WORK_HOST + "/kjy/oto/manager/customer/statistic/chart"; public static final String WORK_staticChart = WORK_HOST + "/kjy/oto/manager/customer/statistic/chart";
public static final String WORK_notifyList = WORK_HOST + "/kjy/oto/manager/customer/notify/list"; public static final String WORK_notifyList = WORK_HOST + "/kjy/oto/manager/customer/notify/list";
public static final String MANAGER_oto_customerList = MANAGER_HOST +"/kjy/manager/pub/form/customer/list/v2";
public static final String MANAGER_oto_assignSeller = MANAGER_HOST +"/kjy/manager/pub/form/customer/assignSeller";
public static final String WORK_tagList = WORK_HOST + "/kjy/oto/manager/tag/list"; public static final String WORK_tagList = WORK_HOST + "/kjy/oto/manager/tag/list";
public static final String WORK_customerList = WORK_HOST + "/kjy/oto/manager/customer/list"; public static final String WORK_customerList = WORK_HOST + "/kjy/oto/manager/customer/list";
public static final String WORK_phone = WORK_HOST + "/kjy/oto/manager/customer/phoneNum"; public static final String WORK_phone = WORK_HOST + "/kjy/oto/manager/customer/phoneNum";
public static final String WORK_info = WORK_HOST + "kjy/oto/manager/customer/visit/info"; public static final String WORK_info = WORK_HOST + "/kjy/oto/manager/customer/visit/info";
public static final String WORK_header = WORK_HOST + "/kjy/oto/manager/customer/header"; public static final String WORK_header = WORK_HOST + "/kjy/oto/manager/customer/header";
public static final String WORK_detail = WORK_HOST + "/kjy/oto/manager/customer/detail"; public static final String WORK_detail = WORK_HOST + "/kjy/oto/manager/customer/detail";
public static final String WORK_showFeedback = WORK_HOST + "/kjy/oto/manager/customer/call/showFeedback"; public static final String WORK_showFeedback = WORK_HOST + "/kjy/oto/manager/customer/call/showFeedback";
...@@ -1317,4 +1328,11 @@ public class BasicConfig { ...@@ -1317,4 +1328,11 @@ public class BasicConfig {
public static final String WORK_feedback = WORK_HOST + "/kjy/oto/manager/customer/feedback"; public static final String WORK_feedback = WORK_HOST + "/kjy/oto/manager/customer/feedback";
public static final String WORK_edit = WORK_HOST + "/kjy/oto/manager/customer/edit"; public static final String WORK_edit = WORK_HOST + "/kjy/oto/manager/customer/edit";
public static final String WORK_operation = WORK_HOST + "/kjy/oto/manager/customer/log/operation"; public static final String WORK_operation = WORK_HOST + "/kjy/oto/manager/customer/log/operation";
public static final String WORK_fuzzyCustName= WORK_HOST + "/kjy/oto/manager/customer/fuzzy/custName";
public static final String WORK_call= WORK_HOST + "/kjy/oto/manager/customer/call";
public static final String WORK_logout= WORK_HOST + "/kjy/oto/manager/auth/logout";
public static final String WORK_verifyCodet = WORK_HOST + "/kjy/oto/auto/test/verifyCode";
public static final String WORK_delCust = WORK_HOST + "/kjy/oto/auto/test/delCust";
} }
...@@ -398,22 +398,22 @@ public class BaseUtils { ...@@ -398,22 +398,22 @@ public class BaseUtils {
ThreadSleepUtils.sleep(2000); ThreadSleepUtils.sleep(2000);
// 调用登录接口 // 调用登录接口
Map<String, Object> params = new HashMap<String, Object>(); Map<String, Object> params = new HashMap<String, Object>();
params.put("phone","15136361308"); params.put("phoneNumber","15136361301");
Response response = network.getResponse(params,BasicConfig.WORK_getCaptcha); Response response = network.getResponse(params,BasicConfig.WORK_getCaptcha);
boolean data = response.jsonPath().getBoolean("data"); boolean data = response.jsonPath().getBoolean("data");
Assert.assertTrue(data,network.message(params,BasicConfig.WORK_getCaptcha,"获取验证码失败",response.body().asString())); Assert.assertTrue(data,network.message(params,BasicConfig.WORK_getCaptcha,"获取验证码失败",response.body().asString()));
//专用于自动化获取验证码 //专用于自动化获取验证码
params.clear(); params.clear();
params.put("phone","15136361301"); params.put("phoneNumber","15136361301");
Response autoTestRes = network.getResponse(params,BasicConfig.CORP_getCaptchaForAutoTest); Response autoTestRes = network.getResponse(params,BasicConfig.WORK_verifyCodet);
String captcha = autoTestRes.jsonPath().getString("data"); String captcha = autoTestRes.jsonPath().getString("data");
System.out.println(captcha); System.out.println(captcha);
//登录接口 //登录接口
ThreadSleepUtils.sleep(2000); ThreadSleepUtils.sleep(2000);
params.clear(); params.clear();
params.put("phone","15136361301"); params.put("phoneNumber","15136361301");
params.put("captcha",captcha); params.put("captcha",captcha);
Response loginRes = network.postResponse(params,BasicConfig.WORK_login); Response loginRes = network.postResponse(params,BasicConfig.WORK_login);
boolean success = loginRes.jsonPath().getBoolean("success"); boolean success = loginRes.jsonPath().getBoolean("success");
...@@ -425,6 +425,10 @@ public class BaseUtils { ...@@ -425,6 +425,10 @@ public class BaseUtils {
String[] cookieKeyValue = cookieStr.split("="); String[] cookieKeyValue = cookieStr.split("=");
otoCookieKey = cookieKeyValue[0]; otoCookieKey = cookieKeyValue[0];
otoCookieValue = cookieKeyValue[1]; otoCookieValue = cookieKeyValue[1];
// otoCookieKey = "otoToken";
// otoCookieValue = "64e83LYGbaXYX9EkHumCho2UkzpJdamKBUy1LxjAMokRCXzXUqz3GhwHVuafuX3XiGBeJtGTACHoTFEV33SyzV8W1RH5HE6pchoYaiHxhbB";
network.agentCookies.put(otoCookieKey,otoCookieValue); //存入cookies network.agentCookies.put(otoCookieKey,otoCookieValue); //存入cookies
System.out.println("销售Cookie中key:"+otoCookieKey+" ,values:"+otoCookieValue); System.out.println("销售Cookie中key:"+otoCookieKey+" ,values:"+otoCookieValue);
} }
......
...@@ -7,6 +7,8 @@ ...@@ -7,6 +7,8 @@
<suite-file path="wechatTestNG.xml"></suite-file> <suite-file path="wechatTestNG.xml"></suite-file>
<suite-file path="workTestNG.xml"></suite-file>
</suite-files> </suite-files>
<!-- 监听器--> <!-- 监听器-->
<listeners> <listeners>
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="保险OTO" verbose="1" thread-count="3">
<test preserve-order="true" name="销售管理">
<classes>
<class name="com.kjj.cases.otoseller.Manager"/>
</classes>
</test>
<test preserve-order="true" name="销售工作台">
<classes>
<class name="com.kjj.cases.otoseller.Work"/>
</classes>
</test>
</suite>
<!-- Suite -->
<!--
suite定义一个测试套件,可以设置是否使用多线程,可包含多个测试用例或者测试group
parallel = classes  每个测试用例class级别多线程
thread-count =3  线程数为5,可同时执行3个case
preserve-order = true   classes和methods按照配置中的顺序执行,false为乱序执行。(If you want the classes and methods listed in this file to be run in an unpredictible order, set the preserve-order attribute to false)
parameter 标签传递参数
-->
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