Commit cd6fd695 authored by 赵然's avatar 赵然

Merge branch 'master' into develop

parents 5e485e0a 4b227f11
......@@ -66,33 +66,6 @@ public class DingdingResult {
changes = changes+" 提交者:"+gitlabProjectMerges.getAuthor().getName()+" 描述:"+gitlabProjectMerges.getDescription();
/*从jenkins上获取项目变更
Map<String,String> resentChanges=BeTested.getChangesWithin(30,changeMap);
System.out.println(resentChanges);
if(resentChanges!=null&&resentChanges.size()>0){
List<String> changeList=new ArrayList<>();
for(Object key:resentChanges.keySet().toArray()){
//changeList.add(key+"-"+resentChanges.get(key));
if(changes!=null&&changes.length()>0){
changes=changes+","+key+"-"+resentChanges.get(key);
}else
changes=key+"-"+resentChanges.get(key);
}
//group=changeList.toArray();
//this.changes=changeList.toString();
}else {
if(changeMap==null){
this.changes="";
}else {
Set<String> keySet = changeMap.keySet();
this.changes = keySet.toArray()[0] + "-" + changeMap.get(keySet.toArray()[0]);
}
}
if(changes.length()>140){
changes=changes.substring(0,141)+"……";
}
*/
this.total=total;
this.passCount=passCount;
this.skipCount=skipCount;
......@@ -113,8 +86,10 @@ public class DingdingResult {
public Map<String,Object> getResult() throws UnsupportedEncodingException {
Map<String,Object> result=new HashMap<>();
Object[] mygroup = new Object[1];
mygroup[0]=getByRun(run,"group");
result.put("group",mygroup);
String[] mygroups = new String[1];
mygroups[0]=getByRun(run,"group");
System.out.println("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~group:"+mygroups[0]);
result.put("group",mygroups);
result.put("project",project);
result.put("total",this.total);
result.put("passCount",this.passCount);
......@@ -164,7 +139,14 @@ public class DingdingResult {
}
public String getByRun(String run,String type) throws UnsupportedEncodingException {
run = run.substring(run.indexOf("_")+1, run.indexOf("."));
System.out.println("before runs:"+run);
System.out.println("run+\".\"+type:"+run+"."+type);
if ((run+"."+type).equals("ui.group"))return "ui自动化测试";
run =this.env.getProperty(run+"."+type);
// System.out.println("(runs+\".\"+type):"+run+"."+type);
// System.out.println("runs:"+run);
System.out.println("run:"+run);
return new String(run.getBytes("ISO-8859-1"), "UTF-8");//ISO-8859-1
}
......
......@@ -24,7 +24,8 @@ public class 实物_Activity_ui extends DuibaBaseUi{
new Activity_egg_Page("立即领奖",this);
new TakePrizeNewPage("马上领取",this);
sleep(2);
sleep(10);
screenshot();
Assert.assertTrue(isExistByText("收货人:uitest  "),"出奖弹层校验失败");
......
......@@ -18,10 +18,13 @@ public class 首页插件_Plugin_ui extends DuibaBaseUi{
screenshot();
refresh();
sleep(2);
screenshot();
clickByClass("plugin-open");
clickByClass("plugin-img");
sleep(2);
screenshot();
Assert.assertTrue(isExistByText("ui自动化-优惠券(活动)"));
Assert.assertTrue(isExistByText("券码:"));
Assert.assertTrue(isExistByText("1111111"));
......
......@@ -10,9 +10,14 @@ public class Activity_egg_Page {
father.sleep(3);
father.clickByClass("egg");
father.sleep(2);
father.screenshot();
if(name!=null)father.clickByTextEqual(name);
if(name!=null){
father.clickByTextEqual(name);
father.screenshot();
}
}
}
......@@ -10,6 +10,8 @@ public class TakePrizeNewPage {
public TakePrizeNewPage(String name,DuibaBaseUi father) throws Exception {
father.sleep(2);
father.clickByTextEqual(name);
father.sleep(2);
father.screenshot();
father.clickByTextEqual("确定");
}
......
......@@ -75,3 +75,9 @@ SeckillTest.names=qianwenjun
SeckillTest.group=秒杀业务-接口自动化
SeckillTest.resultUrl=http://tst-idc.deploy.dui88.com/view/duibaTest/job/Seckill_interface/HTML_20Report/suite1_test1_results.html
SeckillTest.job=Seckill_interface
ui.project=界面自动化核心业务
ui.names=mabo
ui.group=自动化
ui.resultUrl=http://101.68.72.146:18080/job/duiba_ui/HTML_20Report/suite1_test1_results.html
ui.job=duiba_ui
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