Commit 3871941c by wff66504

解决冲突

parent a8444c18
...@@ -31,12 +31,12 @@ import org.testng.annotations.BeforeClass; ...@@ -31,12 +31,12 @@ import org.testng.annotations.BeforeClass;
import org.testng.annotations.Listeners; import org.testng.annotations.Listeners;
import org.testng.annotations.Test; import org.testng.annotations.Test;
@Listeners({ SkipIInvokedMethodListener.class,MyTestListener.class})// //@Listeners({ SkipIInvokedMethodListener.class,MyTestListener.class})//
public class APITest_tk extends BasicsGM{ public class APITest_tk extends BasicsGM{
@Test(dataProvider = "renmai", dataProviderClass = offcn_api_testData.class) @Test(dataProvider = "renmai", dataProviderClass = offcn_api_testData.class)
public void f(HashMap<String, Object> data) { public void f(HashMap<String, Object> data) {
System.gc();
Log.logInfo(data.get("serviceUrl").toString() + data.get("Description").toString() + " is running......"); Log.logInfo(data.get("serviceUrl").toString() + data.get("Description").toString() + " is running......");
Reflect_api Reflect=new Reflect_api(); Reflect_api Reflect=new Reflect_api();
...@@ -53,21 +53,21 @@ public class APITest_tk extends BasicsGM{ ...@@ -53,21 +53,21 @@ public class APITest_tk extends BasicsGM{
data=setPublicParameter(c,object,data);//静态公共参数 data=setPublicParameter(c,object,data);//静态公共参数
data=setDynamicParameter(c,object,data);//动态公共参数 data=setDynamicParameter(c,object,data);//动态公共参数
//
String parameter = MapUtil.getValue("parameter", data); String parameter = MapUtil.getValue("parameter", data);
Long startTime=System.currentTimeMillis(); Long startTime=System.currentTimeMillis();
Response re = obj.SendRequest(data, data.get("serviceUrl").toString(), data.get("Request").toString()); Response re = obj.SendRequest(data, data.get("serviceUrl").toString(), data.get("Request").toString());
Long endTime=System.currentTimeMillis(); Long endTime=System.currentTimeMillis();
String time=(endTime-startTime)+"毫秒"; String time=(endTime-startTime)+"毫秒";
String body=re.asString(); String body="";
String codeORerrcode=""; String codeORerrcode="";
String msgORerrmsy=""; String msgORerrmsy="";
String result = ""; String result = "";
if(re!=null){ if(re!=null){
body=re.asString(); body=re.asString();
if(body.contains("<html>")){ if(body.contains("<html")){
body="返回html页面,状态码:"+re.getStatusCode(); body="返回html页面,状态码:"+re.getStatusCode();
if(body.contains("<title>")){ if(body.contains("<title>")){
int Alength="<title>".length(); int Alength="<title>".length();
...@@ -92,21 +92,21 @@ public class APITest_tk extends BasicsGM{ ...@@ -92,21 +92,21 @@ public class APITest_tk extends BasicsGM{
//数据回写 //数据回写
HashMap<String, Object> ExpectResult=MapUtil.Expect(data); // HashMap<String, Object> ExpectResult=MapUtil.Expect(data);
SheetUtils sheet = new SheetUtils("DataAll.xls", "Output"); // SheetUtils sheet = new SheetUtils("DataAll.xls", "Output");
sheet.writeExcel( // sheet.writeExcel(
data.get("NO").toString(), // data.get("NO").toString(),
data.get("TCNO").toString() + "_Step" + data.get("Step").toString(), // data.get("TCNO").toString() + "_Step" + data.get("Step").toString(),
data.get("Description").toString(), // data.get("Description").toString(),
parameter.length()>1000?"内容超长。":parameter, // parameter.length()>1000?"内容超长。":parameter,
JSONObject.fromObject(ExpectResult).toString(), // JSONObject.fromObject(ExpectResult).toString(),
StringUtils.decodeUnicode(re.asString().length()>10000?"内容超长。状态码:"+re.getStatusCode():re.asString()), // StringUtils.decodeUnicode(re.asString().length()>10000?"内容超长。状态码:"+re.getStatusCode():re.asString()),
codeORerrcode, // codeORerrcode,
msgORerrmsy, // msgORerrmsy,
result, // result,
time // time
); // );
//
if(result.indexOf("Fail")!=-1){ if(result.indexOf("Fail")!=-1){
String Expect1=data.get("code")==null?"":data.get("code").toString(); String Expect1=data.get("code")==null?"":data.get("code").toString();
......
...@@ -49,22 +49,40 @@ ...@@ -49,22 +49,40 @@
<sqlpwd>ufNie8h9ywWCfewcXqyOQsaDf8TEJH</sqlpwd> <sqlpwd>ufNie8h9ywWCfewcXqyOQsaDf8TEJH</sqlpwd>
</system> </system>
<system name="tknewApp"><!-- 题库新接口 --> <system name="htym"> <!--题库http://test.tiku.eoffcn.com -->
<access_token_uri>http://106.75.5.205:8082/uaa/oauth/token</access_token_uri> <access_token_uri>http://106.75.5.205:8082/uaa/oauth/token</access_token_uri>
<client_id>bestbuy-acceptance</client_id> <client_id>bestbuy-acceptance</client_id>
<client_secret>bestbuy-acceptance</client_secret> <client_secret>bestbuy-acceptance</client_secret>
<grant_type>client_credentials</grant_type> <grant_type>client_credentials</grant_type>
<isProduct>false</isProduct> <isProduct>false</isProduct>
<RM_URI>http://tiku.t.eoffcn.com</RM_URI> <RM_URI>http://zgadmin.test.eoffcn.com</RM_URI>
<RM_port></RM_port> <RM_port></RM_port>
<RM_basePath></RM_basePath> <RM_basePath></RM_basePath>
<redis_URI>10.10.229.48</redis_URI> <redis_URI>10.10.229.48</redis_URI>
<redis_db_index>5</redis_db_index> <redis_db_index>5</redis_db_index>
<sqlurl>jdbc:mysql://39.105.124.219:3312/tiku?useUnicode=true&amp;characterEncoding=UTF-8&amp;zeroDateTimeBehavior=convertToNull</sqlurl> <sqlurl>jdbc:mysql://rm-2zevlk47ul0ovuci80o.mysql.rds.aliyuncs.com:3306/tiku?useUnicode=true&amp;characterEncoding=UTF-8&amp;zeroDateTimeBehavior=convertToNull</sqlurl>
<sqlname>testTest</sqlname> <sqlname>pre_tiku</sqlname>
<sqlpwd>7b467efW#$%f5c50aa3d</sqlpwd> <sqlpwd>ufNie8h9ywWCfewcXqyOQsaDf8TEJH</sqlpwd>
</system> </system>
<system name="ht"><!-- 后台 -->
<access_token_uri>http://106.75.5.205:8082/uaa/oauth/token</access_token_uri>
<client_id>bestbuy-acceptance</client_id>
<client_secret>bestbuy-acceptance</client_secret>
<grant_type>client_credentials</grant_type>
<isProduct>false</isProduct>
<RM_URI>http://tiku-admin.t.eoffcn.com</RM_URI>
<RM_port></RM_port>
<RM_basePath></RM_basePath>
<redis_URI>10.10.229.48</redis_URI>
<redis_db_index>5</redis_db_index>
<sqlurl>jdbc:mysql://39.105.124.219:3312/nwn?useUnicode=true&amp;characterEncoding=UTF-8&amp;zeroDateTimeBehavior=convertToNull</sqlurl>
<sqlname>nwnBeta</sqlname>
<sqlpwd>Beta@&amp;123</sqlpwd>
</system>
<system name="nwn"><!-- nwn --> <system name="nwn"><!-- nwn -->
<access_token_uri>http://106.75.5.205:8082/uaa/oauth/token</access_token_uri> <access_token_uri>http://106.75.5.205:8082/uaa/oauth/token</access_token_uri>
<client_id>bestbuy-acceptance</client_id> <client_id>bestbuy-acceptance</client_id>
...@@ -115,4 +133,4 @@ ...@@ -115,4 +133,4 @@
</systems> </systems>
\ No newline at end of file
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