-
Notifications
You must be signed in to change notification settings - Fork 21
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
Logcat usage in classes being tested #20
Comments
What I have done so far is implement a TestLogcatLogger which simply prints out to System.out and created a test rule like this for my tests.
I suppose that's the expected thing to do here. |
You can also just use |
Heh I did not know this existed. This bad boy has served me well for this past year 😅 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If a logger is not installed, it defaults to
NoLog
which crashes on any log command.When inside unit tests, if the class being tested also needs to log something and does so using
logcat
, it means it will by default crash.What do you usually do in such scenarios? Having to install a logger on each test (even if done by a rule) sounds quite cumbersome to me and I am not familiar with any better alternatives.
The text was updated successfully, but these errors were encountered: