Unit Testing

A collection of 39 posts
A case for sets

A case for sets

Back in LabVIEW 2019, NI introduced both sets and maps. Maps became immediately popular. They should be. They are very useful constructs. However, sets seem to have gotten much less attention. In some ways, they aren’t as glamorous, but they do offer some advantages over arrays. To me, these
4 min read
Unit Tests for PPLs

Unit Tests for PPLs

So in my Unit Testing Workshop, I talk about taking tests written for libraries and retargetting them to the PPL once the library is built into PLLs. The last time I taught the workshop, someone asked me for an example. I didn’t have a good example to share, so
5 min read
TDD in LabVIEW using Caraya

TDD in LabVIEW using Caraya

I’ve written a lot about Unit Testing in LabVIEW. There are a variety of frameworks. My go-to is JKI VI Tester, but JKI’s Caraya has been gaining popularity lately. I finally had time to sit down with it and practice some Test Driven Development (TDD). This is where
1 min read
Tests are like bicycle helmets

Tests are like bicycle helmets

I was listening to the IEEE’s SE Radio podcast the other day while riding my bike to work (ironic as you will see if you keep reading). They were interviewing Ken Youens-Clark who wrote a book called Tiny Python Projects. You would never put a kid on a bicycle
1 min read
A Great Intro To Unit Testing

A Great Intro To Unit Testing

As many of you may know Fabiola De la Cueva and Richard Jennings came out with a new LabVIEW book this year (actually the 5th edition of an existing book) LabVIEW Graphical Programming. I have been meaning to write a review, but I have put it off because I haven’
2 min read
Unit Testing And Seams

Unit Testing And Seams

One of the topics I found very interesting form the Art Of Unit Testing was seams. I wanted to write a blog post to explore that a little bit. What is a Seam? Seams are places in your code where you can plug in different functionality … Art of Unit Testing,
3 min read
Art of Unit Testing 2nd edition

Art of Unit Testing 2nd edition

I originally bought this book on Fab’s recommendation. I had read the XUnit Test Patterns book and I liked it, but I thought it was rather large and cumbersome. It was 900 pages, so I was looking for something smaller and lightweight that I could recommend to people. I
3 min read
Unit Testing Workshop Lessons Learned

Unit Testing Workshop Lessons Learned

At the end of January, we ran a Unit Testing Workshop. It went well. We had 7 participants. They included a LabVIEW Champion, and several CLAs. Overall the reviews were positive, but it was clear that there were some things that could be improved for the next time. 1. The
2 min read
Unit Testing - Tips For Getting Started

Unit Testing - Tips For Getting Started

It’s a new year, so it is a good time to start planning and setting some goals for this year. If you are not currently using unit testing, starting to use it would be a great goal for the new year. People often struggle when starting to learn unit
3 min read
Stop Asking Permission

Stop Asking Permission

I was originally going to title this post “A Business Case for Unit Testing”. I was going to talk about how it helps you to find bugs early, spend less time debugging, and all the other benefits I have mentioned in my previous posts. I intended it as a cheat
3 min read
Caraya Review

Caraya Review

Caraya is a popular Unit Testing solution from JKI. Compared to JKI VI Tester, Caraya seems to be newer and better supported. In fact while conducting this review I found a small bug. I reported it and it was fixed within 24 hours. The Caraya paradigm is different from the
4 min read
December 2019 Webinar

December 2019 Webinar

Refactoring December 11 11:00am MT I need to add a feature but it is too hard. Refactoring can help! Refactoring is the art of taking existing code and waking it easier to understand and modify without actually changing it’s behavior. Why? Friction. Code is read more often than
1 min read
Insta Coverage

Insta Coverage

I first heard about InstaCoverage at NI Week 2018. I was part of a panel discussing Unit Testing. Peter Bokor gave a brief presentation right before the panel started on a new unit testing tool IncQuiry Labs had created called InstaCoverage. He really emphasized the code coverage calculation. This is
7 min read
AST Unit Tester Review

AST Unit Tester Review

I recently did a review of JKI VI Tester. While it is my goto unit testing tool, there are several issues with it: * You have to be an admin to install it. * It adds a ton of dependencies to your project. * If you have a project that has tests in
3 min read
Using JKI VI Tester

Using JKI VI Tester

If you have been following my posts, you will know that I am a big fan of JKI VITester. It is my goto Unit Tester. Why? Mostly because it is an implementation of xUnitStyle testing, which means that I can easily use all of the great patterns outlined in xUnit
5 min read
Reusing Tests for Built Code

Reusing Tests for Built Code

As I have been doing more and more Unit Testing and Continuous Integration, I have often wondered about automating testing of built code. There are promising tools out there for testing built Win32 apps, such as WinAppDriver. There is also Selenium for testing webapps, so if you are into the
2 min read
Mock Objects Advanced Features

Mock Objects Advanced Features

In the last post, I talked about how to use Mock Objects in Unit Tests. In this post, I am going to talk about some advanced features of the Mock Objects. It is worth going back and reading my previous posts on Mock Objects if you have not already done
4 min read
How To Use Mock Objects in Tests

How To Use Mock Objects in Tests

In the last couple posts, I talked about Mock Objects: what they are and how to implement them in LabVIEW. In this post, I am going to talk about how to use them in unit tests. For reference, the video below shows how to use the Class Refactoring Toolkit and
3 min read
Anatomy of a Mock Object

Anatomy of a Mock Object

In the last post, I talked about Mock Objects and what they are. In this post, I am going to talk a little bit about what they look like when you implement them in LabVIEW. The video below shows how to use the Class Refactoring Toolkit I created to create
3 min read

October 2019 Webinar

Test Driven Development October 23 11:00am MT I Tried Unit Testing But Testing My Existing Code Is Too Hard! That’s because you have got the order wrong! Writing unit tests after the fact is possible, but it is always hard. Why? Because whoever wrote it never thought about
2 min read