All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.serenitybdd.reports.model.ResultsCount.kt Maven / Gradle / Ivy

package net.serenitybdd.reports.model

import net.thucydides.model.domain.TestResult
import net.thucydides.model.reports.TestOutcomes
import net.thucydides.model.reports.html.ResultCounts

fun countByResultLabelFrom(testOutcomes: TestOutcomes): Map {
    return TestResult.values().associate { result ->
        Pair(
            result.toString(),
            ResultCounts.forOutcomesIn(testOutcomes).getOverallTestCount(result.toString())
        )
    }
}

fun percentageByResultLabelFrom(testOutcomes: TestOutcomes): Map {
    return TestResult.values().associate { result ->
        Pair(result.toString(), ResultCounts.forOutcomesIn(testOutcomes).getOverallTestPercentage(result.toString()))
    }
}

fun percentageByResultFrom(testOutcomes: TestOutcomes): Map {
    return TestResult.values().associate { result ->
        Pair(result.toString(), ResultCounts.forOutcomesIn(testOutcomes).getPreciseTestPercentage(result.toString()))
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy