Hi @ianmcorvidae and @thebentern,
I'm making this issue to discuss an idea. In the 'old days' we had a compiled C++ version of the firmware code that ran on linux using the portduino layer. We used that binary in the CI build of the python toolchain to do integration testing - because we could talk to it like a "real" device (because it was 95% the same). This was handy for integration test purposes.
I guess that somewhere over time that got deprecated/removed.
Now that there is slick codecoverage support that someone added (@ianmcorvidae ?) for python: what do you think about using that again?
The reason I ask is that in cleaning up my power measurement stuff for checkin I realized that the PowerStress stuff needs code coverage testing. I could learn how to use the python mocking framework, but I'm worried that even if I use that framework if I mock out the PowerStress class to pretend to be the real device I'm not really testing that much. Because PowerStress is mostly done on the device side.
Instead: (proposal)
- Use a precompiled linux device firmware (do ya'll already/still do a linux build of the device firmware?), fire it up.
- Run the python tests as integration tests but have them talk via TCP to the actual device firmware fired up previously.
- This would allow testing lots more of the python code - and also implicitly testing the device code as well. So it would be a true integration test.
- Testing all this code would then be seen by the code coverage tool.
Does this seem plausible? Would you like changes?
My current queue is:
- finishing the power stuff (done next few days?)
- stress testing nrf52 filesystem stuff to try and reproduce the reported rare corruption and make a robust fix (idk, a couple of weeksish?)
- do this third?
Hi @ianmcorvidae and @thebentern,
I'm making this issue to discuss an idea. In the 'old days' we had a compiled C++ version of the firmware code that ran on linux using the portduino layer. We used that binary in the CI build of the python toolchain to do integration testing - because we could talk to it like a "real" device (because it was 95% the same). This was handy for integration test purposes.
I guess that somewhere over time that got deprecated/removed.
Now that there is slick codecoverage support that someone added (@ianmcorvidae ?) for python: what do you think about using that again?
The reason I ask is that in cleaning up my power measurement stuff for checkin I realized that the PowerStress stuff needs code coverage testing. I could learn how to use the python mocking framework, but I'm worried that even if I use that framework if I mock out the PowerStress class to pretend to be the real device I'm not really testing that much. Because PowerStress is mostly done on the device side.
Instead: (proposal)
Does this seem plausible? Would you like changes?
My current queue is: