You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
JUnit5 support for the existing soft-assertions support (Expect.create JUnit4 Rule) #893
2 expectations failed:
1. expected: 2
but was : 1
at io.<snip>.ThingTest.lambda$testRemit$0(ThingTest.java:113)
2. expected to be greater than: 0
but was : -1
at io.<snip>.ThingTest.lambda$testRemit$0(ThingTest.java:114)
P.s. amazing framework BTW - beautiful. Especially for chained custom objects. Amazing. Wish I'd found it sooner.
changed the title [-]Nicer way to support soft assertions (Expect.create) in JUnit5?[/-][+]Nicer way to support soft assertions (Expect.create junit4 Rule) in JUnit5?[/+]on Jul 27, 2021
Thanks. As you've seen, JUnit 5 is a giant TODO for us, one that we're unlikely to carve off time for in the near future :(
I can say one slightly encouraging thing, which is that your proposal looks useful even to non-JUnit-5 users. (Maybe we've even heard requests for it from such users? I can't seem to find any offhand, though.) Then I can say one more discouraging thing, which is that we have had a proposal open inside Google for something like this for a couple years, and we haven't acted on it. Now, that proposal was more about adding context to a group of assertions:
in JUnit 5. I think that makes sense if you're actually using JUnit 5, but if you want to use it in any test framework, then your ThingyThing seems reasonable.
As belatedly noted on #894, anything that we label as P3 has no timeline for being reviewed :( We hope to eventually schedule some more time for Truth (especially for features that could work well in Kotlin, like this one), but there are no plans yet.
(Another thing we should do: Figure out if this feature request and #266 represent different requests or if they could be merged.)
changed the title [-]Nicer way to support soft assertions (Expect.create junit4 Rule) in JUnit5?[/-][+]JUnit5 support for the existing soft-assertions support (Expect.create JUnit4 Rule)[/+]on Feb 5, 2024
Activity
[-]Nicer way to support soft assertions (Expect.create) in JUnit5?[/-][+]Nicer way to support soft assertions (Expect.create junit4 Rule) in JUnit5?[/+]cpovirk commentedon Jul 27, 2021
Thanks. As you've seen, JUnit 5 is a giant TODO for us, one that we're unlikely to carve off time for in the near future :(
I can say one slightly encouraging thing, which is that your proposal looks useful even to non-JUnit-5 users. (Maybe we've even heard requests for it from such users? I can't seem to find any offhand, though.) Then I can say one more discouraging thing, which is that we have had a proposal open inside Google for something like this for a couple years, and we haven't acted on it. Now, that proposal was more about adding context to a group of assertions:
If we take into account that such a feature could support all of...
Expect-style failure collection for......then that provides at least a little more motivation.
Still probably not a big priority for us, given that Truth itself continues not to be a big priority for us, sadly.
ephemient commentedon Aug 17, 2021
I created PR #706 over a year ago which enables
in JUnit 5. I think that makes sense if you're actually using JUnit 5, but if you want to use it in any test framework, then your ThingyThing seems reasonable.
astubbs commentedon Sep 2, 2021
@ephemient that seems great! Perhaps the two could be merged to enable both options...
@cpovirk have you seen #706 ?
ddaeyeonkim commentedon Oct 1, 2021
My solution Inspired by
ThingyThing.A.
B.
I look forward to any form of Expect Extension for JUnit5 being added in the future!
cpovirk commentedon Oct 19, 2021
As belatedly noted on #894, anything that we label as P3 has no timeline for being reviewed :( We hope to eventually schedule some more time for Truth (especially for features that could work well in Kotlin, like this one), but there are no plans yet.
(Another thing we should do: Figure out if this feature request and #266 represent different requests or if they could be merged.)
[-]Nicer way to support soft assertions (Expect.create junit4 Rule) in JUnit5?[/-][+]JUnit5 support for the existing soft-assertions support (Expect.create JUnit4 Rule)[/+]