Class TestSuite
- java.lang.Object
-
- com.atlassian.confluence.renderer.radeox.macros.junit.report.TestSuite
-
public class TestSuite extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static StringREPORT_DETAIL_ALLstatic StringREPORT_DETAIL_FAILURES_ONLYstatic StringREPORT_DETAIL_PER_FIXTUREstatic StringREPORT_DETAIL_SUMMARY
-
Constructor Summary
Constructors Constructor Description TestSuite(TestReport report)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.servlet.http.HttpServletRequestgetCurrentRequest()Returns the current page requestStringgetCurrentRequestUrl()Retrieves the full URL including parameters for the current requestTestReportgetReport()StringgetReportDetail()Determines how much detail is shown in the reportWritergetWriter()The writer to use with this test suitebooleanisDebug()booleanisRunningSuite()booleanisStopOnException()booleanisStopRunning()voidonDebug(String nodeText, String message)Records a debug message in the reportvoidonException(String nodeText, String message, Throwable exception)Records an exception in the reportvoidonFailure(String nodeText, String actualValue, String message)Records a test failure in the reportvoidonPass(String nodeText, String message)Records a test pass in the reportvoidsetCurrentRequest(javax.servlet.http.HttpServletRequest currentRequest)Sets the current page requestvoidsetDebug(boolean debug)voidsetReport(TestSuiteReport report)Sets the current suite reportvoidsetReportDetail(String reportDetail)Determines how much detail is shown in the reportvoidsetStopOnException(boolean stopOnException)voidsetStopRunning(boolean stopRunning)voidsetWriter(Writer writer)Sets the writer used by this test suite
-
-
-
Field Detail
-
REPORT_DETAIL_ALL
public static final String REPORT_DETAIL_ALL
- See Also:
- Constant Field Values
-
REPORT_DETAIL_PER_FIXTURE
public static final String REPORT_DETAIL_PER_FIXTURE
- See Also:
- Constant Field Values
-
REPORT_DETAIL_SUMMARY
public static final String REPORT_DETAIL_SUMMARY
- See Also:
- Constant Field Values
-
REPORT_DETAIL_FAILURES_ONLY
public static final String REPORT_DETAIL_FAILURES_ONLY
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
TestSuite
public TestSuite(TestReport report)
-
-
Method Detail
-
getWriter
public Writer getWriter()
The writer to use with this test suite- Returns:
- the current writer
-
setWriter
public void setWriter(Writer writer)
Sets the writer used by this test suite- Parameters:
writer- the writer to use
-
getReport
public TestReport getReport()
- Returns:
- the current suite Report
-
setReport
public void setReport(TestSuiteReport report)
Sets the current suite report- Parameters:
report- the current suite report
-
isRunningSuite
public boolean isRunningSuite()
- Returns:
- true is a test suite is being run or false otherwise
-
isDebug
public boolean isDebug()
-
setDebug
public void setDebug(boolean debug)
-
onException
public void onException(String nodeText, String message, Throwable exception)
Records an exception in the report- Parameters:
nodeText- the current cell on the tablemessage- a message to record with the exceptionexception- the exception to record
-
onFailure
public void onFailure(String nodeText, String actualValue, String message)
Records a test failure in the report- Parameters:
nodeText- the current cell text on the tableactualValue- the value that was returned from the executionmessage- a message to record with the failure
-
onPass
public void onPass(String nodeText, String message)
Records a test pass in the report- Parameters:
nodeText- the current cell text on the tablemessage- a message to record with the pass
-
onDebug
public void onDebug(String nodeText, String message)
Records a debug message in the report- Parameters:
nodeText- the current cell text on the tablemessage- a message to record with the pass
-
getReportDetail
public String getReportDetail()
Determines how much detail is shown in the report- Returns:
- one of the detail levels, either REPORT_DETAIL_ALL, REPORT_DETAIL_TEST_FIXTURE or REPORT_DETAIL_TEST_SUITE
-
setReportDetail
public void setReportDetail(String reportDetail)
Determines how much detail is shown in the report- Parameters:
reportDetail- ne of the detail levels, either REPORT_DETAIL_ALL, REPORT_DETAIL_TEST_FIXTURE or REPORT_DETAIL_TEST_SUITE
-
getCurrentRequest
public javax.servlet.http.HttpServletRequest getCurrentRequest()
Returns the current page request- Returns:
- the current page request
-
setCurrentRequest
public void setCurrentRequest(javax.servlet.http.HttpServletRequest currentRequest)
Sets the current page request
-
getCurrentRequestUrl
public String getCurrentRequestUrl()
Retrieves the full URL including parameters for the current request
-
isStopRunning
public boolean isStopRunning()
-
setStopRunning
public void setStopRunning(boolean stopRunning)
-
isStopOnException
public boolean isStopOnException()
-
setStopOnException
public void setStopOnException(boolean stopOnException)
-
-