SafetyNet - Test Driven Development

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.

Current Version 5.3 (Feb 9, 2012)

BinarySizeSystem
libSafetyNet.so74.9 KBLinux
GUI Test Monitor38.0 KBLinux
SafetyNet.DLL52 KBWindows
GUI Test Monitor90 KBWindows

Building SafetyNet is as simple as a single command:

./build
Every attempt has been made to keep things simple so you can hit the ground running. Updates to the software are as easy as GIT pull and build.

SafetyNet comes with sample code and a workshop exercise to have you quickly writting unit test for all your projects.

Lightening Fast Unit Test Creation!

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.

Features

You can create your own observers and register it with the unit test framework.

Download

SafetyNet is hosted on Atlassian bitbucket:
https://bitbucket.org/devmentorlabs/safetynet

git clone https://devmentorlabs@bitbucket.org/devmentorlabs/safetynet.git

Make sure to read the README in the project root folder, it has everything you will need to build and use the software.

How to setup SafetyNet

Documents

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"

./gen doc
./gen help

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

Workshop Slidecast

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.

Workshop Demo on Linux

This video shows how quickly you can create a unit test project, built it, and run the test cases automatically afterwords.

Contact

Rajinder Yadav <safetynet@devmentor.org>

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!