Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Is it possible to run unit test in fitbit?

Hello Friends,

 

I am writing an application for fitbit verse 2 or 4 and I was wondering if it is possible to run unit test to test my fitbit appliction before deploying. If this is the case, please let me know or point me to any documentation or examples that can help me move forward. If not possible, I will appreciate if someone explain to me the reasons.

 

Thank you.

Best Answer
0 Votes
6 REPLIES 6

Hi @baptiste2k8 - you can load your built project to a GAM project and use the private link to load and test on the watch.

Author | ch, passion for improvement.

Best Answer
0 Votes

Thank you @Guy_ , could you explain more how this works? You mean I can write Unit Tests for both App and companion?

I will appreciate if you share more information.

 

Regards,

Best Answer
0 Votes

@baptiste2k8- you can test quite a few things directly using the OS simulator which will simulate both a Versa 2 / 3 and companion or they can be connected to your computer via the developer bridge.This method gives you a console log on which you can follow activity and give messages for testing.

A Versa 4 has no Simulator or computer connection and can only be tested directly on the watch [and phone for the companion] using the private link - which will become unavailable in June 2024 for EEA users..

Author | ch, passion for improvement.

Best Answer
0 Votes

Thank you very much. This is interesting to know. Any working example or link to some useful tutorials or GitHub repo? I was trying to write some tests using jest with no success.

Best Answer

@baptiste2k8- have a look here

Author | ch, passion for improvement.

Best Answer
0 Votes

Hello @Guy_ , Wonderful. I thank you very much. I have seen many projects you shared and one of them includes jest test cases for app. I did not find any test written for the companion component. Furthermore, I am still wondering if the same can work in the companion.

Lastly, Fitbit Versa 4, do you know how to enable developer's option? I checked its settings and its different from fitbit verse 2.

Best Answer
0 Votes