Unit testing and test driven development are invaluable disciplines for developing high quality code. However, dealing with calls to external code and verifying interaction with IO can be challenging. These challenges are not unique to graphical programming and the industry standard way for tackling these is to use test doubles, such as mocks, to emulate the environment and verify interactions.
This presentation will introduce and explain the concept of mocks and show how they can be used to improve testing. The mocking framework LMock is introduced and it is shown how this may be used to reduce the amount of boilerplate code and reduce development time. We will further discuss some of the design implications of using mocks and test driven development as design tools.
I am a LabVIEW and TestStand developer managing a small consultancy business as an NI Alliance Partner on the Finnish west coast. Through my career I have previously been working in various roles both with NI and at an Alliance Partner in Stockholm. I spend a lot of time exploring the wider industry to understand and learn principles and practices which may be leveraged also in the world of LabVIEW. I am also the author of the LUnit Unit Test Framework and LMock mocking toolkit.