Skip to content

PRO TIP Block youtube.com at the DNS level β€” Pi-hole, NextDNS or your hosts file β€” but allow youtube-nocookie.com and i.ytimg.com. These tutorials keep playing; the rabbit hole does not.

Learning without distractions

#49 Embedded Unit Testing

19.2K views on YouTube

This is the first lesson about embedded software testing and its central role in software development. You will also see some ways of testing embedded software on the host computer and embedded targets and how to obtain the necessary tools.

#embedded_systems #embeddedsoftware #testing

Contents with Timestamps:
————————-
πŸ•‘ 0:45 Evolutionary principles for creating complex systems
πŸ•‘ 2:00 On the Origin of Software by Artificial Selection πŸ™‚
πŸ•‘ 3:00 Waterfall process and why it cannot work
πŸ•‘ 4:00 Agile software development / Test-Driven Development (TDD)
πŸ•‘ 5:20 Artificial selection
πŸ•‘ 6:00 Software testing levels: Unit testing
πŸ•‘ 6:30 Unit testing harness (a.k.a., Unit testing framework)
πŸ•‘ 7:05 Embedded-Test (ET) unit testing harness
πŸ•‘ 7:40 Downloading and installing ET
πŸ•‘ 8:00 Testing embedded code on the host
πŸ•‘ 8:30 ET basic example (on the host)
πŸ•‘ 9:30 Obtaining the command-line tools for testing
πŸ•‘ 10:00 QTools collection of tools for testing on Windows
πŸ•‘ 11:38 Installing QTools on Windows
πŸ•‘ 12:20 Explanation of the basic ET example (CUT and tests)
πŸ•‘ 14:30 Testing assertions in ET
πŸ•‘ 14:46 No need for “test runners” in ET
πŸ•‘ 15:10 Overview of ET examples
πŸ•‘ 15:35 James Grenning’s “TDD for Embedded C” book and “dual-targeting”
πŸ•‘ 16:22 Benefits of dual-targeting
πŸ•‘ 17:00 Testing on embedded targets
πŸ•‘ 17:32 Running tests on the TivaC LaunchPad
πŸ•‘ 18:30 Running tests on the STM32 NUCLEO-C031 board
πŸ•‘ 19:55 Adapting ET to run on embedded targets
πŸ•‘ 21:20 The built-in ET adaptation for the host computers
πŸ•‘ 21:44 Conclusions
πŸ•‘ 22:23 Confusion about what is being tested
πŸ•‘ 22:57 The need to discard less relevant tests

End Notes:
———-
Companion web page to this video course

Modern Embedded Systems Programming Video Course

Project download for this lesson:
https://www.state-machine.com/course/lesson-49.zip

GitHub repository for projects for this video course:
https://github.com/QuantumLeaps/modern-embedded-programming-course

Transcript of this lesson:
https://www.state-machine.com/course/lesson-49.txt

Referenced software:
——————–
πŸ“₯ QTools collection of open-source tools for embedded systems development
on Windows, Linux, and macOS
Quantum Leaps GitHub repository, 2023
https://github.com/QuantumLeaps/qtools

πŸ“₯ Embedded-Test (ET) Embedded Test (ET) — The Super-Simple Embedded Test
Quantum Leaps GitHub repository, 2023
https://github.com/QuantumLeaps/Embedded-Test

πŸ“₯ Unity unit testing framework Simple Unit Testing for C
ThrowTheSwicth GitHub repository, 2023
https://github.com/ThrowTheSwitch/Unity

πŸ“₯ CppUTest unit testing and mocking framework for C/C++
CppUtest GitHub repository, 2021
https://github.com/cpputest/cpputest

πŸ“₯ GoogleTest – Google Testing and Mocking Framework
Google GitHub repository, 2023
https://github.com/google/googletest

β–Ά Windows Subsystem for Linux (WSL) Tutorial & How To
Gary Explains YouTube video, 2019

Books and articles:
——————-
πŸ“– James W. Grenning, “Test Driven Development for Embedded C”,
The Pragmatic Programmers, 2011,
https://pragprog.com/titles/jgade/test-driven-development-for-embedded-c/

πŸ“– John Gall, “Systemantics: How Systems Work and Especially How They Fail”
Quadrangle; 1977,
https://docdrop.org/download_annotation_doc/John-Gall—Systemantics_-How-Systems-Work-and-Especially-Ho-8qhgx.pdf

πŸ“– Miro Samek, β€œOn the Origin of Software by Means of Artificial Selection”
Quantum Leaps Blog, 2011

On the Origin of Software by Means of Artificial Selection

Music credits:
————–
🎡 The background music comes from:
https://www.bensound.com/royalty-free-music/track/straight