I have created a tutorial video on using the cpputest-for-qpc library, enabling host PC based unit testing of QP/C based firmware project. Now posted as a guest video on Quantum Leaps YouTube channel.
Video topics and outline:
- 0:00:00 – Introductions
- 0:02:48 – What is QP?
- 0:04:24 – What is TDD?
- 0:05:52 – Why cpputest-for-qpc?
- 0:11:54 – Example Active Object Requirements
- 0:13:50 – Environment Overview
- 0:14:29 – Starting Project Overview
- 0:16:00 – “C” Driver Clean Interface and mock
- 0:18:36 – More Project Overview
- 0:20:28 – Initial Unit Test Setup and Overview
- 0:23:39 – Unit Test of Service Startup
- 0:29:26 – Unit Test of Externally Published Event with Data
- 0:36:08 – Unit Test of Service Timer Behavior
- 0:43:29 – Unit Test of Externally Published Event without Data
- 0:45:30 – Unit Test of Published Events using Published Event Recorder
- 0:54:22 – Unit Test of Posting to another AO using Dummy Active Objects
- 1:02:54 – Unit Test of Q_ASSERT
- 1:07:49 – Summary of Unit Tests
- 1:09:23 – To Learn More and Conclusion
Related resources, to learn more:
- QP™: https://www.state-machine.com/
- QUTest™, QP’s official on-target unit testing environment: https://www.state-machine.com/qtools/qutest.html
- CppUTest: https://cpputest.github.io/
- Unit Testing via James Grenning: https://wingman-sw.com/about
- Matthew Eshleman Consulting: https://covemountainsoftware.com/