-
Notifications
You must be signed in to change notification settings - Fork 188
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
multiple output options #700
Comments
What exactly is the request here? For an |
The idea is to use two outputs in parallel. To terminal for human consumption, to file for passing results on to a report system or similar |
Passing the events shouldn’t be too hard I think. But how to configure what goes where? |
For my use cases the longest running test suite I have with ~500 test units takes a very limited time to run (a few seconds) so I am content running multiple instances of busted for each purpose. Hence I'll be unlikely to work on this directly. But I'd be happy to facilitate a PR if somebody wants to work on it and contribute a way to do this. In my view it would have to not break existing CLI usage and busted files for people using only one output handler, but within that requirement find some ergonomic way to set it up. |
So the test suite I have is not fast 😂 Which is why I'd like one output format for humans (htest) and a different output format (junit) to a file for computer consumption |
Besides speed it would have the added benefit of CI usage being able to show something to the user in logs but also provide a download artifact with more detailed reports in a more usable format. Even if jobs are fast and for occasional manual trigger it would be tolerable, running everything twice on every invocation by default does get excessive if the output could be captured and handled two ways at once. |
I manage to do this by specify a custom output handler, which combines two output handlers from busted. return function(options)
local utfTerminalHandler = require('busted.outputHandlers.utfTerminal')(options)
utfTerminalHandler:subscribe(options)
table.insert(options.arguments, 1, "junit.xml")
local junitHandler = require('busted.outputHandlers.junit')(options)
junitHandler:subscribe(options)
return utfTerminalHandler
end |
I want htest output for humans -- to the terminal
junit output for computers -- to a file for consumption elsewhere
The text was updated successfully, but these errors were encountered: