A multi-platform, fast compact framework for Test-Driven Development (TDD), SafetyNet is a lightweight unit test framework. It is also a test code and test project generator for C/C++ software projects.
|GUI Test Monitor||38.0 KB||Linux|
|GUI Test Monitor||90 KB||Windows|
Building SafetyNet is as simple as a single command:
SafetyNet comes with sample code and a workshop exercise to have you quickly writting unit test for all your projects.
Watch this video in full-screen and be amazed how fast you can go from ZERO testing to having a test project in 60 seconds.
This video use the sample Workshop project to unit test the Person class. The test project is built and run to show 2 (initial) failing test cases in the SafetyNet UI test monitor. It's done on Windows to demonstrate the ability of creating a Visual Studio project with no effort.
You can create your own observers and register it with the unit test framework.
SafetyNet is hosted on Atlassian bitbucket:
Make sure to read the README in the project root folder, it has everything you will need to build and use the software.
You can refer to the SafetyNet documentation for details on how to write a unit test class. It is recommend doing a single light reading. Once you understand the structure you can use the utgen to generate test code and a test project. In no time you will be cranking out testing code and the boss will think you're awesome!
If you need to view the SafetyNet document at anytime, type the following at the prompt and it will open a web-brower with the latest SafetyNet document"
The gen script help page, using the command syntax and basic usage.
If you watched the workshop video and want to know how to create test projects for non-cmake projects then you want to read, Workshop Exercise for non CMake projects.
How to turn your CMake project into a VisualStudio or CodeBlocks project. This document shows you how to use the gen script to do exactly this.
Creating IDE Projects
This Workshop sidecast will quickly run you through the process of taking an existing project and creating a test project for it and adding test cases.
This video shows how quickly you can create a unit test project, built it, and run the test cases automatically afterwords.
Send me a email, I'd like to hear from you. If you'd like to get involved with the project, we're always looking for help!