Package org.citrusframework.report
Class TestResults
java.lang.Object
org.citrusframework.report.TestResults
Multiple
TestResult instances combined to a TestResults.- Author:
- Christoph Deppisch
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceCallback interface for synchronized access to test results in iteration. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddResult(TestResult result) Adds a test result to the result list.asList()Provides access to results as list generated from synchronized result list.voiddoWithResults(TestResults.ResultCallback callback) Provides synchronized access to all test results in iteration.intGet number of tests failed.Calculates percentage of failed tests.intgetSize()Gets the total amount of test results.intGet number of skipped tests.Calculates percentage of skipped tests.intGet number of tests in success.Calculates percentage of success tests.
-
Constructor Details
-
TestResults
public TestResults()
-
-
Method Details
-
asList
Provides access to results as list generated from synchronized result list.- Returns:
-
addResult
Adds a test result to the result list.- Parameters:
result-- Returns:
-
doWithResults
Provides synchronized access to all test results in iteration.- Parameters:
callback-
-
getSuccess
public int getSuccess()Get number of tests in success.- Returns:
-
getSuccessPercentage
Calculates percentage of success tests.- Returns:
-
getFailed
public int getFailed()Get number of tests failed.- Returns:
-
getFailedPercentage
Calculates percentage of failed tests.- Returns:
-
getSkipped
public int getSkipped()Get number of skipped tests.- Returns:
-
getSkippedPercentage
Calculates percentage of skipped tests.- Returns:
-
getSize
public int getSize()Gets the total amount of test results.- Returns:
-