-
Notifications
You must be signed in to change notification settings - Fork 74
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
Expose API for integrating with other test suites #106
Comments
@munro I'm excited to hear that you like both But one quick question, both Have you looked at automatic spec discovery. You loose this functionality if you use What exact features of |
I liked the DSL that hspec provided, since it lets me do IO—which is nice because it feels more like a scratch pad for my ideas.
I wanted to combine both my doctests and hspec into one test suite, tasty just made that easy for hspec. Tasty has a gross API for writing tests though, so I just stuck with hspec.
:O That's pretty cool, I've just globbed my tests together manually. For some reason I'm infatuated with running all the tests together. |
For me this does not have high priority for the following reasons:
If it's still important to you, please feel free to give it a try. On a technical side:
My requirements for getting it on master are:
|
Count me as another who'd like to be able to run doctest from one of the higher-level test frameworks. I was surprised that the current popular one, tasty, can't run doctests - it seems to run everything else. The old test-framework-doctest seems too deprecated to be an option these days. |
I meant to add a use case: the hledger-lib package defines two test suites, one is hunit tests run by test-framework, the other is for doctests. Having each suite report its results separately is not always ideal, eg recently I missed doctest failures because the hunit test output pushed them offscreen. It would be good to be able to summarise all the test results together at the end. |
Just setup Tasty so I could run HSpec and doctests, except to find out that doctest can't plug into other test suites. [1] 😭
Looking at the Tasty API, what it needs to expose is pretty simple—
From this example doctest ...
... we could infer the same test API.
"Parse a number"
Or we could expose more of the doctest test API, so the runner has more control over how to display everything. I'm actual more partial to doing this!
The next step would be to figure out an API to export the tests from, so they can then be translated to another test runner. What do you think about the following—
Looking at the code, I can already start to see where I would plug this in, and make the current runner just sit on top of the API.
Let me know what you think!
❤️ doctest
[1] http://www.reddit.com/r/haskell/comments/1s0t1f/24_days_of_hackage_tasty/cdsvu7n
The text was updated successfully, but these errors were encountered: