From 781fbe4393a7f7323ece023c10a8d74094943e50 Mon Sep 17 00:00:00 2001 From: rhoerbe Date: Thu, 31 Jul 2014 15:41:09 +0200 Subject: [PATCH] clarified helptext on options -H, -i, etc. --- doc/howto.rst | 13 ++++++++++--- src/idp_test/__init__.py | 7 +++++-- src/sp_test/__init__.py | 7 +++++-- 3 files changed, 20 insertions(+), 7 deletions(-) diff --git a/doc/howto.rst b/doc/howto.rst index 618cc68..a3da557 100644 --- a/doc/howto.rst +++ b/doc/howto.rst @@ -221,7 +221,7 @@ Synopsis:: -c TD_CONFIG, --config Test driver configuration module at the current directory or the path specified with the -P option. Do not use relative paths or the .py filename extension -d, --debug Print debug information to stderr - -H, --prettyprint Human readable status output + -H, --prettyprint Status output as human readable python dictionary -h, --help show this help message and exit -J TT_CONFIG_FILE Test target configuration in JSON format -L, --log Print HTTP log information # TODO: update documentation @@ -232,7 +232,11 @@ Synopsis:: -t, --testpackage Module describing tests (e.g. idp_samlbase.py generated from repository) -Y, --pysamllog Print pySAML2 logs to stderr -Remember to generate the + Output on stdout is a JSON dicitionary containing the test summary (overwrite with -H). + Output to stderr is the log file + + +Remember to generate the test target's config file in json format from python. Running the script testing an SP @@ -241,7 +245,7 @@ Running the script testing an SP Synopsis:: $ sp_testdrv.py --help - usage: sp_testdrv.py [-h] [-d] [-C CA_CERTS] [-J TT_CONFIG_FILE] [-m] [-l] [-c TD_CONFIG] [oper] + usage: sp_testdrv.py [-h] [-H] [-d] [-C CA_CERTS] [-J TT_CONFIG_FILE] [-m] [-l] [-c TD_CONFIG] [oper] positional arguments: oper Which test to run (mandatory except for options -h, -l and -m) @@ -255,6 +259,7 @@ Synopsis:: with the -P option. Do not use relative paths or filename extension -d, --debug Print debug information to stderr -h, --help show this help message and exit + -H, --prettyprint Status output as human readable python dictionary -J TT_CONFIG_FILE Test target configuration in JSON format -L, --log Print HTTP log information # TODO: update documentation -l, --list List all the test flows as a JSON object @@ -264,6 +269,8 @@ Synopsis:: -t, --testpackage Module describing tests (e.g. sp_testbase.py generated from repository) -Y, --pysamllog Print pySAML2 logs to stderr + Output on stdout is a JSON dicitionary containing the test summary (overwrite with -H). + Output to stderr is the log file Examples :::::::: diff --git a/src/idp_test/__init__.py b/src/idp_test/__init__.py index f5829be..6e01710 100644 --- a/src/idp_test/__init__.py +++ b/src/idp_test/__init__.py @@ -131,8 +131,11 @@ class SAML2client(object): help="Tests") self._parser.add_argument("-Y", dest="pysamllog", action='store_true', help="Print PySAML2 logs") - self._parser.add_argument("-H", dest="pretty", action='store_true') - self._parser.add_argument("-i", dest="insecure", action='store_true') + self._parser.add_argument("-H", dest="pretty", action='store_true', + help="Output summary on stdout as pretty " + "printed python dict instead of JSON") + self._parser.add_argument("-i", dest="insecure", action='store_true', + help="Do not verify SSL certificate") self._parser.add_argument("oper", nargs="?", help="Which test to run") self.interactions = None diff --git a/src/sp_test/__init__.py b/src/sp_test/__init__.py index da73f3e..909142d 100644 --- a/src/sp_test/__init__.py +++ b/src/sp_test/__init__.py @@ -57,8 +57,11 @@ class Client(object): "no cert verification will be done")) self._parser.add_argument('-d', dest='debug', action='store_true', help="Print debug information") - self._parser.add_argument("-H", dest="pretty", action='store_true') - self._parser.add_argument("-i", dest="insecure", action='store_true') + self._parser.add_argument("-H", dest="pretty", action='store_true', + help="Output summary on stdout as pretty " + "printed python dict instead of JSON") + self._parser.add_argument("-i", dest="insecure", action='store_true', + help="Do not verify SSL certificate") self._parser.add_argument('-J', dest="json_config_file", help="Script configuration") self._parser.add_argument(