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

Output JUnit tests #6

Closed
wants to merge 1 commit into from
Closed

Output JUnit tests #6

wants to merge 1 commit into from

Conversation

Peter-Darton-i2
Copy link

Attempt at resolving issue #4

@KyleTryon
Copy link
Contributor

Thank you for your input @Peter-Darton-i2 🙇 I have just merged in changes via #10 that I believe should resolve your request. Seeking approval for release (hoping to get that soon), and I would love your feedback.

@Peter-Darton-i2
Copy link
Author

@KyleTryon You don't have to choose between console-friendly TAP format and CircleCI-friendly JUnit format; you can have the best of both worlds at the same time because BATS has both a --formatter option which is used to output to stdout, and a --report-formatter option that outputs to whereever the --output flag says it should go.

Take a peek at my code for example - that's outputting in TAP format to the console (so it looks the same as it always did), as well as generating a JUnit report that's passed to CircleCI.

I'd suggest that, if you want to fully parameterise everything, instead of giving folks an "either TAP or JUnit" choice, give them the option to control both the formatter and the report-formatter options through parameters (my code hard-coded the JUnit report part; that could be made conditional in the shell script on the user not giving their own report formatter if you really wanted things to be 100% flexible).
...but make sure that the default behaviour is "TAP to stdout and JUnit to CircleCI" because that's what 99% of folks will want.

@KyleTryon
Copy link
Contributor

Ah thank you @Peter-Darton-i2 , let me take another pass at it.

@KyleTryon
Copy link
Contributor

Ok #12 should do it for us now I hope 👍

@Peter-Darton-i2
Copy link
Author

Functionality from this PR has been subsumed into #12. Closing.

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 this pull request may close these issues.

2 participants