提交 fd900b68 authored 作者: 孙洁清's avatar 孙洁清

路由规则

上级 c6c7234c
......@@ -12,5 +12,24 @@ import java.util.List;
@ApiModel(description = "网页内容测试类")
public class PageContentTest {
private String url;
/**
* 是否通过 0不成功 1成功
*/
private Integer success;
/**
* 响应时间
*/
private Integer responseTime;
/**
* 相关信息(未通过理由)
*/
private String message;
/**
* 截图的url
*/
private String screenshot;
private List<PageContent> contents;
}
......@@ -10,6 +10,7 @@ import com.zjty.autotest.pojo.test.Project;
import com.zjty.autotest.service.AsyncService;
import com.zjty.autotest.service.AutoResultSetService;
import com.zjty.autotest.service.TestReportService;
import com.zjty.autotest.util.FileHtmlUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.scheduling.annotation.Async;
......@@ -140,8 +141,40 @@ public class AsyncServiceImpl implements AsyncService {
if (testChannel.getCodeUrl() != null) {
//解压上传得代码
//获取前端代码中得网页路由地址
if (testChannel.getCodeUrl() != null) {
//解压上传得代码
FileHtmlUtil.getFiles(testChannel.getCodeUrl(), null);
Map<String, List<FileType>> alls = FileHtmlUtil.getAlls();
//获取项目类型
FileHtmlUtil.getFileRoutes(testChannel.getCodeUrl());
int jspcount=FileHtmlUtil.jspNum;
int jscount=FileHtmlUtil.jsNum;
int vuecount=FileHtmlUtil.vueNum;
int angularcount=FileHtmlUtil.angularNum;
int htmlcount=FileHtmlUtil.count;
String fileRoutes=null;
if(jspcount>0){
fileRoutes="jsp";
}else if(vuecount>0){
fileRoutes="vue";
}else if(jscount>0){
fileRoutes="react";
}else if(angularcount>0){
fileRoutes="angular";
}
if (fileRoutes != null) {
// List<String> routerList = getRouterList(alls, fileRoutes);
// List<String> collect = routerList.stream().map(String::toLowerCase).distinct().collect(Collectors.toList());
// System.out.println(collect.toString());
}
FileHtmlUtil.clearAll();
//获取前端代码中得网页路由地址
//比对黄承天代码中访问得地址和路由地址,黄承天是否访问全了。
}
//比对黄承天代码中访问得地址和路由地址,黄承天是否访问全了。
}
System.out.println("修改状态");
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论