haltOnFailure |
A value of true implies that build has to stop if any failure occurs in any of
diff --git a/src/etc/testcases/taskdefs/optional/junitlauncher.xml b/src/etc/testcases/taskdefs/optional/junitlauncher.xml
index 62043690e..e33f031d7 100644
--- a/src/etc/testcases/taskdefs/optional/junitlauncher.xml
+++ b/src/etc/testcases/taskdefs/optional/junitlauncher.xml
@@ -268,5 +268,70 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/junitlauncher/LauncherSupport.java b/src/main/org/apache/tools/ant/taskdefs/optional/junitlauncher/LauncherSupport.java
index 1155d09fc..2f17224de 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/junitlauncher/LauncherSupport.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/junitlauncher/LauncherSupport.java
@@ -18,6 +18,7 @@
package org.apache.tools.ant.taskdefs.optional.junitlauncher;
+
import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.MagicNames;
import org.apache.tools.ant.Project;
@@ -34,6 +35,7 @@ import org.junit.platform.engine.discovery.DiscoverySelectors;
import org.junit.platform.launcher.EngineFilter;
import org.junit.platform.launcher.Launcher;
import org.junit.platform.launcher.LauncherDiscoveryRequest;
+import org.junit.platform.launcher.TagFilter;
import org.junit.platform.launcher.TestExecutionListener;
import org.junit.platform.launcher.TestPlan;
import org.junit.platform.launcher.core.LauncherDiscoveryRequestBuilder;
@@ -463,6 +465,13 @@ public class LauncherSupport {
if (enginesToExclude != null && enginesToExclude.length > 0) {
requestBuilder.filters(EngineFilter.excludeEngines(enginesToExclude));
}
+ // add any tag filters
+ if (this.launchDefinition.getIncludeTags().size() > 0) {
+ requestBuilder.filters(TagFilter.includeTags(this.launchDefinition.getIncludeTags()));
+ }
+ if (this.launchDefinition.getExcludeTags().size() > 0) {
+ requestBuilder.filters(TagFilter.excludeTags(this.launchDefinition.getExcludeTags()));
+ }
}
private enum StreamType {
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/junitlauncher/StandaloneLauncher.java b/src/main/org/apache/tools/ant/taskdefs/optional/junitlauncher/StandaloneLauncher.java
index 090e8f16e..ea41c2985 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/junitlauncher/StandaloneLauncher.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/junitlauncher/StandaloneLauncher.java
@@ -39,18 +39,22 @@ import java.util.Collections;
import java.util.List;
import java.util.Optional;
import java.util.Properties;
+import java.util.stream.Stream;
import static javax.xml.stream.XMLStreamConstants.END_DOCUMENT;
import static javax.xml.stream.XMLStreamConstants.END_ELEMENT;
import static javax.xml.stream.XMLStreamConstants.START_DOCUMENT;
import static javax.xml.stream.XMLStreamConstants.START_ELEMENT;
+import static org.apache.tools.ant.taskdefs.optional.junitlauncher.confined.Constants.LD_XML_ATTR_EXCLUDE_TAGS;
import static org.apache.tools.ant.taskdefs.optional.junitlauncher.confined.Constants.LD_XML_ATTR_HALT_ON_FAILURE;
+import static org.apache.tools.ant.taskdefs.optional.junitlauncher.confined.Constants.LD_XML_ATTR_INCLUDE_TAGS;
import static org.apache.tools.ant.taskdefs.optional.junitlauncher.confined.Constants.LD_XML_ATTR_PRINT_SUMMARY;
import static org.apache.tools.ant.taskdefs.optional.junitlauncher.confined.Constants.LD_XML_ELM_LAUNCH_DEF;
import static org.apache.tools.ant.taskdefs.optional.junitlauncher.confined.Constants.LD_XML_ELM_LISTENER;
import static org.apache.tools.ant.taskdefs.optional.junitlauncher.confined.Constants.LD_XML_ELM_TEST;
import static org.apache.tools.ant.taskdefs.optional.junitlauncher.confined.Constants.LD_XML_ELM_TEST_CLASSES;
+
/**
* Used for launching forked tests from the {@link JUnitLauncherTask}.
*
@@ -140,6 +144,14 @@ public class StandaloneLauncher {
if (haltOnfFailure != null) {
forkedLaunch.setHaltOnFailure(Boolean.parseBoolean(haltOnfFailure));
}
+ final String includeTags = reader.getAttributeValue(null, LD_XML_ATTR_INCLUDE_TAGS);
+ if (includeTags != null) {
+ Stream.of(includeTags.split(",")).forEach(i -> forkedLaunch.addIncludeTag(i));
+ }
+ final String excludeTags = reader.getAttributeValue(null, LD_XML_ATTR_EXCLUDE_TAGS);
+ if (excludeTags != null) {
+ Stream.of(excludeTags.split(",")).forEach(e -> forkedLaunch.addExcludeTag(e));
+ }
final String printSummary = reader.getAttributeValue(null, LD_XML_ATTR_PRINT_SUMMARY);
if (printSummary != null) {
forkedLaunch.setPrintSummary(Boolean.parseBoolean(printSummary));
@@ -204,6 +216,8 @@ public class StandaloneLauncher {
private boolean haltOnFailure;
private List tests = new ArrayList<>();
private List listeners = new ArrayList<>();
+ private List includeTags = new ArrayList<>();
+ private List excludeTags = new ArrayList<>();
@Override
public List getTests() {
@@ -249,5 +263,23 @@ public class StandaloneLauncher {
public ClassLoader getClassLoader() {
return this.getClass().getClassLoader();
}
+
+ void addIncludeTag(final String filter) {
+ this.includeTags.add(filter);
+ }
+
+ @Override
+ public List getIncludeTags() {
+ return includeTags;
+ }
+
+ void addExcludeTag(final String filter) {
+ this.excludeTags.add(filter);
+ }
+
+ @Override
+ public List getExcludeTags() {
+ return excludeTags;
+ }
}
}
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/junitlauncher/confined/Constants.java b/src/main/org/apache/tools/ant/taskdefs/optional/junitlauncher/confined/Constants.java
index 53bc0dc2d..18c552c5f 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/junitlauncher/confined/Constants.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/junitlauncher/confined/Constants.java
@@ -36,6 +36,8 @@ public final class Constants {
public static final String LD_XML_ELM_TEST = "test";
public static final String LD_XML_ELM_TEST_CLASSES = "test-classes";
public static final String LD_XML_ATTR_HALT_ON_FAILURE = "haltOnFailure";
+ public static final String LD_XML_ATTR_INCLUDE_TAGS = "includeTags";
+ public static final String LD_XML_ATTR_EXCLUDE_TAGS = "excludeTags";
public static final String LD_XML_ATTR_OUTPUT_DIRECTORY = "outDir";
public static final String LD_XML_ATTR_INCLUDE_ENGINES = "includeEngines";
public static final String LD_XML_ATTR_EXCLUDE_ENGINES = "excludeEngines";
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/junitlauncher/confined/JUnitLauncherTask.java b/src/main/org/apache/tools/ant/taskdefs/optional/junitlauncher/confined/JUnitLauncherTask.java
index 654211e75..c880ffa72 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/junitlauncher/confined/JUnitLauncherTask.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/junitlauncher/confined/JUnitLauncherTask.java
@@ -41,12 +41,17 @@ import java.util.Collections;
import java.util.Hashtable;
import java.util.List;
import java.util.Properties;
+import java.util.StringTokenizer;
import java.util.concurrent.TimeoutException;
+import java.util.stream.Collectors;
+import static org.apache.tools.ant.taskdefs.optional.junitlauncher.confined.Constants.LD_XML_ATTR_EXCLUDE_TAGS;
import static org.apache.tools.ant.taskdefs.optional.junitlauncher.confined.Constants.LD_XML_ATTR_HALT_ON_FAILURE;
+import static org.apache.tools.ant.taskdefs.optional.junitlauncher.confined.Constants.LD_XML_ATTR_INCLUDE_TAGS;
import static org.apache.tools.ant.taskdefs.optional.junitlauncher.confined.Constants.LD_XML_ATTR_PRINT_SUMMARY;
import static org.apache.tools.ant.taskdefs.optional.junitlauncher.confined.Constants.LD_XML_ELM_LAUNCH_DEF;
+
/**
* An Ant {@link Task} responsible for launching the JUnit platform for running tests.
* This requires a minimum of JUnit 5, since that's the version in which the JUnit platform launcher
@@ -75,6 +80,8 @@ public class JUnitLauncherTask extends Task {
private boolean printSummary;
private final List tests = new ArrayList<>();
private final List listeners = new ArrayList<>();
+ private List includeTags = new ArrayList<>();
+ private List excludeTags = new ArrayList<>();
public JUnitLauncherTask() {
}
@@ -158,6 +165,32 @@ public class JUnitLauncherTask extends Task {
this.printSummary = printSummary;
}
+ /**
+ * Tags to include. Will trim each tag.
+ *
+ * @param includes comma separated list of tags to include while running the tests.
+ * @since Ant 1.10.7
+ */
+ public void setIncludeTags(final String includes) {
+ final StringTokenizer tokens = new StringTokenizer(includes, ",");
+ while (tokens.hasMoreTokens()) {
+ includeTags.add(tokens.nextToken().trim());
+ }
+ }
+
+ /**
+ * Tags to exclude. Will trim each tag.
+ *
+ * @param excludes comma separated list of tags to exclude while running the tests.
+ * @since Ant 1.10.7
+ */
+ public void setExcludeTags(final String excludes) {
+ final StringTokenizer tokens = new StringTokenizer(excludes, ",");
+ while (tokens.hasMoreTokens()) {
+ excludeTags.add(tokens.nextToken().trim());
+ }
+ }
+
private void preConfigure(final TestDefinition test) {
if (test.getHaltOnFailure() == null) {
test.setHaltOnFailure(this.haltOnFailure);
@@ -233,6 +266,12 @@ public class JUnitLauncherTask extends Task {
if (this.haltOnFailure) {
writer.writeAttribute(LD_XML_ATTR_HALT_ON_FAILURE, "true");
}
+ if (this.includeTags.size() > 0) {
+ writer.writeAttribute(LD_XML_ATTR_INCLUDE_TAGS, commaSeparatedListElements(includeTags));
+ }
+ if (this.excludeTags.size() > 0) {
+ writer.writeAttribute(LD_XML_ATTR_EXCLUDE_TAGS, commaSeparatedListElements(excludeTags));
+ }
// task level listeners
for (final ListenerDefinition listenerDef : this.listeners) {
if (!listenerDef.shouldUse(getProject())) {
@@ -294,6 +333,12 @@ public class JUnitLauncherTask extends Task {
}
}
+ private static String commaSeparatedListElements(final List stringList) {
+ return stringList.stream()
+ .map(Object::toString)
+ .collect(Collectors.joining(", "));
+ }
+
private int executeForkedTest(final ForkDefinition forkDefinition, final CommandlineJava commandlineJava) {
final LogOutputStream outStream = new LogOutputStream(this, Project.MSG_INFO);
final LogOutputStream errStream = new LogOutputStream(this, Project.MSG_WARN);
@@ -359,6 +404,16 @@ public class JUnitLauncherTask extends Task {
return haltOnFailure;
}
+ @Override
+ public List getIncludeTags() {
+ return includeTags;
+ }
+
+ @Override
+ public List getExcludeTags() {
+ return excludeTags;
+ }
+
@Override
public ClassLoader getClassLoader() {
return this.executionCL;
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/junitlauncher/confined/LaunchDefinition.java b/src/main/org/apache/tools/ant/taskdefs/optional/junitlauncher/confined/LaunchDefinition.java
index 10e7f4d7f..38afe1d4e 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/junitlauncher/confined/LaunchDefinition.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/junitlauncher/confined/LaunchDefinition.java
@@ -55,4 +55,15 @@ public interface LaunchDefinition {
*/
ClassLoader getClassLoader();
+ /**
+ * @return Returns the list of tags which will be used to evaluate tests that need to be included
+ * in the test execution
+ */
+ List getIncludeTags();
+
+ /**
+ * @return Returns the list of tags which will be used to evaluate tests that need to be excluded
+ * from the test execution
+ */
+ List getExcludeTags();
}
diff --git a/src/tests/junit/org/apache/tools/ant/taskdefs/optional/junitlauncher/JUnitLauncherTaskTest.java b/src/tests/junit/org/apache/tools/ant/taskdefs/optional/junitlauncher/JUnitLauncherTaskTest.java
index 6530836ca..32ca3c22e 100644
--- a/src/tests/junit/org/apache/tools/ant/taskdefs/optional/junitlauncher/JUnitLauncherTaskTest.java
+++ b/src/tests/junit/org/apache/tools/ant/taskdefs/optional/junitlauncher/JUnitLauncherTaskTest.java
@@ -23,6 +23,7 @@ import org.apache.tools.ant.Project;
import org.apache.tools.ant.taskdefs.optional.junitlauncher.confined.JUnitLauncherTask;
import org.apache.tools.ant.util.LoaderUtils;
import org.example.junitlauncher.jupiter.JupiterSampleTest;
+import org.example.junitlauncher.jupiter.JupiterTagSampleTest;
import org.example.junitlauncher.vintage.AlwaysFailingJUnit4Test;
import org.example.junitlauncher.vintage.ForkedTest;
import org.example.junitlauncher.vintage.JUnit4SampleTest;
@@ -32,6 +33,7 @@ import org.junit.Rule;
import org.junit.Test;
import java.io.File;
+import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
@@ -228,7 +230,7 @@ public class JUnitLauncherTaskTest {
final String targetName = "test-junit-ant-runtime-lib-excluded";
try {
buildRule.executeTarget(targetName);
- Assert.fail(targetName + " was expected to fail since JUnit platform libraries " +
+ Assert.fail(targetName + " was expected to fail since Ant runtime libraries " +
"weren't included in the classpath of the forked JVM");
} catch (BuildException be) {
// expect a Error due to missing main class (which is part of Ant runtime libraries
@@ -313,6 +315,107 @@ public class JUnitLauncherTaskTest {
JUnit4SampleTest.class.getName(), "testBar"));
}
+ /**
+ * Tests execution of a test which is configured to execute only methods with a special tag
+ */
+ @Test
+ public void testMethodWithIncludeTag() throws Exception {
+ final String target = "test-method-with-include-tag";
+ final Path tracker2 = setupTrackerProperty(target);
+ buildRule.executeTarget(target);
+ // verify only that specific method was run
+ Assert.assertTrue("testMethodIncludeTagisExecuted was expected to be run", wasTestRun(tracker2, JupiterSampleTest.class.getName(),
+ "testMethodIncludeTagisExecuted"));
+ Assert.assertFalse("testMethodIncludeTagisNotExecuted was expected NOT to be run", wasTestRun(tracker2, JupiterSampleTest.class.getName(),
+ "testMethodIncludeTagisNotExecuted"));
+ }
+
+ /**
+ * Tests execution of a test which is configured to execute only methods without special tags
+ */
+ @Test
+ public void testMethodWithExcludeTag() throws Exception {
+ final String target = "test-method-with-exclude-tag";
+ final Path tracker2 = setupTrackerProperty(target);
+ buildRule.executeTarget(target);
+ // verify only that specific method was run
+ Assert.assertTrue("testMethodIncludeTagisExecuted was expected to be run", wasTestRun(tracker2, JupiterSampleTest.class.getName(),
+ "testMethodIncludeTagisExecuted"));
+ Assert.assertFalse("testMethodIncludeTagisNotExecuted was expected NOT to be run", wasTestRun(tracker2, JupiterSampleTest.class.getName(),
+ "testMethodIncludeTagisNotExecuted"));
+ }
+
+ /**
+ * Tests execution of a test which is configured to execute only methods with special tags, two classes specified
+ */
+ @Test
+ public void testMethodWithTag2Classes() throws Exception {
+ final String target = "test-method-with-tag-2-classes";
+ final Path tracker1 = setupTrackerProperty(target + "1");
+
+ final Path tracker2 = setupTrackerProperty(target + "2");
+
+ buildRule.executeTarget(target);
+ // verify only that specific method was run
+ Assert.assertTrue("testMethodIncludeTagisExecuted was expected to be run", wasTestRun(tracker1, JupiterSampleTest.class.getName(),
+ "testMethodIncludeTagisExecuted"));
+ Assert.assertFalse("testMethodIncludeTagisNotExecuted was expected NOT to be run", wasTestRun(tracker1, JupiterSampleTest.class.getName(),
+ "testMethodIncludeTagisNotExecuted"));
+ Assert.assertTrue("testMethodIncludeTagisExecutedTagSampleTest was expected to be run", wasTestRun(tracker2, JupiterTagSampleTest.class.getName(),
+ "testMethodIncludeTagisExecutedTagSampleTest"));
+ Assert.assertFalse("testMethodIncludeTagisNotExecutedTagSampleTest was expected NOT to be run", wasTestRun(tracker2, JupiterTagSampleTest.class.getName(),
+ "testMethodIncludeTagisNotExecutedTagSampleTest"));
+ Assert.assertFalse("testMethodIncludeTagisNotExecutedTagSampleTest2 was expected NOT to be run", wasTestRun(tracker2, JupiterTagSampleTest.class.getName(),
+ "testMethodIncludeTagisNotExecutedTagSampleTest2"));
+ }
+
+ /**
+ * Tests execution of a test which is configured to execute only methods with special tags, two classes specified
+ */
+ @Test
+ public void testMethodWithTagFileSet() throws Exception {
+ final String target = "test-method-with-tag-fileset";
+ final Path tracker = setupTrackerProperty(target);
+
+ buildRule.executeTarget(target);
+ // verify only that specific method was run
+ Assert.assertTrue("testMethodIncludeTagisExecuted was expected to be run", wasTestRun(tracker, JupiterSampleTest.class.getName(),
+ "testMethodIncludeTagisExecuted"));
+ Assert.assertFalse("testMethodIncludeTagisNotExecuted was expected NOT to be run", wasTestRun(tracker, JupiterSampleTest.class.getName(),
+ "testMethodIncludeTagisNotExecuted"));
+ Assert.assertTrue("testMethodIncludeTagisExecutedTagSampleTest was expected to be run", wasTestRun(tracker, JupiterTagSampleTest.class.getName(),
+ "testMethodIncludeTagisExecutedTagSampleTest"));
+ Assert.assertFalse("testMethodIncludeTagisNotExecutedTagSampleTest was expected NOT to be run", wasTestRun(tracker, JupiterTagSampleTest.class.getName(),
+ "testMethodIncludeTagisNotExecutedTagSampleTest"));
+ Assert.assertFalse("testMethodIncludeTagisNotExecutedTagSampleTest2 was expected NOT to be run", wasTestRun(tracker, JupiterTagSampleTest.class.getName(),
+ "testMethodIncludeTagisNotExecutedTagSampleTest2"));
+ }
+
+ /**
+ * Tests execution of a test which is configured to execute only methods with special tags, two classes specified
+ */
+ @Test
+ public void testMethodWithTagFileSetFork() throws Exception {
+ final String target = "test-method-with-tag-fileset-fork";
+ final Path tracker = setupTrackerProperty(target);
+
+ buildRule.executeTarget(target);
+
+ Assert.assertTrue("testMethodIncludeTagisExecuted was expected to be run", wasTestRun(tracker, JupiterSampleTest.class.getName(),
+ "testMethodIncludeTagisExecuted"));
+ Assert.assertFalse("testMethodIncludeTagisNotExecuted was expected NOT to be run", wasTestRun(tracker, JupiterSampleTest.class.getName(),
+ "testMethodIncludeTagisNotExecuted"));
+ Assert.assertTrue("testMethodIncludeTagisExecutedTagSampleTest was expected to be run", wasTestRun(tracker, JupiterTagSampleTest.class.getName(),
+ "testMethodIncludeTagisExecutedTagSampleTest"));
+ Assert.assertFalse("testMethodIncludeTagisNotExecutedTagSampleTest was expected NOT to be run", wasTestRun(tracker, JupiterTagSampleTest.class.getName(),
+ "testMethodIncludeTagisNotExecutedTagSampleTest"));
+ Assert.assertFalse("testMethodIncludeTagisNotExecutedTagSampleTest2 was expected NOT to be run", wasTestRun(tracker, JupiterTagSampleTest.class.getName(),
+ "testMethodIncludeTagisNotExecutedTagSampleTest2"));
+
+ // Do it in the test, cause otherwise the file will be too big
+ Files.deleteIfExists(tracker);
+ }
+
private Path setupTrackerProperty(final String targetName) {
final String filename = targetName + "-tracker.txt";
buildRule.getProject().setProperty(targetName + ".tracker", filename);
diff --git a/src/tests/junit/org/example/junitlauncher/jupiter/JupiterSampleTest.java b/src/tests/junit/org/example/junitlauncher/jupiter/JupiterSampleTest.java
index b11286b78..f0b678fef 100644
--- a/src/tests/junit/org/example/junitlauncher/jupiter/JupiterSampleTest.java
+++ b/src/tests/junit/org/example/junitlauncher/jupiter/JupiterSampleTest.java
@@ -22,6 +22,7 @@ import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Disabled;
+import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.fail;
@@ -57,6 +58,21 @@ public class JupiterSampleTest {
void testSkipped() {
}
+ @Test
+ @Tag("fast")
+ void testMethodIncludeTagisExecuted() {
+ }
+
+ @Test
+ @Tag("fast")
+ void testMethodIncludeTagisExecuted2() {
+ }
+
+ @Test
+ @Tag("slow")
+ void testMethodIncludeTagisNotExecuted() {
+ }
+
@AfterEach
void afterEach() {
}
diff --git a/src/tests/junit/org/example/junitlauncher/jupiter/JupiterTagSampleTest.java b/src/tests/junit/org/example/junitlauncher/jupiter/JupiterTagSampleTest.java
new file mode 100644
index 000000000..60d6724d6
--- /dev/null
+++ b/src/tests/junit/org/example/junitlauncher/jupiter/JupiterTagSampleTest.java
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+package org.example.junitlauncher.jupiter;
+
+import org.junit.jupiter.api.AfterAll;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Tag;
+import org.junit.jupiter.api.Test;
+
+/**
+ *
+ */
+public class JupiterTagSampleTest {
+
+ @BeforeAll
+ static void beforeAll() {
+ }
+
+ @BeforeEach
+ void beforeEach() {
+ }
+
+ @Test
+ @Tag("fast")
+ void testMethodIncludeTagisExecutedTagSampleTest() {
+ }
+
+ @Test
+ @Tag("slow")
+ void testMethodIncludeTagisNotExecutedTagSampleTest() {
+ }
+
+ @Test
+ @Tag("extraSlow")
+ void testMethodIncludeTagisNotExecuted2TagSampleTest() {
+ }
+
+
+ @AfterEach
+ void afterEach() {
+ }
+
+ @AfterAll
+ static void afterAll() {
+ }
+}
|