ambled/weave-test-java — pull request #1 by ambled (2012-10-02 01:09:02+00:00)
Title: create cli-test feature branch

This feature will be used to define a base set of unit tests and then a command line client that passes. This will be used to test against multiple JVM's

Requirements:
java > = 1.6

command arguments:
pcCPU: double, required, 0 < X < 1
When to throttle usage based on CPU
pcBW: double, required, 0 < X < 1
When to throttle usage based on Bandwidth
maxThreads: integer, optional, default=1, 1 <= X
Maximum threads to use, 1 per CPU
maxExec: integer, optional, default=600
Max run time, in seconds, default = 5 minutes
clientId: string, optional, length 1-40, ALPHANUM
Alphanumeric string to group results

TESTS:
======

pcCPU:
option-not-set, fail INVALIDPARAMETER
x=null, fail INVALIDPARAMETER
x=!(NUM), fail INVALIDPARAMETER
x=0, fail INVALIDPARAMETER
x=1, fail INVALIDPARAMETER
x < 0, fail INVALIDPARAMETER
x > 1, fail INVALIDPARAMETER
0 < x < 1, pass

pcBW:
option-not-set, fail INVALIDPARAMETER
x=null, fail INVALIDPARAMETER
x=!(NUM), fail INVALIDPARAMETER
x=0, fail INVALIDPARAMETER
x=1, fail INVALIDPARAMETER
x < 0, fail INVALIDPARAMETER
x > 1, fail INVALIDPARAMETER
0 < x < 1, pass

maxThreads:
option-not-set, pass, default=1
x=null, fail INVALIDPARAMETER
x=!(NUM), fail INVALIDPARAMETER
x=0, fail INVALIDPARAMETER
x=1, fail INVALIDPARAMETER
x < 0, fail INVALIDPARAMETER
x > 1, fail INVALIDPARAMETER
0 < x < 1, pass

maxExec:
option-not-set, pass, default=600
x=null, fail INVALIDPARAMETER
x=!(NUM), fail INVALIDPARAMETER
x<15, fail INVALIDPARAMETER
x>15, pass

clientId:
option-not-set, pass, noDefault
x=null, fail INVALIDPARAMETER
length(x)=0, fail INVALIDPARAMETER
length(x)>40, fail INVALIDPARAMETER
length(filter(alphanum(x))!=length(x), fail INVALIDPARAMETER
0 < length(x) < 40, pass