Package jp.vmi.junit.result
Class JUnitResult
- java.lang.Object
-
- jp.vmi.junit.result.JUnitResult
-
public final class JUnitResult extends Object
Record and output test-suite & test-case results.It expected that this is parsed by Jenkins.
-
-
Field Summary
Fields Modifier and Type Field Description static StringFAILSAFE_SUMMARY_FILENAMEfilename of failsafe-summary.
-
Constructor Summary
Constructors Constructor Description JUnitResult()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddProperty(ITestSuite testSuite, String name, String value)Add property in test-suite.voidendTestCase(ITestCase testCase)End test-case.voidendTestSuite(ITestSuite testSuite)End test-suite.voidgenerateFailsafeSummary()Generate "failsafe-summary.xml" into XML result directory.protected voidmkdirs()voidsetCommandLineArgs(String[] args)Set command line arguments.voidsetDir(String dir)Set XML result directory.voidsetError(ITestCase testCase, String message, String trace)Set error in test-case.voidsetFailure(ITestCase testCase, String message, String trace)Set failure in test-case.voidsetSuccess(ITestCase testCase)Set success.voidstartTestCase(ITestTarget testTarget, ITestCase testCase)Start test-case.voidstartTestSuite(ITestSuite testSuite)Start test-suite.
-
-
-
Field Detail
-
FAILSAFE_SUMMARY_FILENAME
public static final String FAILSAFE_SUMMARY_FILENAME
filename of failsafe-summary.- See Also:
- Constant Field Values
-
-
Method Detail
-
setCommandLineArgs
public void setCommandLineArgs(String[] args)
Set command line arguments.- Parameters:
args- command line arguments.
-
setDir
public void setDir(String dir)
Set XML result directory.- Parameters:
dir- XML result directory.
-
mkdirs
protected void mkdirs()
-
startTestSuite
public void startTestSuite(ITestSuite testSuite)
Start test-suite.- Parameters:
testSuite- test-suite instance.
-
endTestSuite
public void endTestSuite(ITestSuite testSuite)
End test-suite.- Parameters:
testSuite- test-suite instatnce.
-
addProperty
public void addProperty(ITestSuite testSuite, String name, String value)
Add property in test-suite.- Parameters:
testSuite- test-suite instatnce.name- property name.value- property value.
-
startTestCase
public void startTestCase(ITestTarget testTarget, ITestCase testCase)
Start test-case.- Parameters:
testTarget- test-suite or test-case instance.testCase- test-case instance.
-
endTestCase
public void endTestCase(ITestCase testCase)
End test-case.- Parameters:
testCase- test-case instance.
-
setSuccess
public void setSuccess(ITestCase testCase)
Set success.- Parameters:
testCase- test-case instance.
-
setError
public void setError(ITestCase testCase, String message, String trace)
Set error in test-case.- Parameters:
testCase- test-case instance.message- error message.trace- error trace.
-
setFailure
public void setFailure(ITestCase testCase, String message, String trace)
Set failure in test-case.- Parameters:
testCase- test-case instance.message- error message.trace- error trace.
-
generateFailsafeSummary
public void generateFailsafeSummary()
Generate "failsafe-summary.xml" into XML result directory.
-
-