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

Have a goal of having way to override the output of Base.print(io::IO, suite::TestSuite) #58

Open
passionateprogrammersguild opened this issue Aug 24, 2015 · 4 comments

Comments

@passionateprogrammersguild

We have a need to write out out results in nunit format for reporting purposes. I could overwrite the Base.print function and hide the current function, but I would rather reach out to see if there are plans to include this in the architecture of the project or if you would be willing to add a hook for this behavior as in:

function Base.print(io::IO, suite::TestSuite, writer:: TestSuiteResultsWriter = nothing)

   if writer == nothing
      writer = DefaultTestSuiteResultsWriter()
   end

   writer.write(io, suite)
end

This would mean that as a part of the facts function we would need a way of providing the writer, which could be an argument following the description.

@IainNZ
Copy link
Contributor

IainNZ commented Aug 24, 2015

Seems reasonable. I'd think a PR implementing something like this would be welcome, I'd certainly review it.

@passionateprogrammersguild
Copy link
Author

sweet, I will start work on it. Thanks

@passionateprogrammersguild
Copy link
Author

Another thing I found that I would like to address is the filename of the TestSuite is never set based on what I can see. I would like for this to be an optional argument to the facts function as well. This way the TestSuiteResultsWriter could do something with it if it desired and the print_header function would print this. My thoughts are the print_header function should be delegated to the writer so the writer has total control of the writing process. Thoughts??

@passionateprogrammersguild
Copy link
Author

The pull request has been out there for a bit. Am I missing something from the pull request for this to be reviewed and brought in?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants