jerrychu / unittestparser Goto Github PK
View Code? Open in Web Editor NEW单元测试数据解析脚本&工具,快速解析单元测试执行概况及各种维度的代码覆盖率。
License: MIT License
单元测试数据解析脚本&工具,快速解析单元测试执行概况及各种维度的代码覆盖率。
License: MIT License
如题,diffParser.rb
会统计每个改动文件,但是往往开发关注的只是代码相关的改动。比如iOS开发,只需要关注与 '.m' 、'.mm'、'.swift' 格式。
macOS Catalina:10.15.3
xcode:11.4.1
python:Python 2.7.15
------------------------终端返回信息---------------------
Traceback (most recent call last):
5: from /Users/mac126/Desktop/WhaleUnitTestDemo/TestScript/unitTestInfo.rb:134:in <main>' 4: from /Users/mac126/Desktop/WhaleUnitTestDemo/TestScript/unitTestInfo.rb:47:in
parse_xcresult'
3: from /Users/mac126/Desktop/WhaleUnitTestDemo/TestScript/unitTestInfo.rb:103:in generate_summary_object' 2: from /Users/mac126/Desktop/WhaleUnitTestDemo/TestScript/unitTestInfo.rb:103:in
each'
1: from /Users/mac126/Desktop/WhaleUnitTestDemo/TestScript/unitTestInfo.rb:106:in block in generate_summary_object' /Users/mac126/Desktop/WhaleUnitTestDemo/TestScript/unitTestInfo.rb:106:in
+': nil can't be coerced into Float (TypeError)
------------------------分割线---------------------------
以上应该是警告之类的,因为后面的命令行还能进行,并且能正常输出test-coverage-result.html
targetCoverage.rb有同样的情况,这个有什么方法能改善吗?还是说我Python或者其他什么工具环境版本不对???
在单次测试执行中,可以在显示包内容中看到.txt的命令行日志文件,但是测试执行完之后里面的没了,请问怎么解析出对应的日志文件呢
1820141.diff信息如下
diff --git a/Example/GZCodeCoverageKit/Source/TestSwift.swift b/Example/GZCodeCoverageKit/Source/TestSwift.swift
index 15e3a65..2f1d445 100644
--- a/Example/GZCodeCoverageKit/Source/TestSwift.swift
+++ b/Example/GZCodeCoverageKit/Source/TestSwift.swift
@@ -23,3 +22,0 @@ class TestSwift {
- print("hello, i`m test22 嘻嘻嘻")
- print("hello, i`m test22 嘻嘻嘻")
- print("hello, i`m test22 嘻嘻嘻")
但是执行 ruby GitdiffUtils/utils/diffParser.rb --diff-file=1820141.diff 结果如下
{"Example/GZCodeCoverageKit/Source/TestSwift.swift"=>[]}
里面的修改信息为空
辛苦大佬帮忙看下
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.