Commit be0a8962 authored by 马博's avatar 马博

update

parent 486e9366
......@@ -159,6 +159,12 @@
<artifactId>jsoup</artifactId>
<version>1.10.2</version>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.6</version>
</dependency>
</dependencies>
<build>
......@@ -207,6 +213,7 @@
<noticePerson>false</noticePerson>
<sendPlatform>false</sendPlatform>
<run>${run}</run>
<maxRetryCount>0</maxRetryCount>
</systemPropertyVariables>
</configuration>
......@@ -281,6 +288,7 @@
<properties>
<run>**/*_signTest.java</run>
<threadCount>1</threadCount>
<!--<maxRetryCount>0</maxRetryCount>-->
</properties>
<!--公司仓库地址-->
......
......@@ -22,7 +22,7 @@ public class Postman {
static String dingdingUrl="https://shark.dui88.com/test/integration";
static String testPlatformUrl = "http://101.37.27.82:8080/insert";
//dingdingUrl="http://www.json.cn/";
private Logger logger = LogManager.getLogger(Postman.class);
private static Logger logger = LogManager.getLogger(Postman.class);
public static void send2Dingding(Map result){
System.out.println("Dingding:"+result);
RestAssuredConfig config = RestAssured.config();
......@@ -31,20 +31,14 @@ public class Postman {
.setParam(CoreConnectionPNames.CONNECTION_TIMEOUT, 150000) // Remote host connection time
.setParam(CoreConnectionPNames.SO_TIMEOUT, 150000) ; // Remote host response time
Response response=given().relaxedHTTPSValidation().contentType(ContentType.JSON).body(result).post(dingdingUrl);
System.out.println("--------DingdingTest--------:");
response.prettyPrint();
System.out.println("--------DingdingTest1--------:");
logger.info("钉钉响应数据:"+response.asString());
Boolean bl = response.jsonPath().getString("success").equals("false");
if(bl){
String[] name = DingdingResult.name;
result.put("names",name);
response=given().contentType(ContentType.JSON).body(result).post(dingdingUrl);
System.out.println("--------DingdingTest2--------:");
response.prettyPrint();
System.out.println("--------DingdingTest2--------:");
logger.info("钉钉重试响应数据:"+response.asString());
}
......@@ -52,10 +46,7 @@ public class Postman {
public static void sendTestPlatform(Map result){
Response response=given().contentType(ContentType.JSON).body(result).post(testPlatformUrl);
System.out.println("--------testPlatform--------:");
response.prettyPrint();
System.out.println("--------testPlatform--------:");
logger.info("自动化数据收集平台响应数据:"+response.asString());
}
public static Boolean getName(){
Calendar c = Calendar.getInstance();
......
......@@ -8,8 +8,9 @@ import org.testng.ITestResult;
*/
public class RetryToRunCase implements IRetryAnalyzer {
private int retryCount = 0;
private int maxRetryCount = 0; // retry a failed test 2 additional times
private int maxRetryCount = Integer.valueOf(System.getProperty("maxRetryCount")); // retry a failed test 2 additional times
public boolean retry(ITestResult result) {
System.out.println("~~~~~~~~~~~~~~~~~maxRetryCount~~~~~~~~~~~~~~~~~~~~~~~:"+maxRetryCount);
if (retryCount <maxRetryCount) {
retryCount++;
return true;
......
......@@ -63,8 +63,8 @@ public class TestReport implements IReporter{
e.printStackTrace();
}
map.put("failCase",failCase);
logger.info("gson.toJson(ddResult)~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
logger.info("钉钉通知:"+gson.toJson(map));
// logger.in fo("gson.toJson(ddResult)~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
logger.info("测试结果通知信息:"+gson.toJson(map));
//发送运行结果到自动化数据收集平台
if(sendPlatform)
Postman.sendTestPlatform(map);
......@@ -73,7 +73,7 @@ public class TestReport implements IReporter{
if(!noticePerson){
map.put("names",new ArrayList<>());
}
logger.info("noticeDD:"+noticeDD);
// logger.info("noticeDD:"+noticeDD);
Postman.send2Dingding(map);
}
......
This diff is collapsed.
......@@ -164,7 +164,7 @@ public class Signin_signTest extends DuibaTestBase {
Assert.assertEquals(act,exp,"积分与预期不符");
//校验consumer和user表的积分
Thread.sleep(2000);
consumerCredits= jdbc.findSimpleResult("select * from consumer.consumer_0010 where id=100028002");
consumerCredits= jdbc.findSimpleResult("select * from new_consumer.consumer_0010 where id=100028002");
Map userCredits = jdbc.findSimpleResult("select * from dafuweng.user where id ="+uid);
Assert.assertEquals(consumerCredits.get("credits").toString().trim(),String.valueOf(exp),"consumer积分与预期不符");
Assert.assertEquals(userCredits.get("credits").toString().trim(),String.valueOf(exp),"user积分与预期不符");
......
This diff is collapsed.
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