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

com.teamscale.config.extension.TeamscaleTestTaskExtension.kt Maven / Gradle / Ivy

Go to download

A Gradle plugin that supports collecting Testwise Coverage and uploading reports to Teamscale.

There is a newer version: 29.0.0
Show newest version
package com.teamscale.config.extension

import com.teamscale.config.JUnitReportConfiguration
import groovy.lang.Closure
import org.gradle.api.Action
import org.gradle.api.Project
import org.gradle.api.tasks.testing.Test
import java.io.Serializable

/**
 * Holds all user configuration for the teamscale plugin.
 */
open class TeamscaleTestTaskExtension(
    val project: Project,
    private val test: Test
) : Serializable {

    var report = JUnitReportConfiguration(project, test)

    /** Configures the reports to be uploaded. */
    fun report(action: Action) {
        test.reports.junitXml.required.set(true)
        action.execute(report)
    }

    /** Overload for Groovy DSL compatibility. */
    fun report(closure: Closure<*>) {
        report { o -> project.configure(o, closure) }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy