Where is the power assert issue tracker? I did a d...
# power-assert
c
Where is the power assert issue tracker? I did a demo at my workplace today and… I have a few things to report 😇
b
YouTrack is where issues are being tracked: https://kotl.in/issue
c
Under the Kotlin project?
b
You can add the
compiler-plugin-power-assert
tag or just include
PowerAssert:
as a title prefix.
Under the Kotlin project?
Yes
c
Thanks
https://youtrack.jetbrains.com/issue/KT-70112 https://youtrack.jetbrains.com/issue/KT-70113 These two issues, as well as the rendering of objects with very large
toString
, gave the opinion to viewers that Power Assert would be something nice in the future, but was not usable in its current state.
thank you color 1
(I didn't see how to add the tag)
Is there an easy way to see what has been improved/fixed since 2.0.0 (including in yet-not-released versions)?
b
c
Thanks 🙏
b
Not everything has the tag yet, so there may be a couple issues missing.
Not sure there is much we can do about the large
toString()
issue in the short-term... But do you think opinions would change if these 2 other issues were resolved? I actually already have a fix for the tabs issue, just need to get it merged.
c
Currently, we are using Strikt. The downside, of course, is that all functions need to be replicated as assertion builders. However, multiple people found output of Strikt more readable than the output of Power Assert. These two issues are already a start, but I'm not sure if they would be enough right now
The ability to open the test result in some kind of debugger view would be very appreciated, though. I think someone mentioned this at KotlinConf after the talk. This definitely seems like something that would encourage people to migrate. (as in, to use IntelliJ's value explorer to compare various nested data instead of having just the full toString)
b
That's totally fair. Strikt has really good output. Maybe someday Strikt can use power-assert to enhance that output even more and it won't be a one-or-the-other situation, but a why-not-both situation.
use IntelliJ's value explorer
Yeah, this is definitely in our ideas list as well. Hoping to design something which IntelliJ can use to provide an even richer test failure output. Well beyond the assert equals comparison it already supports.
c
Maybe someday Strikt can use power-assert to enhance that output even more and it won't be a one-or-the-other situation, but a why-not-both situation.
The problem is that Strikt requires expressions to be written in the way it expects, and this can sometimes be quite complex to do. Power Assert has much more contextual information, and is already able to infer most of this from regular Kotlin code, without needing to learn a library at all