Are you sure you want to delete this task? Once this task is deleted, it cannot be recovered.
janney e19cb5c2ed | 1 year ago | |
---|---|---|
.gitignore | 1 year ago | |
README.md | 1 year ago | |
TestDemo1.java | 1 year ago | |
report.html | 1 year ago | |
template | 1 year ago | |
ztest.png | 1 year ago |
ztest是一个测试报告,报告清晰简单,有饼图,汇总,运行详情。有兴趣的可以下载试用!
将报告的json数据替换template文件中的
${resultData}
即可。
${resultData}
。比如:Gson gson = new GsonBuilder().disableHtmlEscaping().create();
String template = FileUtil.read(templatePath);
template = template.replaceFirst("\\$\\{resultData\\}", gson.toJson(result));
output.write(template);
{
"testPass": 1,
"testResult": [
{
"className": "com.test.testcase.TestDemo1",
"methodName": "testDemo",
"description": "测试DEMO",
"spendTime": "11ms",
"status": "成功",
"log": [
"this is demo!"
]
}
],
"testName": "20171109132744897",
"testAll": 1,
"testFail": 0,
"beginTime": "2017-11-09 13:27:44.917",
"totalTime": "11ms",
"testSkip": 0
}
请参考ztest中的TestDemo1.java ZTestReport.java
感谢mock哥提供的python unittest实现部分,使用python unittest的同学可以无缝对接该报告!
mock哥git地址:mock哥git地址
junit5版本git地址:https://github.com/shenyanf/junitHtmlReport
Dear OpenI User
Thank you for your continuous support to the Openl Qizhi Community AI Collaboration Platform. In order to protect your usage rights and ensure network security, we updated the Openl Qizhi Community AI Collaboration Platform Usage Agreement in January 2024. The updated agreement specifies that users are prohibited from using intranet penetration tools. After you click "Agree and continue", you can continue to use our services. Thank you for your cooperation and understanding.
For more agreement content, please refer to the《Openl Qizhi Community AI Collaboration Platform Usage Agreement》