GLA Summit 2024/Testing at the Edges using Mocks

From LabVIEW Wiki
Jump to: navigation, search

Testing at the Edges using Mocks by Anton Sundqvist

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.

Presentation Links

See Also

External Links