public abstract class BaseTest extends java.lang.Object implements Test
Test
. Calling run(String[])
calls all of the methods necessary to execute the test, some of which
must be overridden by subclasses. This includes a system of parsing command line arguments using JCommander.Modifier and Type | Field and Description |
---|---|
boolean |
help |
java.lang.String |
testName
A unique name for each test.
|
SETUP_ERROR, SUCCESS, TEST_ERROR, TIMEOUT
Constructor and Description |
---|
BaseTest(java.lang.String testName) |
Modifier and Type | Method and Description |
---|---|
int |
getExitCode() |
void |
parseCommandLine(java.lang.String[] args)
Parse the command line arguments to properly configure the test.
|
void |
printOptions()
Print the configured test options.
|
abstract void |
printTestOptions()
Print the command line options for this specific test.
|
abstract void |
printTestReport()
Print statistics unique to this particular test.
|
void |
report()
Reports statistics on the current test.
|
int |
run(java.lang.String[] args)
Executes the test.
|
void |
setTestName(java.lang.String testName)
Set the unique name of this test.
|
public boolean help
public java.lang.String testName
public abstract void printTestReport()
public abstract void printTestOptions()
public void setTestName(java.lang.String testName)
testName
- The name of the test.public int run(java.lang.String[] args)
args
- Command line arguments.public void parseCommandLine(java.lang.String[] args) throws java.lang.Exception
Test
parseCommandLine
in interface Test
args
- The command line arguments.java.lang.Exception
- if there is a problem parsing the options.public void printOptions()
Test
printOptions
in interface Test
public void report()
Test
printTestReport()
so the test can report statistics specific to the test.public int getExitCode()