10.11 Unit Testing Your GUI with NUnitForms
Unit testing and test-driven development are increasingly being used to improve software reliability and simplify code design. However, it remains less common for developers to write unit tests for the user-interface components of their applications. NUnitForms, originally developed by Luke Maxon, makes it easy to test this part of your application. The API allows you to interact with your Windows Forms and control classes from a unit-test suite, verifying their proper behavior, state, and interactions.
| |
|---|---|
Tool | NUnitForms |
Version covered | 1.3, 2.0 beta |
Home page | |
Power Tools page | |
Summary | Makes it easy to write automated unit tests for your Windows Forms and control classes |
License type | BSD |
Online resources | Unit-test examples, forums, bug tracker, mailing list |
Supported Frameworks | .NET 1.1, 2.0 |
Related tools in this book | NUnit |
Getting Started
NUnitForms is a standalone testing framework. You don’t need any other test framework.
Source and binary downloads are available from the Download link at the tool’s home page. To use the binaries, simply run the installer or copy the supplied .dll files into your project’s library directory. Reference NUnitForms.dll from your unit-test project, and then you can write and execute unit tests in the usual way.
Here is an example of ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access
