SUREFIRE-1153 Integration test
Project: http://git-wip-us.apache.org/repos/asf/maven-surefire/repo Commit: http://git-wip-us.apache.org/repos/asf/maven-surefire/commit/7ffd542b Tree: http://git-wip-us.apache.org/repos/asf/maven-surefire/tree/7ffd542b Diff: http://git-wip-us.apache.org/repos/asf/maven-surefire/diff/7ffd542b Branch: refs/heads/master Commit: 7ffd542bcb8b4a85da9dfedbf8977ebee5f4edac Parents: c081666 Author: Tomas Rohovsky <troho...@redhat.com> Authored: Sat May 16 15:29:04 2015 +0200 Committer: Tibor17 <tibo...@lycos.com> Committed: Thu May 28 22:47:00 2015 +0200 ---------------------------------------------------------------------- .../Surefire1153IncludesAndSpecifiedTestIT.java | 40 +++++++++++++ .../pom.xml | 63 ++++++++++++++++++++ .../java/jiras/surefire1153/IncludedUT.java | 30 ++++++++++ .../jiras/surefire1153/NotIncludedTest.java | 30 ++++++++++ 4 files changed, 163 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/7ffd542b/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire1153IncludesAndSpecifiedTestIT.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire1153IncludesAndSpecifiedTestIT.java b/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire1153IncludesAndSpecifiedTestIT.java new file mode 100644 index 0000000..6f42458 --- /dev/null +++ b/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/jiras/Surefire1153IncludesAndSpecifiedTestIT.java @@ -0,0 +1,40 @@ +package org.apache.maven.surefire.its.jiras; +/* + * 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. + */ + +import org.apache.maven.surefire.its.fixture.SurefireJUnit4IntegrationTestCase; + +import org.junit.Test; + +public class Surefire1153IncludesAndSpecifiedTestIT + extends SurefireJUnit4IntegrationTestCase +{ + + @Test + public void testSpecifiedTestInIncludes() + { + unpack( "/surefire-1153-includesAndSpecifiedTest" ).setTestToRun( "#testIncluded" ).executeTest().verifyErrorFree( 1 ); + } + + @Test + public void testSpecifiedTestNotInIncludes() + { + unpack( "/surefire-1153-includesAndSpecifiedTest" ).setTestToRun( "#testNotIncluded" ).executeTest().verifyErrorFree( 1 ); + } +} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/7ffd542b/surefire-integration-tests/src/test/resources/surefire-1153-includesAndSpecifiedTest/pom.xml ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/surefire-1153-includesAndSpecifiedTest/pom.xml b/surefire-integration-tests/src/test/resources/surefire-1153-includesAndSpecifiedTest/pom.xml new file mode 100644 index 0000000..0f88caa --- /dev/null +++ b/surefire-integration-tests/src/test/resources/surefire-1153-includesAndSpecifiedTest/pom.xml @@ -0,0 +1,63 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + ~ 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. + --> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.apache.maven.surefire</groupId> + <artifactId>it-parent</artifactId> + <version>1.0</version> + <relativePath>../pom.xml</relativePath> + </parent> + <groupId>org.apache.maven.plugins.surefire</groupId> + <artifactId>jiras-surefire-1153</artifactId> + <version>1.0</version> + <url>http://maven.apache.org</url> + <properties> + <version.junit>4.12</version.junit> + </properties> + <dependencies> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>${version.junit}</version> + <scope>test</scope> + </dependency> + </dependencies> + <build> + <plugins> + <plugin> + <artifactId>maven-compiler-plugin</artifactId> + <configuration> + <source>1.5</source> + <target>1.5</target> + </configuration> + </plugin> + <plugin> + <artifactId>maven-surefire-plugin</artifactId> + <configuration> + <includes> + <include>**/*UT.java</include> + </includes> + </configuration> + </plugin> + </plugins> + </build> +</project> http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/7ffd542b/surefire-integration-tests/src/test/resources/surefire-1153-includesAndSpecifiedTest/src/test/java/jiras/surefire1153/IncludedUT.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/surefire-1153-includesAndSpecifiedTest/src/test/java/jiras/surefire1153/IncludedUT.java b/surefire-integration-tests/src/test/resources/surefire-1153-includesAndSpecifiedTest/src/test/java/jiras/surefire1153/IncludedUT.java new file mode 100644 index 0000000..042cf37 --- /dev/null +++ b/surefire-integration-tests/src/test/resources/surefire-1153-includesAndSpecifiedTest/src/test/java/jiras/surefire1153/IncludedUT.java @@ -0,0 +1,30 @@ +package jiras.surefire1153; + +/* + * 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. + */ + +import org.junit.Test; + +public class IncludedUT +{ + @Test + public void testIncluded() + { + } +} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/7ffd542b/surefire-integration-tests/src/test/resources/surefire-1153-includesAndSpecifiedTest/src/test/java/jiras/surefire1153/NotIncludedTest.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/surefire-1153-includesAndSpecifiedTest/src/test/java/jiras/surefire1153/NotIncludedTest.java b/surefire-integration-tests/src/test/resources/surefire-1153-includesAndSpecifiedTest/src/test/java/jiras/surefire1153/NotIncludedTest.java new file mode 100644 index 0000000..b03d0af --- /dev/null +++ b/surefire-integration-tests/src/test/resources/surefire-1153-includesAndSpecifiedTest/src/test/java/jiras/surefire1153/NotIncludedTest.java @@ -0,0 +1,30 @@ +package jiras.surefire1153; + +/* + * 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. + */ + +import org.junit.Test; + +public class NotIncludedTest +{ + @Test + public void testNotIncluded() + { + } +}