-
Notifications
You must be signed in to change notification settings - Fork 105
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 the FailureReport
type?
#347
Comments
Hey! Thanks for opening this issue and sorry for the late reply! Currently the Let's look at that type: data FailureReport = FailureReport {
failureReportSeed :: Integer
, failureReportMaxSuccess :: Int
, failureReportMaxSize :: Int
, failureReportMaxDiscardRatio :: Int
, failureReportPaths :: [Path]
} deriving (Eq, Show, Read) The first four fields are related to QuickCheck. The thing that may be of interest to you is describe "foo" $ do
it "bar" ...
it "baz" ...
[
(["foo"], "bar")
, (["foo"], "baz")
] Would it help your use case if you had access to this information? |
No worries, it seems I'm using all your packages haha. Yes, the |
@thomasjm Looking at again, I'm not comfortable with exposing data FailureReport = FailureReport {
failureReportSeed :: Integer
, failureReportMaxSuccess :: Int
, failureReportMaxSize :: Int
, failureReportMaxDiscardRatio :: Int
, failureReportPaths :: [Path]
} deriving (Eq, Show, Read) in your own code for now and use that to read the failure report. Is this a workable solution for you for now? |
Sure, that works! It's not super urgent. One other suggestion: it would be nice to add some more comments to the Haddocks on the |
In the current Hspec
Config
object there's aconfigFailureReport
option, which causes Hspec to dump aFailureReport
into a file. However, it seems to just use theShow
instance ofFailureReport
, so the output is hard to work with given thatFailureReport
(the constructor and potentialRead
instance) isn't exposed anywhere.This is especially needed since
hspec-jenkins
doesn't work with Hspec version 2, leaving limited ways to get detailed test failure information out for downstream CI stuff without writing a customFormatter
or something. (TheSummary
returned byhspecResult
only has success/failure counts.)The text was updated successfully, but these errors were encountered: