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
Add toggle for stack traces from verify #427
Comments
Created special settings flag: https://github.com/mockk/mockk/blob/develop/README.md#settings-file Committed to develop branch |
Cool to see, thanks :) |
This doesn't seem to work for me. I've tried flipping the config back and forth with same result: long stack traces when verification fails. I've also confirmed that other settings (i.e. relaxed) work. Flipping it to false makes tests that assumed relaxed mocks fail. What am I missing? here's my settings file: resources/io/mock/settings.properties
--------------------------------------
relaxed=true
relaxUnitFun=true
#recordPrivateCalls=false
stackTracesOnVerify=false |
@oleksiyp is there anyway to do this programmatically if you'd like to avoid having a settings-file? Didn't find anything in the code base or the source code when jumping in via intellij |
1 similar comment
@oleksiyp is there anyway to do this programmatically if you'd like to avoid having a settings-file? Didn't find anything in the code base or the source code when jumping in via intellij |
No way currently only. Only settings file |
|
Need to check this again. |
I could take a look on this if someone could provide me instruction how build jar and release it to local repository. I tried just running:
But it fails on missing dependency:
So, if someone could tell me how I can create local artifact from code then I can take a look what's going on under hood. |
To get the build to pass with a freshly-cloned repo I think you can just skip the dokka Javadoc generation by doing
It shouldn't be a big deal not to have dokka generating the docs on your machine :) |
I have to comment out some stuff and exclude dokka plugin in order to build artifact. Anyway, root cause was that not every path that printed stack trace was covered with flag check, PR above should fix issue. |
Can this issue be closed? Was it resolved? |
Yes, thanks. |
In #19 there was added feature to show stack trace when
verify
expectation failed.I don't find this stack trace useful most of the time. More often I'm rather interested what exactly failed and long stack trace on bottom forces me to scrolling up for actual root cause.
Can we make some toggle for this feature? I would prefer to manually switching this on.
Naive solution:
verify(printStackTrace = true) { ... }
The text was updated successfully, but these errors were encountered: