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

net.serenitybdd.reports.json.JsonSummaryReport.kt Maven / Gradle / Ivy

There is a newer version: 4.2.1
Show newest version
package net.serenitybdd.reports.json

import net.serenitybdd.reports.configuration.*
import net.thucydides.model.ThucydidesSystemProperty.*
import java.nio.file.Path


/**
 * A utility class that provides information about report configuration, as provided in the configuration files
 * or via environment variables.
 */
sealed class JsonSummaryReport {

    companion object {

        private const val DEFAULT_OUTPUT_DIRECTORY = "target/site/serenity"
        private const val DEFAULT_TITLE = "Serenity Summary Report"
        private const val DEFAULT_TAGTYPE_TITLE = "Category"
        private const val DEFAULT_TEMPLATE = "templates/json-summary.ftl"
        private const val DEFAULT_SCOREBOARD_SIZE= 5

        fun outputDirectory() : ReportProperty = ConfiguredOutputDirectoryProperty()

        fun reportTitle() : ReportProperty = StringReportProperty(SERENITY_SUMMARY_REPORT_TITLE, DEFAULT_TITLE)

        fun reportLink() : ReportProperty = StringReportProperty(SERENITY_REPORT_URL, "")

        fun tagCategoryTitle() : ReportProperty = StringReportProperty(REPORT_TAGTYPE_TITLE, DEFAULT_TAGTYPE_TITLE)

        fun scoreboardSize() : ReportProperty = IntReportProperty(REPORT_SCOREBOARD_SIZE, DEFAULT_SCOREBOARD_SIZE)

        fun template() : ReportProperty = TemplateFileProperty(DEFAULT_TEMPLATE)

        fun showFullTestResults() : ReportProperty = BooleanReportProperty(SHOW_FULL_TEST_RESULTS, true)

        fun tagTypes() : ReportProperty> = ReportTagTypeProperty()

    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy