Created
November 21, 2013 12:44
-
-
Save barend/7580960 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Processes Ant JUnit logging output into tab separated values. | |
# | |
# [junit] Running com.myapp.MyTest | |
# [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.721 sec | |
# | |
# Suite Num tests Num failed Num error Time (s) | |
# com.myapp.MyTest 2 0 0 0.721 | |
# | |
BEGIN { | |
testname="" | |
print "Suite\tNum tests\tNum failed\tNum error\tTime (s)" | |
} | |
/.*Running/{ | |
testname=$3 | |
} | |
/.*Tests run/{ | |
sub(/,/, "", $4) | |
sub(/,/, "", $6) | |
sub(/,/, "", $8) | |
print testname "\t" $4 "\t" $6 "\t" $8 "\t" $11 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment