Class SuiteResult

java.lang.Object
io.karatelabs.core.SuiteResult

public class SuiteResult extends Object
  • 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

      public void setReportDir(Path reportDir)
    • getReportDir

      public Path 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

      public void addFeatureResult(FeatureResult fr)
    • getFeatureResults

      public List<FeatureResult> 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

      public Integer getScenarioPassedRate()
      Pass rate as an integer percentage 0–100, or null when no scenarios executed. Denominator is scenariosPassed + scenariosFailed — matches FeatureResult.getPassedRate() and the HTML report's totals row.
    • isPassed

      public boolean isPassed()
    • isFailed

      public boolean isFailed()
    • getDurationMillis

      public long getDurationMillis()
    • toJson

      public Map<String,Object> toJson()
    • summaryJson

      public Map<String,Object> summaryJson()
      The counters alone — no per-feature payload.

      Split out because the SUITE_EXIT event carries this, not toJson(). The heavy payload lands exactly once, on FEATURE_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

      public String toJsonString()
    • toJsonPretty

      public String toJsonPretty()
    • printSummary

      public void printSummary()
      Print a summary of the test results to the console.
    • printSummary

      public void printSummary(String env, int threadCount)
      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

      public List<FeatureResult> getFailedFeatures()
      Get list of failed features.
    • getErrors

      public List<String> getErrors()
      Get all error messages from failed scenarios.