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

com.teamscale.maven.tia.TiaUnitTestMojo Maven / Gradle / Ivy

There is a newer version: 34.2.0
Show newest version
package com.teamscale.maven.tia;

import org.apache.maven.plugins.annotations.LifecyclePhase;
import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter;
import org.apache.maven.plugins.annotations.ResolutionScope;

/**
 * Instruments the Surefire unit tests and uploads testwise coverage to Teamscale.
 */
@Mojo(name = "prepare-tia-unit-test", defaultPhase = LifecyclePhase.INITIALIZE, requiresDependencyResolution = ResolutionScope.RUNTIME,
		threadSafe = true)
public class TiaUnitTestMojo extends TiaMojoBase {

	/**
	 * The partition to which to upload unit test coverage.
	 */
	@Parameter(defaultValue = "Unit Tests")
	public String partition;

	@Override
	protected String getPartition() {
		return partition;
	}

	@Override
	protected boolean isIntegrationTest() {
		return false;
	}

	@Override
	protected String getTestPluginArtifact() {
		return "org.apache.maven.plugins:maven-surefire-plugin";
	}

	@Override
	protected String getTestPluginPropertyPrefix() {
		return "surefire";
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy