Automating the Connect IQ Simulator for Testing

Hello,

I am trying to setup an automation framework around a Garmin watch app that we have developed. I am NOT concerned with unit tests. I am further down the line from there and focused on integration tests and UI tests. 

The question:

is there a way to control the connect IQ simulator? 

can you attach a debugger to a currently running app?

can you send actions (press a button, change gps location, etc) to the simulator once its created?

can you read the state of the app while its running?

Basically want to do this:

compile prg file

start simulator with that prg file

run automated tests on a simulator running the prg file.

The problem I have is that no window inspection (windows inspector, appium, various github inspector tools) can detect anything inside the panel window to "click" on the buttons or read the text on the screen. It is just a "blank" panel object.

Anyone done this?

Any resources you can point me to?

Thanks for reading and I appreciate any help you can give me.

Top Replies

  • I hope you make a good living out of your CIQ projects that can afford you to buy 9+ devices...

    Yeah I think we all know that anyone who tried to make a living off of ciq would starve very…

All Replies

  • I don't think it's possible, and no one has mentioned anything like this working in the last 7 years.,  

    You can play back a fit in the sim. but starting that is still a manual process.

  • Can a fit file execute user actions? as in:

    can it "press buttons" or change views?

    can you monitor what is happening or debug the fit as it processes?

    if using the fit is manual, and involves the menus then theoretically I can automate that part at least.

  • No.  With a fit file you can simulate this like GPS, HR.  Things related to fitness.  Things like pressing buttons/swipes/taps/holds are done with the mouse or a touch screen.

    And for full testing that's something you'll probably want to do on a real device.

  • any thoughts on testing that needs to produce bodily processes that I cannot produce?

    functionality based on detecting heart rate spikes of 20-30% over very short periods of time is not something I intend to do manually. 

    what about pulse ox levels dipping to extremely low levels?

    the fit file can run in the simulator with those values, but I cannot create them in the real world until it will really matter.

    and again, even though the fit file can run it in a simulator, I still need to actually look at it while it uses that data.

    How can I make an improvement ticket?

  • Record a .fit on a real device and play it back in the sim.  That's really all you can do.

    BTW, getOxygenSaturationHistroy has never really worked right on real device.  Check the bug reports

  • any thoughts on how I can communicate an improvement request to Garmin itself?

  • Submit it in the CIQ bug report forum.  A change like this would be big one to the sim so be prepared to wait a long time, even if it's accepted.

  • certainly. seems like something they would just need to attach exposed windows objects to the interface. probably built in such a way where it might it wasn't taken into consideration (seen it a million times). I mean: who would want to automate testing on their platform eh? sarcasm aside, this is something that would at least bring this platform into a usable automation space.

    if you are curious I posted it here: forums.garmin.com/.../expose-connect-iq-emulator-watch-face-panel-to-automation-software

  • Remember this isn't just windows but MacOs and Linux too.  And in 7+ years, I can't recall anyone else asking for this.  You know you'll need to test on real devices and not just the sim, correct, as there are things that are a bit difference on a real device? (getOxygenSaturationHistory for example.)

  • Has this story changed over the last 3 years?

    My open source app supports 84 watch models (basically every model with the 5 button interface) and it's unrealistic to own or manually test all of those.  My primary concern is checking that the screens look correct with the different display resolutions and fonts across all of the watch models.

    An ideal form of automation for this would be to write a script that presses the right button sequences to get my app to a particular screen, then save a screenshot, and keep doing this for the 5-6 critical screens.  I could then view all of these and identify outliers where there is a rendering issue that I need to fix.  With automation the collection might take an hour for all 84 watches, but it would let me do the human eye's on validation in just a minute.