Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature-request] Add support for creating single html report for multiple xml reports #3

Open
or-shachar opened this issue Jan 4, 2023 · 4 comments · May be fixed by #4
Open

[feature-request] Add support for creating single html report for multiple xml reports #3

or-shachar opened this issue Jan 4, 2023 · 4 comments · May be fixed by #4

Comments

@or-shachar
Copy link

  • 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
Copy link
Collaborator

alexec commented Jan 5, 2023

Yes. Would it be something like?

junit2html < *.xml > test-report.html

@or-shachar
Copy link
Author

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
Copy link
Author

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
Copy link
Author

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...

@or-shachar or-shachar linked a pull request Jan 5, 2023 that will close this issue
psturc added a commit to psturc/junit2html that referenced this issue Nov 9, 2023
fix: add test results with status "error"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants