Package io.karatelabs.core
Class SuiteResult
java.lang.Object
io.karatelabs.core.SuiteResult
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidlonglongGet all error messages from failed scenarios.Get list of failed features.intintintintintintPass rate as an integer percentage 0–100, or null when no scenarios executed.intlonglongGet sum of all scenario execution times (thread time).booleanisDryRun()True when this suite ran parse-only — nothing was executed, so no result here is evidence.booleanisFailed()booleanbooleanisPassed()voidPrint a summary of the test results to the console.voidprintSummary(String env, int threadCount) Print a summary of the test results to the console.voidsetDryRun(boolean dryRun) voidsetEndTime(long endTime) voidsetHtmlReportEnabled(boolean htmlReportEnabled) voidsetReportDir(Path reportDir) voidsetStartTime(long startTime) The counters alone — no per-feature payload.toJson()
-
Constructor Details
-
SuiteResult
public SuiteResult()
-
-
Method Details
-
setStartTime
public void setStartTime(long startTime) -
setEndTime
public void setEndTime(long endTime) -
getStartTime
public long getStartTime() -
getEndTime
public long getEndTime() -
setReportDir
-
getReportDir
-
setHtmlReportEnabled
public void setHtmlReportEnabled(boolean htmlReportEnabled) -
setDryRun
public void setDryRun(boolean dryRun) -
isDryRun
public boolean isDryRun()True when this suite ran parse-only — nothing was executed, so no result here is evidence. -
isHtmlReportEnabled
public boolean isHtmlReportEnabled() -
addFeatureResult
-
getFeatureResults
-
getFeatureCount
public int getFeatureCount() -
getFeaturePassedCount
public int getFeaturePassedCount() -
getFeatureFailedCount
public int getFeatureFailedCount() -
getScenarioCount
public int getScenarioCount() -
getScenarioPassedCount
public int getScenarioPassedCount() -
getScenarioFailedCount
public int getScenarioFailedCount() -
getScenarioSkippedCount
public int getScenarioSkippedCount() -
getScenarioPassedRate
Pass rate as an integer percentage 0–100, or null when no scenarios executed. Denominator isscenariosPassed + scenariosFailed— matchesFeatureResult.getPassedRate()and the HTML report's totals row. -
isPassed
public boolean isPassed() -
isFailed
public boolean isFailed() -
getDurationMillis
public long getDurationMillis() -
toJson
-
summaryJson
The counters alone — no per-feature payload.Split out because the
SUITE_EXITevent carries this, nottoJson(). The heavy payload lands exactly once, onFEATURE_EXIT, which docs/DESIGN.md calls a load-bearing rule rather than an accident: duplicating every scenario and step onto the closing event doubles the bytes on the wire and forces every receiver to de-duplicate. A 350,000-scenario run makes the point — the duplicate was a second copy of the whole suite, on one line. -
toJsonString
-
toJsonPretty
-
printSummary
public void printSummary()Print a summary of the test results to the console. -
printSummary
Print a summary of the test results to the console.- Parameters:
env- the karate environment (may be null)threadCount- number of threads used
-
getThreadTimeMillis
public long getThreadTimeMillis()Get sum of all scenario execution times (thread time). -
getFailedFeatures
Get list of failed features. -
getErrors
Get all error messages from failed scenarios.
-