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 String
REPORT_DETAIL_ALL
static String
REPORT_DETAIL_FAILURES_ONLY
static String
REPORT_DETAIL_PER_FIXTURE
static String
REPORT_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.HttpServletRequest
getCurrentRequest()
Returns the current page requestString
getCurrentRequestUrl()
Retrieves the full URL including parameters for the current requestTestReport
getReport()
String
getReportDetail()
Determines how much detail is shown in the reportWriter
getWriter()
The writer to use with this test suiteboolean
isDebug()
boolean
isRunningSuite()
boolean
isStopOnException()
boolean
isStopRunning()
void
onDebug(String nodeText, String message)
Records a debug message in the reportvoid
onException(String nodeText, String message, Throwable exception)
Records an exception in the reportvoid
onFailure(String nodeText, String actualValue, String message)
Records a test failure in the reportvoid
onPass(String nodeText, String message)
Records a test pass in the reportvoid
setCurrentRequest(javax.servlet.http.HttpServletRequest currentRequest)
Sets the current page requestvoid
setDebug(boolean debug)
void
setReport(TestSuiteReport report)
Sets the current suite reportvoid
setReportDetail(String reportDetail)
Determines how much detail is shown in the reportvoid
setStopOnException(boolean stopOnException)
void
setStopRunning(boolean stopRunning)
void
setWriter(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)
-
-