---
# System's Administrator's Lab: Testing
**URL:** https://crunchtools.com/systems-administrators-lab-testing/
Date: 2010-11-12
Author: fatherlinux
Post Type: post
Summary: Today, I got an email from the Fedora package manager, Red, who let me know that there was a problem with Petit. I don’t think he knew it, but it was actually my fault that the whole thing got screwed up, so I felt kind of bad. Well, to make a long story short, whenContinue Reading "System’s Administrator’s Lab: Testing" →Continue Reading "System’s Administrator’s Lab: Testing" →
Categories: Articles
Tags: Best Practices, DevOps, Systems Administration
---
Today, I got an email from the Fedora package manager, [Red](http://fedoraproject.org/wiki/User:Red#Sandro_.22red.22_Mathys), who let me know that there was a problem with [Petit](http://crunchtools.com/software/petit/). I don't think he knew it, but it was actually my fault that the whole thing got screwed up, so I felt kind of bad. Well, to make a long story short, when I went to fix it, I realized I was most of the way through converting to Mercurial from Subversion and most of the way through converting my main library, Crunchtools, into a module in Python. Well, needless to say, I was now in a bind. I had broken pieces of all kinds of "what not" laying all around me. This is why I have added automated tests and tools like winpdb to my [Systems Administrator Lab](http://crunchtools.com/the-systems-administrators-lab/)
This is where testing comes in. Thankfully, when I first created Petit, I also created a suite of functional tests. The testing is actually fairly simple. It iterates a list of command line options passing each combination that I specify and records the output to a file. It then compares the output just received to the output of a known good state. If output changes, you can compare and figure out if you really wanted that to happen.
Well, so here is what happened to me. I ended up having to push forward and fix three bugs to get Petit working again. I iterated between which test failed and using [Winpdb](http://winpdb.org/) to fix the bugs and was able to fix bugs that never would have been caught without functional testing. I saved myself a lot of stress and time too. If you are interested, check the simple but effective tests, I added to petit under the [/test](https://code.google.com/p/petit-log/source/browse/#hg/petit/test) directory. So, when you are working in your [lab](http://crunchtools.com/the-systems-administrators-lab/), add testing to your tool belt.
---
## Categories
- Articles
---
## Navigation
- [Home](https://crunchtools.com/)
- [Articles](https://crunchtools.com/category/articles/)
- [Events](https://crunchtools.com/category/events/)
- [News](https://crunchtools.com/category/news/)
- [Presentations](https://crunchtools.com/category/presentations/)
- [Software](https://crunchtools.com/software/)
- [Beaver Backup](https://crunchtools.com/software/beaver-backup/)
- [Check BGP Neighbors](https://crunchtools.com/software/check-bgp-neighbors-nagios/)
- [Chev](https://crunchtools.com/software/chev-check-vulnerabilities-script/)
- [Graph BGP Neighbors](https://crunchtools.com/software/grpah-bgp-neighbors/)
- [Graph MySQL Stats](https://crunchtools.com/software/graph-mysql-stats/)
- [Graph Sockets Pipes Files](https://crunchtools.com/software/graph-sockets-pipes-files/)
- [MCP Servers](https://crunchtools.com/software/mcp-servers/)
- [Petit](https://crunchtools.com/software/petit/)
- [Racecar](https://crunchtools.com/software/racecar/)
- [Shiva](https://crunchtools.com/software/shiva/)
- [About](https://crunchtools.com/about/)
- [Home](https://crunchtools.com)
## Tags
- Best Practices
- DevOps
- Systems Administration