0

I'm not really sure if this is the correct stack exchange site to ask on, but I can't find anything via google, SO search or on the firebase or android developer sites.

I want to make use of the free spark tier of Firebase Test Lab to run MonkeyRunner tests, but I can't see any way of doing that, or if it's even possible.

I apologise if this is out of context.

I need to do Monkeyrunner tests as my project is a LibGDX project which has no Android classes in it, so I can't benefit from the normal instrumentation tests.

Russ Wheeler
  • 2,590
  • 5
  • 30
  • 57
  • Screenshots that you take with Screenshotter on Test Lab will get pulled into the test results in a storage bucket after the test. You can access that bucket with the "View Source Files" button at the top of the test results. – Doug Stevenson Mar 07 '17 at 01:50
  • But I can't use ScreenShotter because in UIAutomator, we don't have an Activity. or at least, I can't find a way to get it. – Russ Wheeler Mar 07 '17 at 12:40
  • Could you take your additional questions to a different issue here on SO? You've packed too much into this one question - it's difficult to follow. Your first question was about monkeyrunner, which got answered. Your other questions are about different topics. – Doug Stevenson Mar 07 '17 at 17:59

1 Answers1

2

No, not currently. Monkeyrunner is a python program that directs the emulator or device after the APK is deployed to it. Test Lab doesn't have a way to also deploy and execute a python program that runs in this fashion. That complicates things greatly. If you would like to submit this as a feature request, we would love the details of your app and why you're trying to do with it.

Doug Stevenson
  • 297,357
  • 32
  • 422
  • 441
  • Hi, Doug, thanks for replying. Basically I am writing a game on Android using a Library/Framework called LibGDX. It's basically written in pure Java, using LWJGL which sits inside a single Activity. Because of that, there are no real Android UI classes, with which to control the UI tests. To be honest, the main thing I want at the moment, is just the ability to take screenshots on many devices, as I'm only a solo dev at the moment, and my funds don't stretch to me trying my game on the latest devices, or at least not many of them (only what I can borrow from friends) – Russ Wheeler Mar 04 '17 at 22:21
  • p.s. feature requested – Russ Wheeler Mar 04 '17 at 22:24
  • Sorry to turn this into a correspondence, but Doug, I found SnapShotter in the TestLab docs and this looks great, but when I try and use it in my UIAutomator tests, it needs an Activity, when I only have a Context. Do you know if there is anyway to get an Activity from something like the launcher intent, or am I doomed to not be able to use this either :( – Russ Wheeler Mar 05 '17 at 18:24
  • Maybe just ask separate question, since that's unrelated to this one? – Doug Stevenson Mar 05 '17 at 19:10
  • @RussWheeler can you describe what are you doing in your tests, sending events and taking screenshots, IIUC? – Diego Torres Milano Mar 06 '17 at 20:27
  • @DiegoTorresMilano I've updated my original post to give some more info. Or were you looking for actual code of what I'm trying? – Russ Wheeler Mar 06 '17 at 20:43