LabVIEW Unit Testing Course
How do you know your code really works? If testing requires running your entire system, tests are fragile or painful to maintain, and bugs keep slipping into production, you’re not alone. Many teams want better testing but struggle with inherited code, limited time, flaky tests, and slow manual processes that don’t scale. Even when integration tests exist, they often make failures harder to diagnose instead of easier.
This course shows you how to use testing as a practical, everyday development tool instead of a burden. You’ll learn how to design new code so it’s easy to test and how to add meaningful tests to existing code, even when it wasn’t written with testing in mind. The focus is on writing tests that are maintainable, reliable, and valuable, so they build confidence instead of creating more work.
You’ll learn how to balance unit and integration tests, choose the right type of test for the problem, and work effectively with hard-to-test dependencies like hardware and external systems. The course covers more than 10 types of tests, automation strategies, reporting, and testing tools. You’ll also learn how to simulate hardware, inject errors, and use tests to troubleshoot problems quickly. Object-oriented design techniques are used throughout to improve testability and clarity.
By the end of this course, you will:
Have fewer bugs reaching production
Recover from bugs faster when they do occur
Reduce recurring defects
Gain confidence that your code works
Be able to prove correctness to third parties
This course turns testing from a frustration into a competitive advantage.
FAQs
What is this course?
1
This course teaches how to design testable code, write reliable automated tests, handle hard-to-test systems, and reduce recurring bugs so you gain confidence, faster feedback, and provable results.
Who is it for?
2
Engineers curious about incorporating Unit Testing into their workflows.
What will you learn?
3
Writing Simple Tests, Parameterized Tests, API Testing, Writing Tests for Bugs, Approval Testing, Combination Tests, Pure Functions, Spies and Doubles, Mocking, Dealing with Frameworks, Automating Tests, and GUI Testing
Prerequisites?
4
None
Syllabus
-
Welcome from Sam
What do you know?
-
Environment Setup
Hello World Demo Follow Along
Hello World Review
Easy Refactoring
Exercise: What if we have an empty string?
Defining Test Cases
Zombies!
-
Writing Simple Tests
Exercise: Create Tests
Tolerance
Exercise: Refactoring Practice
-
Characteristics of Good Tests
Poor Parameterization
Demo: Parameters Example
Exercise: Parameterized Tests
Thoughts?
-
Avoid Overspecifying
Stack Example with Categorization
Given When Then
Exercise: Testing a Stack
Rule of Thumb
-
Intro to Session 2
Exercise: Yatzy Bug
Thoughts on Yatzy Bug
-
Intro + Recommended Viewing
Environment Setup
Follow Along: Hello World Approval Testing
Review
-
Complicated Output
Complicated Output Verify Person Demo
Rule of Thumb
Approval Scrubbers Demo
Supermarket Kata
Initial Impressions
Test Utility Methods Demo
Supermarket Approvals Demo
Supermarket Approval Printer Demo
Printer
Setup Teardown
All Together
Supermarket Review
Exercise: Supermarket
-
Built in Tools
Gilded Rose Combination Approvals Demo
Refactoring Practice
-
Introduction
What makes code hard to test?
What is it?
Safe Refactorings
Exercise: Simple Serial
-
Spies and Doubles intro
Backdoor Access
Com0Com
Com0Com Demo
Backdoor Pros and Cons
Alternatives
HALS
Examples
Serial Spy Demo
Exercise: Return to Simple Serial
-
LMock with Simple Serial
LMock Serial
LMock Demo
Use LMock on Simple Serial
SAS Mocks
-
Timing Test Doubles
Demo: Timing Test Doubles
Timing Exercise
-
Sam's Rules for Frameworks
Presentations to Watch
AF Unit Test
Allen's Ideas Applied to DQMH
DQMH Unit Testing Demo
Frameworks Rule of Thumb
-
LUnit API and Reports
Prebuilds
LUnit G-CLI
Exercise LUnit G-CLI
Switcheroo
Approvals Demo
-
GUI Testing
SLL Drona
-
Reflections and Resources
Your Instructor
Sam Taggart
I am passionate about helping LabVIEW developers grow so they can confidently take on bigger and better challenges. I have been doing LabVIEW for over a dozen years. Over that time I have learned a ton. I learned a lot of it the hard way. I wish I would have had some more guidance along the way. That is why I created these courses to point junior developers in the right direction and help them to avoid stubbing their toes so much.
Questions?
Questions about the content in this course? Would you like more information on the next offering of this workshop? Interested in custom classes? Drop us a line.