Commit 198d1e3f authored by 钱雯君's avatar 钱雯君

Merge branch 'master' into qwj_181029

parents 968f75f4 0a36c39b
...@@ -8,9 +8,11 @@ import org.apache.http.client.params.ClientPNames; ...@@ -8,9 +8,11 @@ import org.apache.http.client.params.ClientPNames;
import org.apache.http.params.CoreConnectionPNames; import org.apache.http.params.CoreConnectionPNames;
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
import org.testng.annotations.Test;
import java.util.Calendar; import java.util.Calendar;
import java.util.Date; import java.util.Date;
import java.util.HashMap;
import java.util.Map; import java.util.Map;
import static io.restassured.RestAssured.given; import static io.restassured.RestAssured.given;
...@@ -21,6 +23,7 @@ import static io.restassured.RestAssured.given; ...@@ -21,6 +23,7 @@ import static io.restassured.RestAssured.given;
public class Postman { public class Postman {
static String dingdingUrl="https://shark.dui88.com/test/integration"; static String dingdingUrl="https://shark.dui88.com/test/integration";
static String testPlatformUrl = "http://101.37.27.82:8080/insert"; static String testPlatformUrl = "http://101.37.27.82:8080/insert";
static String miriaUrl = "http://miria-aliyun.duibatest.com.cn/autoTest/finish";
//dingdingUrl="http://www.json.cn/"; //dingdingUrl="http://www.json.cn/";
private static Logger logger = LogManager.getLogger(Postman.class); private static Logger logger = LogManager.getLogger(Postman.class);
public static void send2Dingding(Map result){ public static void send2Dingding(Map result){
...@@ -48,6 +51,11 @@ public class Postman { ...@@ -48,6 +51,11 @@ public class Postman {
Response response=given().contentType(ContentType.JSON).body(result).post(testPlatformUrl); Response response=given().contentType(ContentType.JSON).body(result).post(testPlatformUrl);
System.out.println("自动化数据收集平台响应数据:"+response.asString()); System.out.println("自动化数据收集平台响应数据:"+response.asString());
} }
public static void sendFinish(Map result){
Response response=given().params(result).get(miriaUrl);
System.out.println("miria响应结果:"+response.asString());
}
public static Boolean getName(){ public static Boolean getName(){
Calendar c = Calendar.getInstance(); Calendar c = Calendar.getInstance();
Date date = new Date(); Date date = new Date();
...@@ -58,4 +66,10 @@ public class Postman { ...@@ -58,4 +66,10 @@ public class Postman {
if(week_num%2==0)return true; if(week_num%2==0)return true;
else return false; else return false;
} }
public static void main(String[] args) {
Map<String,String> map = new HashMap<>();
map.put("jobName","duibaSign_interface");
sendFinish(map);
}
} }
...@@ -74,7 +74,6 @@ public class TestReport implements IReporter{ ...@@ -74,7 +74,6 @@ public class TestReport implements IReporter{
e.printStackTrace(); e.printStackTrace();
} }
map.put("failCase",failCase); map.put("failCase",failCase);
// logger.in fo("gson.toJson(ddResult)~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
System.out.println("测试结果通知信息:"+gson.toJson(map)); System.out.println("测试结果通知信息:"+gson.toJson(map));
//发送运行结果到自动化数据收集平台 //发送运行结果到自动化数据收集平台
if(sendPlatform) if(sendPlatform)
...@@ -84,7 +83,6 @@ public class TestReport implements IReporter{ ...@@ -84,7 +83,6 @@ public class TestReport implements IReporter{
if(!noticePerson){ if(!noticePerson){
map.put("names",new ArrayList<>()); map.put("names",new ArrayList<>());
} }
// logger.info("noticeDD:"+noticeDD);
Postman.send2Dingding(map); Postman.send2Dingding(map);
} }
......
...@@ -122,7 +122,7 @@ public class 集卡规则_中奖属性配置_DuibaTest extends DuibaTestBase { ...@@ -122,7 +122,7 @@ public class 集卡规则_中奖属性配置_DuibaTest extends DuibaTestBase {
//校验修改内容 //校验修改内容
Map<String,Object> selectResult = jdbc.findSimpleResult("select * from act_com_conf.tb_clcard_config where id =?",newId); Map<String,Object> selectResult = jdbc.findSimpleResult("select * from act_com_conf.tb_clcard_config where id =?",newId);
Assert.assertEquals(selectResult.get("deleted").toString(),"true","删除中奖条件失败"); Assert.assertEquals(selectResult.get("deleted").toString(),"1","删除中奖条件失败");
logger.info("校验删除属性配置成功"); logger.info("校验删除属性配置成功");
} }
......
...@@ -299,7 +299,7 @@ public class 集卡规则_中奖配置测试_DuibaTest extends DuibaTestBase { ...@@ -299,7 +299,7 @@ public class 集卡规则_中奖配置测试_DuibaTest extends DuibaTestBase {
//校验修改内容 //校验修改内容
Map<String,Object> selectResult = jdbc.findSimpleResult("select * from act_com_conf.tb_clcard_config where id =?",newId); Map<String,Object> selectResult = jdbc.findSimpleResult("select * from act_com_conf.tb_clcard_config where id =?",newId);
Assert.assertEquals(selectResult.get("deleted").toString(),"true","删除中奖条件失败"); Assert.assertEquals(selectResult.get("deleted").toString(),"1","删除中奖条件失败");
} }
......
...@@ -158,7 +158,7 @@ public class 集卡规则_助力规则配置测试_DuibaTest extends DuibaTestBa ...@@ -158,7 +158,7 @@ public class 集卡规则_助力规则配置测试_DuibaTest extends DuibaTestBa
//校验修改内容 //校验修改内容
Map<String,Object> selectResult = jdbc.findSimpleResult("select * from act_com_conf.tb_clcard_config_goods_rules where id =?",newGoodsRuleId); Map<String,Object> selectResult = jdbc.findSimpleResult("select * from act_com_conf.tb_clcard_config_goods_rules where id =?",newGoodsRuleId);
Assert.assertEquals(selectResult.get("deleted").toString(),"true","删除中奖条件失败"); Assert.assertEquals(selectResult.get("deleted").toString(),"1","删除中奖条件失败");
logger.info("删除集卡助力规则成功"); logger.info("删除集卡助力规则成功");
} }
......
...@@ -22,8 +22,10 @@ import ui.common.WebDriverType; ...@@ -22,8 +22,10 @@ import ui.common.WebDriverType;
import java.io.File; import java.io.File;
import java.io.IOException; import java.io.IOException;
import java.sql.SQLException;
import java.util.Calendar; import java.util.Calendar;
import java.util.Date; import java.util.Date;
import java.util.Map;
import static com.codeborne.selenide.Condition.text; import static com.codeborne.selenide.Condition.text;
import static com.codeborne.selenide.Selenide.$; import static com.codeborne.selenide.Selenide.$;
...@@ -62,13 +64,9 @@ public class test extends DuibaBaseUi { ...@@ -62,13 +64,9 @@ public class test extends DuibaBaseUi {
} }
@Test @Test
public void test1(){ public void test1() throws SQLException {
open("https://www.biying.com"); Map<String,Object> map = jdbc.findSimpleResult("select * from act_com_conf.tb_bet_group_relation where bet_id = 1232");
Reporter.log("rererfddfdfdfdfdfdf");
Reporter.log("rererfddfdfdfdfdfdf");
Reporter.log("rererfddfdfdfdfdfdf");
Reporter.log("rererfddfdfdfdfdfdf");
Reporter.log("rererfddfdfdfdfdfdf");
} }
@Test @Test
......
...@@ -28,43 +28,43 @@ db.url = jdbc:mysql://rdswy2b9wy53044250u1o.mysql.rds.aliyuncs.com:3306/?tinyInt ...@@ -28,43 +28,43 @@ db.url = jdbc:mysql://rdswy2b9wy53044250u1o.mysql.rds.aliyuncs.com:3306/?tinyInt
db.driver= com.mysql.cj.jdbc.Driver db.driver= com.mysql.cj.jdbc.Driver
db.maxtotal = 6 db.maxtotal = 6
//钉钉报告配置 //\u9489\u9489\u62A5\u544A\u914D\u7F6E
pluginTest.project=插件 pluginTest.project=\u63D2\u4EF6
pluginTest.names=zhaoran,qianwenjun pluginTest.names=zhaoran,qianwenjun
pluginTest.group=插件-接口自动化 pluginTest.group=\u63D2\u4EF6-\u63A5\u53E3\u81EA\u52A8\u5316
pluginTest.resultUrl=http://tst.deploy.dui88.com/view/duibaTest/job/duibaPlugin_interface/HTML_Report/suite1_test1_results.html pluginTest.resultUrl=http://tst.deploy.dui88.com/view/duibaTest/job/duibaPlugin_interface/HTML_Report/suite1_test1_results.html
signTest.project=签到 signTest.project=\u7B7E\u5230
signTest.names=zhousongbo signTest.names=zhousongbo
signTest.group=签到-接口自动化 signTest.group=\u7B7E\u5230-\u63A5\u53E3\u81EA\u52A8\u5316
signTest.resultUrl=http://tst.deploy.dui88.com/view/duibaTest/job/duibaSign_interface/HTML_Report/suite1_test1_results.html signTest.resultUrl=http://tst.deploy.dui88.com/view/duibaTest/job/duibaSign_interface/HTML_Report/suite1_test1_results.html
FloorTest.project=楼层 FloorTest.project=\u697C\u5C42
FloorTest.names=zhaoran,qianwenjun FloorTest.names=zhaoran,qianwenjun
FloorTest.group=楼层-接口自动化 FloorTest.group=\u697C\u5C42-\u63A5\u53E3\u81EA\u52A8\u5316
FloorTest.resultUrl=http://tst.deploy.dui88.com/view/duibaTest/job/duibaFloor_interface/HTML_Report/suite1_test1_results.html FloorTest.resultUrl=http://tst.deploy.dui88.com/view/duibaTest/job/duibaFloor_interface/HTML_Report/suite1_test1_results.html
DuibaTest.project=活动工具 DuibaTest.project=\u6D3B\u52A8\u5DE5\u5177
DuibaTest.names=zhaoran,qianwenjun DuibaTest.names=zhaoran,qianwenjun
DuibaTest.group=活动工具-接口自动化 DuibaTest.group=\u6D3B\u52A8\u5DE5\u5177-\u63A5\u53E3\u81EA\u52A8\u5316
DuibaTest.resultUrl=http://tst.deploy.dui88.com/view/duibaTest/job/duiba_interface/HTML_Report/suite1_test1_results.html DuibaTest.resultUrl=http://tst.deploy.dui88.com/view/duibaTest/job/duiba_interface/HTML_Report/suite1_test1_results.html
AccessTest.project=综合业务(单品抽奖/秒杀/游戏) AccessTest.project=\u7EFC\u5408\u4E1A\u52A1(\u5355\u54C1\u62BD\u5956/\u79D2\u6740/\u6E38\u620F)
AccessTest.names=zhaoran,qianwenjun AccessTest.names=zhaoran,qianwenjun
AccessTest.group=综合业务-接口自动化 AccessTest.group=\u7EFC\u5408\u4E1A\u52A1-\u63A5\u53E3\u81EA\u52A8\u5316
AccessTest.resultUrl=http://tst.deploy.dui88.com/view/duibaTest/job/duibaAccess_interface/HTML_Report/suite1_test1_results.html AccessTest.resultUrl=http://tst.deploy.dui88.com/view/duibaTest/job/duibaAccess_interface/HTML_Report/suite1_test1_results.html
JenkinsTest.project=综合业务(单品抽奖/秒杀/游戏) JenkinsTest.project=\u7EFC\u5408\u4E1A\u52A1(\u5355\u54C1\u62BD\u5956/\u79D2\u6740/\u6E38\u620F)
JenkinsTest.names=zhaoran,qianwenjun JenkinsTest.names=zhaoran,qianwenjun
JenkinsTest.group=综合业务-接口自动化 JenkinsTest.group=\u7EFC\u5408\u4E1A\u52A1-\u63A5\u53E3\u81EA\u52A8\u5316
JenkinsTest.resultUrl=http://tst.deploy.dui88.com/view/duibaTest/job/duibaAccess_interface/HTML_Report/suite1_test1_results.html JenkinsTest.resultUrl=http://tst.deploy.dui88.com/view/duibaTest/job/duibaAccess_interface/HTML_Report/suite1_test1_results.html
ExchangeTest.project=普兑业务 ExchangeTest.project=\u666E\u5151\u4E1A\u52A1
ExchangeTest.names=panyuli ExchangeTest.names=panyuli
ExchangeTest.group=普兑业务-接口自动化 ExchangeTest.group=\u666E\u5151\u4E1A\u52A1-\u63A5\u53E3\u81EA\u52A8\u5316
ExchangeTest.resultUrl=http://tst.deploy.dui88.com/view/duibaTest/job/duibaExchange_interface/HTML_Report/suite1_test1_results.html ExchangeTest.resultUrl=http://tst.deploy.dui88.com/view/duibaTest/job/duibaExchange_interface/HTML_Report/suite1_test1_results.html
SeckillTest.project=秒杀业务 SeckillTest.project=\u79D2\u6740\u4E1A\u52A1
SeckillTest.names=qianwenjun SeckillTest.names=qianwenjun
SeckillTest.group=秒杀业务-接口自动化 SeckillTest.group=\u79D2\u6740\u4E1A\u52A1-\u63A5\u53E3\u81EA\u52A8\u5316
SeckillTest.resultUrl=http://tst.deploy.dui88.com/view/duibaTest/job/Seckill_interface/HTML_Report/suite1_test1_results.html SeckillTest.resultUrl=http://tst.deploy.dui88.com/view/duibaTest/job/Seckill_interface/HTML_Report/suite1_test1_results.html
\ 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