diff --git a/lib/python/rats.py b/lib/python/rats.py
index 3adda31..03b2148 100644
--- a/lib/python/rats.py
+++ b/lib/python/rats.py
@@ -61,48 +61,32 @@ def report_results(testlist, keyvals, url=None, username='', password=''):
         # TODO: handle other statuses (e.g. WARN)
         irb.send_request('/add_result', auth=True, req_params=params)
 
-def parse_args():
+class RatsOptionParser(optparse.OptionParser):
+
+    def __init__(self, *args, **kwargs):
+        optparse.OptionParser.__init__(self, *args, **kwargs)
+
+        # RATS-specific options
+        self.set_usage("%prog [options] TREEURL")
+
     archlist = ['i386', 'x86_64', 'ppc']
-    parser = optparse.OptionParser(usage="%prog [options] TREEURL")
-    parser.add_option("-a", "--arch", action="store", type="choice",
+        self.add_option("-a", "--arch", action="store", type="choice",
         choices=archlist, default=util.get_basearch(),
         help="target architecture (%default)")
-    parser.add_option("-s", "--scratchdir", action="store",
+        self.add_option("-s", "--scratchdir", action="store",
         default=config.scratchdir,
         help="scratch dir for downloaded/generated files (%default)")
-    parser.add_option("-l", "--logdir", action="store",
+        self.add_option("-l", "--logdir", action="store",
         default=config.logdir,
         help="write logs to this dir (%default)")
-    parser.add_option("-b", "--bindir", action="store",
+        self.add_option("-b", "--bindir", action="store",
         default=config.bindir,
         help="binary dir - contains minimon, ks.cfg, etc. (%default)")
-    parser.add_option("-i", "--image-url", action="store",
-        default="",
-        help="Specify alternative URL for boot and install images")
-    parser.add_option("-x", "--extra-args", action="store",
-        default="",
-        help="Additional arguments to pass to the kernel booted from the specified TREEURL")
-    parser.add_option("-r", "--ram", action="store", type="int", dest="memory",
-        default=768,
-        help="Memory to allocate for guest instance in megabytes (default: %default)")
-    (opt, args) = parser.parse_args()
 
-    # Validate arguments
+    def check_values(self, values, args):
+
+        # Was a TREEURL supplied?
     if len(args) != 1:
         parser.error("incorrect number of arguments")
 
-    # Set the default URL prefix for all urlgrabber operations
-    url_prefix = opt.image_url or args[0]
-    if not url_prefix.endswith('/'):
-        url_prefix = url_prefix + '/'
-    util.grabber.opts.prefix = url_prefix
-
-    # Process TREEURL
-    baseurl = args[0]
-    if not baseurl.endswith('/'):
-        baseurl = baseurl + '/'
-
-    config.set_scratchdir(opt.scratchdir)
-    config.logdir = opt.logdir
-    config.bindir = opt.bindir
-    return (opt, baseurl)
+        return optparse.OptionParser.check_values(self, values, args)
diff --git a/tests/rats_install/install.py b/tests/rats_install/install.py
index c596239..ff6a692 100755
--- a/tests/rats_install/install.py
+++ b/tests/rats_install/install.py
@@ -27,6 +27,7 @@ import gzip
 import time
 import ConfigParser
 import re
+import optparse
 from subprocess import *
 from minimon import MinimonServer
 from autoqa import rats, util, config
@@ -324,15 +325,57 @@ def system_sanity():
         print msg
         return False
 
+def parse_args():
+    # establish install-specific command-line options
+    parser = rats.RatsOptionParser()
+
+    optgroup = optparse.OptionGroup(parser, "Installation Options")
+    optgroup.add_option("-i", "--image-url", action="store",
+        default="",
+        help="Specify alternative URL for boot and install images")
+    optgroup.add_option("-x", "--extra-args", action="store",
+        default="",
+        help="Additional arguments to pass to the kernel booted from the specified TREEURL")
+    optgroup.add_option("-r", "--ram", action="store", type="int", dest="memory",
+        default=768,
+        help="Memory to allocate for guest instance in megabytes (default: %default)")
+    parser.add_option_group(optgroup)
+
+    # Process command-line arguments
+    (opt, args) = parser.parse_args()
+
+    # Process TREEURL
+    baseuri = args[0]
+    if not baseuri.endswith('/'):
+        baseuri = baseuri + '/'
+
+    # Process IMAGEURL
+    url_prefix = opt.image_url or baseuri
+    if not url_prefix.endswith('/'):
+        url_prefix = url_prefix + '/'
+
+    # Set the default URL prefix for future urlgrabber operations
+    util.grabber.opts.prefix = url_prefix
+
+    config.set_scratchdir(opt.scratchdir)
+    config.logdir = opt.logdir
+    config.bindir = opt.bindir
+    return (opt, baseuri)
+
 #http://fedoraproject.org/wiki/QA:Rawhide_Acceptance_Test_Plan#Installability_2
 if __name__ == '__main__':
-    (opt, baseuri) = rats.parse_args()
+
+    # Process command-line arguments
+    (opt, baseuri) = parse_args()
+
+    # Environment sanity checks
     if not os.getuid() == 0:
         print "ERROR: this can't be run as a normal user (yet)"
         sys.exit(1)
     if not system_sanity():
         sys.exit(1)
 
+    # Start testing
     print "== installer image sanity test =="
     timestamp = util.test("images", installer_image_test(opt.arch))
     util.write_keyval("treeinfo_timestamp", timestamp)
diff --git a/tests/rats_sanity/sanity.py b/tests/rats_sanity/sanity.py
index 1e6deeb..e132b78 100755
--- a/tests/rats_sanity/sanity.py
+++ b/tests/rats_sanity/sanity.py
@@ -149,8 +149,27 @@ def critpath_integrity_test(critpath_pkgs):
             all_ok = False
     return all_ok
 
+def parse_args():
+
+    # Process command-line arguments
+    parser = rats.RatsOptionParser()
+    (opt, args) = parser.parse_args()
+
+    # Process TREEURL
+    baseuri = args[0]
+    if not baseuri.endswith('/'):
+        baseuri = baseuri + '/'
+
+    # Set the default URL prefix for future urlgrabber operations
+    util.grabber.opts.prefix = baseuri
+
+    config.set_scratchdir(opt.scratchdir)
+    config.logdir = opt.logdir
+    config.bindir = opt.bindir
+    return (opt, baseuri)
+
 if __name__ == '__main__':
-    (opt, baseuri) = rats.parse_args()
+    (opt, baseuri) = parse_args()
 
     my = yum.YumBase()
     if opt.arch != util.get_basearch():
