-
Notifications
You must be signed in to change notification settings - Fork 472
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
Write test report artifacts directly #875
Comments
I like this as a suggestion. Marked as approved, anyone can submit a PR for this. To be completely honest, I probably won't get around to it myself for a while. |
I was about to ask for the same feature, that would be super helpful indeed. Alternatively to passing |
Would that print both out to stdout or write to two different files? |
🤔 I suspect it may be best to leave the Of the three examples in the request, I like Syft one most. As I understand it,
🤔 I'm not sure what to do with formatter options in this arrangement. $ goss --format documentation
User sees "documentation" on the terminal
$ goss --output junit=report.xml
User sees "rspecish" on the terminal and a JUnit file "report.xml"
$ goss --output junit=one.xml --output junit=two.xml
User sees "rspecish" on the terminal and two JUnit files "one.xml" and "two.xml"
$ goss --format tap --output junit=junit.xml --output json=results.json
User sees TAP on the terminal, a JUnit file "junit.xml" and a JSON file "results.json" |
@aelsabbahy you are right, it's missing the specification of the output file. In doctest, if I remember correctly, it would output both formats to stdout, one after the other, which is a bit ugly because you then have to split stdout at the right place...
Hmmm.... comma would be good enough imho, or maybe square brackets? (would imho read a bit better, e.g. Regarding formatter options, I think it would be easier / less edge cases to deal with when defining the formatter options for each output individually rather than having Would it also make sense to explicitly specify stdout instead of file output, so that using |
Because As you likely already know, this is an important ability in CI/CD workloads. Specifically, for exporting/attaching build artifacts to builds - of which the (not attempting to be pushy; just providing more context) |
Describe the feature:
During local development, I like to print test results to the terminal. During CI, I like to see similar, human-readable test results in the log and a machine-readable report that can be tracked and visualized by other CI tooling.
To accomplish this today, I must run Goss twice with different
--format
flags and shell redirection. It would be great if Goss could produce both forms of feedback in a single execution.Describe the solution you'd like
I want to specify one or more additional files that are filled with test results formatted differently than the terminal output.
For example,
report
flag it is passed:format
andout
flag pair it is passed:output
flag it is passed:The text was updated successfully, but these errors were encountered: