Software Testing for Sysadmin Programs
Thurgood Marshall North
This tutorial will focus on how to incorporate testing into the software that sysadmins develop. Programs typically written by sysadmins tend to be less amenable to testing for a variety of reasons: choice of language, lack of "OO-ness," and heavy interaction with "system programs" (things like "mount" and "df"). This class will address these issues and show ways to incorporate testing into existing programs without having to rewrite them; it will also demonstrate how to use testing when developing new programs when "going OO" isn't an option. The session will consist of lecture, discussion, and hands-on exercises.
System administrators of any level with at least some experience writing programs in pretty much any scripting language language (Python, Ruby, Perl, Bash, or Groovy).
- An understanding of software testing and test-driven development, and how to incorporate these concepts into system administration
- Suggestions for making future programs more testable
- Exposure to a testing framework (Maven plus Spock)
- Experience developing basic unit tests
- Some exposure to simple "mocking" techniques
Motivation and benefits
- Why use testing
- Why testing is needed
- How it can help
- Why it's not as difficult as people think
Basic testing
"Mocks" (or "Mocking")
connect with us