Commit b4744afd authored by 马博's avatar 马博

changes

parent 8875e60e
...@@ -261,6 +261,12 @@ ...@@ -261,6 +261,12 @@
<artifactId>guava</artifactId> <artifactId>guava</artifactId>
<version>21.0</version> <version>21.0</version>
</dependency> </dependency>
<dependency>
<groupId>cn.com.duiba.tool</groupId>
<artifactId>java-gitlab-api</artifactId>
<version>1.3.8</version>
</dependency>
</dependencies> </dependencies>
<build> <build>
......
...@@ -52,6 +52,10 @@ public class DingdingResult { ...@@ -52,6 +52,10 @@ public class DingdingResult {
names.addAll(Arrays.asList(getNames)); names.addAll(Arrays.asList(getNames));
Map<String,String> params = new HashMap<>();
params.put("jobName",getJob());
changes = Postman.sendFindTestApp(params);
/*从jenkins上获取项目变更
Map<String,String> resentChanges=BeTested.getChangesWithin(30,changeMap); Map<String,String> resentChanges=BeTested.getChangesWithin(30,changeMap);
System.out.println(resentChanges); System.out.println(resentChanges);
if(resentChanges!=null&&resentChanges.size()>0){ if(resentChanges!=null&&resentChanges.size()>0){
...@@ -77,7 +81,7 @@ public class DingdingResult { ...@@ -77,7 +81,7 @@ public class DingdingResult {
if(changes.length()>140){ if(changes.length()>140){
changes=changes.substring(0,141)+"……"; changes=changes.substring(0,141)+"……";
} }
//project="tuia-media"; */
this.total=total; this.total=total;
this.passCount=passCount; this.passCount=passCount;
this.skipCount=skipCount; this.skipCount=skipCount;
......
...@@ -25,6 +25,7 @@ public class Postman { ...@@ -25,6 +25,7 @@ public class Postman {
final static String testPlatformUrl = "http://101.37.27.82:8080/insert"; final static String testPlatformUrl = "http://101.37.27.82:8080/insert";
final static String miriaUrl = "http://miria-aliyun.duibatest.com.cn/autoTest/finish"; final static String miriaUrl = "http://miria-aliyun.duibatest.com.cn/autoTest/finish";
final static String miriaUrlTesting = "http://miria-aliyun.duibatest.com.cn/autoTest/testing"; final static String miriaUrlTesting = "http://miria-aliyun.duibatest.com.cn/autoTest/testing";
final static String miriaUrlFindTestApp = "http://miria-aliyun.duibatest.com.cn/autoTest/findTestApp";
//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);
...@@ -67,6 +68,15 @@ public class Postman { ...@@ -67,6 +68,15 @@ public class Postman {
System.out.println("miriaUrl:"+miriaUrlTesting); System.out.println("miriaUrl:"+miriaUrlTesting);
System.out.println("miria响应结果:"+response.asString()); System.out.println("miria响应结果:"+response.asString());
} }
public static String sendFindTestApp(Map result){
Response response=given().params(result).get(miriaUrlFindTestApp);
System.out.println("jobName:"+result.get("jobName"));
System.out.println("miriaUrl:"+miriaUrlTesting);
System.out.println("miria响应结果:"+response.asString());
String value = response.jsonPath().getString("value");
return value;
}
public static Boolean getName(){ public static Boolean getName(){
Calendar c = Calendar.getInstance(); Calendar c = Calendar.getInstance();
Date date = new Date(); Date date = new Date();
......
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