com.programix.testing
Class AbstractRegression
java.lang.Object
com.programix.testing.AbstractRegression
public abstract class AbstractRegression
- extends Object
Base class to extend to facilitate the creation of regression tests.
Subclasses implement the runBundles() method. Users of this
the subclass instantiate it and then call runTestsAsync() or
call runTests().
- Author:
- Paul Hyde
|
Method Summary |
int |
getFailCount()
|
int |
getRegressionCount()
|
int |
getThreadNameLength()
|
int |
getTimeFormatLength()
|
boolean |
isPrefixWithThreadName()
|
boolean |
isPrefixWithTime()
|
boolean |
joinUp(Thread thread,
long msTimeout)
|
protected void |
out(String msg)
|
protected void |
outln(Object msg)
|
protected void |
outln(String msg)
|
protected void |
outln(String msg,
BigDecimal result,
BigDecimal expectedResult)
Compares the BigDecimals without regard to scale differences. |
protected void |
outln(String msg,
boolean success)
|
protected void |
outln(String msg,
boolean result,
boolean expectedResult)
|
protected void |
outln(String msg,
byte[] result,
byte[] expectedResult)
|
protected void |
outln(String msg,
double result,
double expectedResult,
double tolerance)
|
protected void |
outln(String msg,
int[] result,
int[] expectedResult)
|
protected void |
outln(String msg,
int result,
int expectedResult)
|
protected void |
outln(String msg,
int result,
int expectedResult,
int tolerance)
|
protected void |
outln(String msg,
long result,
long expectedResult)
|
protected void |
outln(String msg,
long result,
long expectedResult,
long tolerance)
|
protected void |
outln(String msg,
Object[] result,
Object[] expectedResult)
|
protected void |
outln(String msg,
Object result,
Object expectedResult)
|
protected void |
outln(String msg,
String result,
String expectedResult)
|
protected void |
outlnName(String msg)
|
protected void |
outlnName(String msg,
boolean success)
|
protected void |
outName(String msg)
|
protected void |
printStackTrace(Exception x)
|
protected abstract void |
runBundles()
|
void |
runTests()
|
void |
runTestsAsync()
Starts up a background helper thread and has it call runTests(); |
void |
setOutput(Output output)
|
void |
setPrefixWithThreadName(boolean prefixWithThreadName)
|
void |
setPrefixWithTime(boolean prefixWithTime)
|
void |
setThreadNameLength(int threadNameLength)
|
void |
setTimeFormatLength(int timeFormatLength)
|
static String[] |
stackTraceToStrings(Exception x)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractRegression
protected AbstractRegression()
setOutput
public void setOutput(Output output)
getFailCount
public int getFailCount()
getRegressionCount
public int getRegressionCount()
isPrefixWithThreadName
public boolean isPrefixWithThreadName()
setPrefixWithThreadName
public void setPrefixWithThreadName(boolean prefixWithThreadName)
getThreadNameLength
public int getThreadNameLength()
setThreadNameLength
public void setThreadNameLength(int threadNameLength)
isPrefixWithTime
public boolean isPrefixWithTime()
setPrefixWithTime
public void setPrefixWithTime(boolean prefixWithTime)
getTimeFormatLength
public int getTimeFormatLength()
setTimeFormatLength
public void setTimeFormatLength(int timeFormatLength)
throws IllegalArgumentException
- Throws:
IllegalArgumentException
out
protected void out(String msg)
outln
protected void outln(String msg)
outln
protected void outln(Object msg)
outln
protected void outln(String msg,
boolean success)
outln
protected final void outln(String msg,
boolean result,
boolean expectedResult)
outln
protected final void outln(String msg,
Object result,
Object expectedResult)
outln
protected final void outln(String msg,
String result,
String expectedResult)
outln
protected final void outln(String msg,
BigDecimal result,
BigDecimal expectedResult)
- Compares the BigDecimals without regard to scale differences.
outln
protected final void outln(String msg,
int result,
int expectedResult)
outln
protected final void outln(String msg,
int result,
int expectedResult,
int tolerance)
outln
protected final void outln(String msg,
long result,
long expectedResult)
outln
protected final void outln(String msg,
long result,
long expectedResult,
long tolerance)
outln
protected final void outln(String msg,
double result,
double expectedResult,
double tolerance)
outln
protected final void outln(String msg,
Object[] result,
Object[] expectedResult)
outln
protected final void outln(String msg,
byte[] result,
byte[] expectedResult)
outln
protected final void outln(String msg,
int[] result,
int[] expectedResult)
outName
protected void outName(String msg)
outlnName
protected void outlnName(String msg)
outlnName
protected void outlnName(String msg,
boolean success)
printStackTrace
protected void printStackTrace(Exception x)
stackTraceToStrings
public static String[] stackTraceToStrings(Exception x)
joinUp
public boolean joinUp(Thread thread,
long msTimeout)
throws InterruptedException
- Throws:
InterruptedException
runTestsAsync
public final void runTestsAsync()
- Starts up a background helper thread and has it call runTests();
runTests
public final void runTests()
runBundles
protected abstract void runBundles()
throws Exception
- Throws:
Exception
Copyright © 2001-2009
Programix Incorporated.
All rights reserved.
ProgramixGenericLib is free
and is
OSI Certified
Open Source Software under the BSD
license.