Package de.oktoflow.platform.cmdTools
Class MavenTestTimeExtractor
java.lang.Object
de.oktoflow.platform.cmdTools.MavenTestTimeExtractor
Extracts Maven surefire test timings to CSV.
- Author:
- ChatGPT
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidExtracts maven surefire test times.private static voidprocess(Path inputFile, Path outputFile, Pattern pattern, Pattern skipPattern, Function<Matcher, String> elapsedTimeFn, Function<Matcher, String> testClassFn) Processes the input file to the output file.static voidAlternative execution point, for env logs.
-
Field Details
-
TEST_PATTERN
-
-
Constructor Details
-
MavenTestTimeExtractor
public MavenTestTimeExtractor()
-
-
Method Details
-
main
Extracts maven surefire test times.- Parameters:
args- the first file is the maven log file, the second the output CSV to be created
-
process
private static void process(Path inputFile, Path outputFile, Pattern pattern, Pattern skipPattern, Function<Matcher, String> elapsedTimeFn, Function<Matcher, String> testClassFn) Processes the input file to the output file.- Parameters:
inputFile- the input fileoutputFile- the output filepattern- the test output regexskipPattern- optional skip pattern, skip input lines until this pattern is found, may be nullelapsedTimeFn- a function that returns the elapsed time from a matching matchertestClassFn- a function that returns the test class name from a matching matcher
-
readTail
Alternative execution point, for env logs.- Parameters:
inputFile- the env log input fileoutputFile- the output file
-