Commit 70df5581 authored by 马博's avatar 马博

update

parent 160402d8
......@@ -8,9 +8,11 @@ import org.apache.http.client.params.ClientPNames;
import org.apache.http.params.CoreConnectionPNames;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.testng.annotations.Test;
import java.util.Calendar;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import static io.restassured.RestAssured.given;
......@@ -21,6 +23,7 @@ import static io.restassured.RestAssured.given;
public class Postman {
static String dingdingUrl="https://shark.dui88.com/test/integration";
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/";
private static Logger logger = LogManager.getLogger(Postman.class);
public static void send2Dingding(Map result){
......@@ -48,6 +51,11 @@ public class Postman {
Response response=given().contentType(ContentType.JSON).body(result).post(testPlatformUrl);
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(){
Calendar c = Calendar.getInstance();
Date date = new Date();
......@@ -58,4 +66,10 @@ public class Postman {
if(week_num%2==0)return true;
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{
e.printStackTrace();
}
map.put("failCase",failCase);
// logger.in fo("gson.toJson(ddResult)~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
System.out.println("测试结果通知信息:"+gson.toJson(map));
//发送运行结果到自动化数据收集平台
if(sendPlatform)
......@@ -84,7 +83,6 @@ public class TestReport implements IReporter{
if(!noticePerson){
map.put("names",new ArrayList<>());
}
// logger.info("noticeDD:"+noticeDD);
Postman.send2Dingding(map);
}
......
......@@ -22,8 +22,10 @@ import ui.common.WebDriverType;
import java.io.File;
import java.io.IOException;
import java.sql.SQLException;
import java.util.Calendar;
import java.util.Date;
import java.util.Map;
import static com.codeborne.selenide.Condition.text;
import static com.codeborne.selenide.Selenide.$;
......@@ -62,13 +64,9 @@ public class test extends DuibaBaseUi {
}
@Test
public void test1(){
open("https://www.biying.com");
Reporter.log("rererfddfdfdfdfdfdf");
Reporter.log("rererfddfdfdfdfdfdf");
Reporter.log("rererfddfdfdfdfdfdf");
Reporter.log("rererfddfdfdfdfdfdf");
Reporter.log("rererfddfdfdfdfdfdf");
public void test1() throws SQLException {
Map<String,Object> map = jdbc.findSimpleResult("select * from act_com_conf.tb_bet_group_relation where bet_id = 1232");
}
@Test
......
......@@ -24,7 +24,7 @@ trade.host = activity.m.duibatest.com.cn
//\u6570\u636E\u5E93\u914D\u7F6E
db.name = duiba_test
db.password= svbP3KUw2PurAnBb2rbs3vohF
db.url = jdbc:mysql://rdswy2b9wy53044250u1o.mysql.rds.aliyuncs.com:3306/?tinyInt1isBit=false
db.url = jdbc:mysql://47.97.127.67:13001/?tinyInt1isBit=false
db.driver= com.mysql.cj.jdbc.Driver
db.maxtotal = 6
......
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