3

I want to put some conditions in my code to behave one way, if it's tested by monkeyrunner and another way, if it's used by a user.

How to check that in tested application that emulator/application is driven by monkeyrunner?

P.S. I am aware that it's bad practice to do such checks (the code under test should be the same code as in production). However, it's for one off case, which is hard to handle other way.

Victor Ronin
  • 22,758
  • 18
  • 92
  • 184

1 Answers1

0

I didn't find a clean way to check that except uploading a file to a Emulator/device as part of MonkeyRunner tests and after checking for it in application source code.

Victor Ronin
  • 22,758
  • 18
  • 92
  • 184