Making Failure related objects Serializable #647

MarkBramnik opened this Issue Sep 20, 2016 · 0 comments


None yet

1 participant


Issue description

Spock version: groovy-2.4-rc-2

In JUnit all the "transport" objects like org.junit.runner.Description, org.junit.runner.notification.Failure and so forth intentionally implement interface.
I'm writing a custom runner and I would like to serialize the results of the test execution.
However, when a spock test fails, the org.junit.runner.notification.Failure object contains the following instances:

--> org.spockframework.runtime.model.ExpressionInfo
and so on
All of them are not Serializable which kind of contradicts with the JUnit contract (at least IMO)

It could be great if one could fix that :)

Thanks a lot in advance

How to reproduce

Register the implementation of org.junit.runner.notification.RunListener in the custom Runner
Create any trivial test that fails and check the Failure object in the listener callback method.


Applies to any supported Java version

Groovy version

Applies to any supported Groovy version

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