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

com.teamscale.test_impacted.test_descriptor.JUnitJupiterTestDescriptorResolver Maven / Gradle / Ivy

Go to download

A JUnit 5 engine that handles retrieving impacted tests from Teamscale and organizes their execution

There is a newer version: 34.2.0
Show newest version
package com.teamscale.test_impacted.test_descriptor;

import org.junit.platform.engine.TestDescriptor;
import org.junit.platform.engine.TestEngine;

import java.util.Optional;

/** Test default test descriptor resolver for the JUnit jupiter {@link TestEngine}. */
public class JUnitJupiterTestDescriptorResolver extends JUnitClassBasedTestDescriptorResolverBase {

	/** The segment type name that the jupiter engine uses for the class descriptor nodes. */
	public static final String CLASS_SEGMENT_TYPE = "class";

	/** The segment type name that the jupiter engine uses for the method descriptor nodes. */
	public static final String METHOD_SEGMENT_TYPE = "method";

	/** The segment type name that the jupiter engine uses for the test factory method descriptor nodes. */
	public static final String TEST_FACTORY_SEGMENT_TYPE = "test-factory";

	/** The segment type name that the jupiter engine uses for the test template descriptor nodes. */
	public static final String TEST_TEMPLATE_SEGMENT_TYPE = "test-template";

	/** The segment type name that the jupiter engine uses for dynamic test descriptor nodes. */
	public static final String DYNAMIC_TEST_SEGMENT_TYPE = "dynamic-test";

	@Override
	protected Optional getClassName(TestDescriptor testDescriptor) {
		return TestDescriptorUtils.getUniqueIdSegment(testDescriptor, CLASS_SEGMENT_TYPE);
	}

	@Override
	public String getEngineId() {
		return "junit-jupiter";
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy