How to detect if my Android application has been started using AndroidJUnitRunner?

140 Views Asked by At

I need to detect at runtime from the code if the application is run using an Instrumented Test. I'm looking for a solution that works without knowing the Test class.

1

There are 1 best solutions below

0
On

You can read logcat logs in launcher activity of your application under test and find the instrumented test launch command in logs.