The SAS Workshops Blog

Helping You Become a Better LabVIEW Developer

GDevCon #2 Videos

GDevCon #2 Videos

The GDevCon #2 Videos are now available. You can access the entire playlist here. We are proud to have sponsored an event that produces such great content! All of the presentations were great and worth watching, but here are some of my favorites. * Rebar – Ben Leedom introduced a new programming
2 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
Guns Germs and Steel

Guns Germs and Steel

Guns Germs and Steel is a very interesting and entertaining book. Similar to the last book I reviewed, Malcolm Gladwell’s Outliers, Gun’s Germs and Steel challenges the reader’s view of the world. It starts with a very simple narrative that we are all familiar with and then
2 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
Outliers

Outliers

I’ve had several very interesting conversations lately. I had a great conversation with Allen, Shane, Danielle, and Oli after GDevCon2. I had another fascinating conversation with Fab and few others after the CLA Summit. Most recently I had a conversation after Social Media Day Denver. All these conversations had
4 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
Be The Developer Everyone Wants On Their Team

Be The Developer Everyone Wants On Their Team

I’ve been an avid rockclimber and mountaineer for over 15 years. I spend a lot of time helping out with the Colorado Mountain Club teaching classes. I was recently talking to one of the other instructors and he said something that stuck with me. He said there was a
3 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

Creating Mocks in LabVIEW

In my last article, I introduced the concept of Mock Objects. The obvious next question is how do you implement them in LabVIEW? Many other languages either have builtin or readily available third party mock objects frameworks. LabVIEW does not. Until Now. I’ve create some tools for class refactoring
2 min read
Mock Objects

Mock Objects

At the upcoming CLA Summit, I will be giving a presentation on mock objects. I thought I would introduce them here first for those who aren’t familiar with them. If you read any literature on unit testing you are bound to run into them. A Different Kind of Test
2 min read
GDevCon2 Initial Thoughts

GDevCon2 Initial Thoughts

I finally got home and am starting to recover from GdevCon. Like many of these types of conferences, attending GDevCon is like drinking from a fire hose. Add to that attending the workshop that Steve, Fab, and Joerg put on, lots of late-night discussions at the bar and a little
3 min read

LightWeight Doubles with SQLite

In a previous article, I mentioned that one reason to use a Test Double was to increase performance. One place where this is evident is in database access. Doubles can be very useful for database operations for the following reasons: * Isolation from the production database – Isolate any changes you make
2 min read
Test Doubles In Action

Test Doubles In Action

In the last post, I talked about Test Doubles and some various types that we can use and how to implement them. The next obvious question is how do we actually use them in our tests. Dependency Injection Understanding Test Doubles first requires understanding the concept of dependency injection. This
2 min read
Intro to Test Doubles

Intro to Test Doubles

It’s no secret that many Hollywood actors use stunt doubles. These are specialists that from the outside look and behave like the stars, but have unique talents. The actors do most of the heavy lifting in terms of acting, but for fight scenes, car chases, jumping off buildings, etc.
3 min read

August 2019 Webinar

Basic Continuous Integration with GitLab and LabVIEW – 8/28 at 11am MT How do I make sure my unit tests get run regularly? Maybe you have unit tests, vi analyzer tests, and a build process in place but how often do you actually run them? What if one action that
2 min read
Humble Objects

Humble Objects

Ego is the Enemy. Ego can cause us all kinds of problems in our personal and professional lives. When it comes to software, it is no different. Objects and VIs that have large egos create problems. One of the problems they cause is that they make it very hard for
2 min read
Unit Testing As An Aid For API Development

Unit Testing As An Aid For API Development

If you follow Test Driven Development (TDD) the first step is always to write your unit tests before you write your code. Well in LabVIEW that doesn’t work out quite so well because you need to have a subvi to drop into your test case. That means that before
1 min read
Unit Testing as Bug Repellant

Unit Testing as Bug Repellant

Nobody likes bugs, whether they are mosquitoes, black flies, spiders, or software bugs. One mosquito bite is generally mildly annoying but tolerable. Similarly with software, if your customers find a bug, it usually results in mild annoyance. Of course, there are exceptions to both: some mosquito bites can be deadly
2 min read
Unit Testing as a Delegation Tool

Unit Testing as a Delegation Tool

Delegation is hard. There are a variety of reasons, but there are two things I’ve heard quite often from customers, and they are related. They have trouble specifying and clearly communicating the exact requirements to the person they are delegating to. They also have trouble verifying that whatever code
2 min read
See us at CLA Summit 2019

See us at CLA Summit 2019

We just received word that our submission at NI Week was accepted. Unit Testing at Mock Speed We will be talking about using some new tools me have developed for creating Mock Objects in LabVIEW for Unit Testing. A mock object is a kind of test double. Just like a
1 min read
Unit Testing as Documentation

Unit Testing as Documentation

Comments and documentation often lie. The only truth is the code. Steve Watts commenting on Chris Stryker’s Clean Code presentation at NIWeek 2019 Now I don’t think Steve is accusing the developer who wrote the code or documentation of deliberately lying, but we’ve probably all encountered code
2 min read