[feature-request] Add support for creating single html report for multiple xml reports
or-shachar opened this issue · 4 comments
or-shachar commented
- Some frameworks like to generate multiple xml files. For instance - Ginkgo.
- As developers, it's easy to be referenced to a single html report.
- It would be nice to be able to read from multiple xml inputs and merge it into one report.
I can probably work on that on a fork and if you agree you can adopt it 🙏
alexec commented
Yes. Would it be something like?
junit2html < *.xml > test-report.html
or-shachar commented
Not sure how this can be read through STD.in It might require to switch to flag with comma delimited.
But I'll check if your way is feasible as it's more elegant.
or-shachar commented
Unfortunately writing the following project reveals that this usage will not work:
package main
import (
"bufio"
"fmt"
"os"
)
func main() {
scanner := bufio.NewScanner(os.Stdin)
for scanner.Scan() {
fmt.Println(scanner.Text())
}
}
Test file:
echo "aaaaa
aaaaa
aaaaa
aaaaa" > a.temp
echo "bbbb
bbbb
bbbb
bbbb" > b.temp
go run . < *.temp
bash just doesn't like the expression it will return:
$ bash test.sh
test.sh: line 12: *.temp: ambiguous redirect
zsh will work with the exression but there isn't any way to diffrentiate between the files:
$ zsh test.sh
aaaaa
aaaaa
aaaaa
aaaaa
bbbb
bbbb
bbbb
bbbb
or-shachar commented
I've prepared something that works with glob patterns...
I still want to clean it up so it won't have multiple for lines but would love to know what you think...