-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Keep default summary when custom summary is requested #2729
Comments
I used the below to give the default summary output to the stdout. I had other exports but removed them for clarity. To solve the problem asap can use the below. import { textSummary } from "https://jslib.k6.io/k6-summary/0.0.2/index.js";
export function handleSummary(data) {
return {
stdout: textSummary(data, { indent: " ", enableColors: true })
};
} Though, it would be useful to have that as an option IMO. |
The solution that @eugercek gave is the official recommendation. Though maybe use the latest v0.0.2 version of the library: https://jslib.k6.io/k6-summary/0.0.2/index.js (or any later ones that have been released since this comment was made). The reason that k6 doesn't print the default end-of-test summary if you implement It might have been better if k6 always prints the text summary to |
IMO this version is better. If one implemented Can we add a new long option, and not break the default behavior? An option like |
We'd prefer to keep the number of global options to a minimum, especially when they duplicate behavior that can already be achieved with very little code. We probably already have too many such options and we have plenty of issues with them (e.g. #883 and the many connected issues). What we could do instead is to expose the built-in function to generate the k6 summary internally, so user would be able to |
That's would be a great solution! 😊 |
Feature Description
When handleSummary it's use also could be provided the default report optionally.
I am interested in return summary as junit report but also i would like keep default summary.
Suggested Solution (optional)
No response
Already existing or connected issues / PRs (optional)
No response
The text was updated successfully, but these errors were encountered: