How do you test code without interfering with your running system? #93
-
|
I thought I should actually write some code and submit some pull requests, but I'm curious as to whether there's a better method than the one I'm assuming I'm going to need to use - i.e. build the app, install it on my live device and see if it works. I'm a bit reluctant to potentially break a working system, any thoughts as how to do it? It would be quite nice to make a sensor emulator (even if it only spits out recorded data without being controllable) and to be able to do development with that on a separate device with no risk to my working system until I'm happy it's working fully. Any thoughts/ideas? |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments
-
|
There is a mock-up collector inside xDrip. It is a simulated device. It can be useful for testing changes that affect alerts and graphs etc. But, it may be useless for a change that affects a very specific collector-related change. For example if you change how the Dexcom calibration or Libre calibration scheme works, that will be useless. There are people who have simulators. They have a device that let's them attach a transmitter to. Then, that device acts as if there is a sensor on a body and the transmitter starts really working. So, while your own system is working, you can use another phone with this device to run a separate system for t4esting your changes without affecting your glucose control. You can tell me exactly what feature you are going to work on and the mock-up may be perfectly fine for testing it. |
Beta Was this translation helpful? Give feedback.
-
|
That's great, thank you, the mock-up sounds like it will work for at least part of what I want to do (e.g. my pop-up description issue, which are apparently called toasts, etc.) Are there any specific instructions as to how to setup and use the mock-up device? If not I'll have a dig through the code and see if I can find it. I do also plan to have a look at the model (and expanding the options for models) and calibration sides of things too so I'll probably have to think about how to fake libre messages. From the way you describe it, the calibration of each sensor type is not centralised, as otherwise I'd have expected the mock-up to be able to fit in below the shared calibration layer? |
Beta Was this translation helpful? Give feedback.
-
|
The mockup is a hardware data source. If you want to make a change to G5, you need to select the G5/G6 collector. So, that's why I said you cannot use the mockup. It's like changing your BMW and testing it by driving your Porsche! To enable the mockup, you need to use the "enable fake data source" voice command. |
Beta Was this translation helpful? Give feedback.
-
|
Ah I see, which is why I was wondering whether the calibration functionality was unified, and thanks I'll have a play with that. |
Beta Was this translation helpful? Give feedback.
-
|
We have discussions now opened in the main repository: I am looking for a way to transfer the open discussions from here to there. But, I'm not sure I'll succeed. In that case, it may be easier to open new discussions there. |
Beta Was this translation helpful? Give feedback.
There is a mock-up collector inside xDrip. It is a simulated device. It can be useful for testing changes that affect alerts and graphs etc.
But, it may be useless for a change that affects a very specific collector-related change. For example if you change how the Dexcom calibration or Libre calibration scheme works, that will be useless.
There are people who have simulators. They have a device that let's them attach a transmitter to. Then, that device acts as if there is a sensor on a body and the transmitter starts really working. So, while your own system is working, you can use another phone with this device to run a separate system for t4esting your changes without affecting your gl…