Hi Folks, Have anyone got experience with accessi...
# android
b
Hi Folks, Have anyone got experience with accessing/listening the Android’s Unit & Instrumented tests created with JUnit4 framework in Real-time? I have tried the approach of using custom runner but it needs to be specified as annotation in tests which is not what I prefer to do, also it doesn't work well with Instrumented tests.
đŸ˜¶ 2
d
Not sure why you would want to do that. Could it be an X Y problem? Would a JUnit Rule work? One that derives from
TestWatcher
for instance: https://junit.org/junit4/javadoc/4.12/org/junit/rules/TestWatcher.html
b
Hi @David Rawson, I want to keep a log of tests in real-time, a possible use case would be writing test results in a file. Re: JUnit rule, I want to avoid writing any additional stuff in the test itself. It would be like, there is a class X that listens the tests and then performs some actions on bases of that.