Login | Register
My pages Projects Community openCollabNet
[ Installation ] [ Recording and Running ] [ Editing ] [ Recipes ] Command Line

Command Line

Sample scripts maxq and maxq.bat are provided in the bin directory for your convenience. Feel free to modify these scripts to suite your needs (e.g. set PATH or CLASSPATH as needed).

Unix:
maxq [-p port] [-a python_include_path] [-q] [-d] [-u url1 url2] [-r] [test1.py ...]

Windows:
maxq.bat [-p port] [-a python_include_path] [-q] [-d] [-u url1 url2] [-r] [test1.py ...]

Running maxq (UNIX) or maxq.bat (Windows) with no arguments will start the MaxQ GUI, and start the proxy server running on port 8090.

Options:

option example purpose
test ...
test1.py
A MaxQ test script to load (or run, see -r).
-p
--port
-p 8000
Specifies the port the HTTP proxy should listen on. If not specified then MaxQ will listen on port 8090.
-q
--quiet
-q
quiet mode. only useful in conjunction with -r. if present, MaxQ will only generate output if a test fails. useful if you want to supress output for running tests from a cron job.
-d
--debug
-d
debug mode. only used when recording a new test. will output some debugging information about which URLs have been recorded by the proxy. this is primarily useful when reporting bugs in MaxQ to me, but you're welcome to turn it on if you want to see what URLs are being trapped by the proxy.
-u url1 url2
--urlreplace url1 url2
-u localhost:8000
stage.myhost.com
replaces url1 with url2 during get/post calls during test playback. this is useful when you are recording your test against your local workstation during development, but would like to run the test suite against a different target server (e.g. your staging server). this is a simple string search/replace. it is case sensitive. this flag is only useful when running back tests with the -r option.
-r
--run
-r
Runs the test scripts immediately, without the GUI. When this option is present multiple tests may be included on the command line.
-a dir
--path dir
-a jython-2.1/Lib
Adds a directory to the Jython interpreter's search path. This is useful for including the full Jython libraries from a Jython installation, or if you have written some of your own libraries. You can also set python.path in conf/maxq.properties.
-i pattern ...
--include-get-patterns
pattern ...
-i *.htm
Regular expressions that tell MaxQ which URLs to record. If missing then all URLs will be recorded. This option only affects GET requests.
-e pattern ...
--exclude-get-patterns
pattern ...
-i *.htm
Regular expressions that tell MaxQ which URLs not to record. If missing then all URLs will be recorded. This option only affects GET requests.
-g arg
--script-arg arg
-g bozo
Use this to pass any single argument to your test script. The script can get it via self.scriptArg().