http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/4d00932a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/PojoSimpleIT.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/PojoSimpleIT.java b/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/PojoSimpleIT.java deleted file mode 100644 index 03902ef..0000000 --- a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/PojoSimpleIT.java +++ /dev/null @@ -1,38 +0,0 @@ -package org.apache.maven.surefire.its; - -/* - * 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; - -/** - * Test support for POJO tests. - * - * @author Benjamin Bentmann - */ -public class PojoSimpleIT - extends SurefireJUnit4IntegrationTestCase -{ - @Test - public void testit() - { - unpack( "pojo-simple" ).executeTest().assertTestSuiteResults( 2, 0, 1, 0 ); - } -}
http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/4d00932a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/ReporterTime.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/ReporterTime.java b/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/ReporterTime.java deleted file mode 100644 index 154fb73..0000000 --- a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/ReporterTime.java +++ /dev/null @@ -1,26 +0,0 @@ -package org.apache.maven.surefire.its; -/* - * 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. - */ - -/** - * @author Kristian Rosenvold - */ -public class ReporterTime -{ -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/4d00932a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/ReportersIT.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/ReportersIT.java b/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/ReportersIT.java deleted file mode 100644 index b1c68f0..0000000 --- a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/ReportersIT.java +++ /dev/null @@ -1,45 +0,0 @@ -package org.apache.maven.surefire.its; - -/* - * 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.OutputValidator; -import org.apache.maven.surefire.its.fixture.SurefireJUnit4IntegrationTestCase; -import org.junit.Test; - -/** - * Asserts proper behaviour of console output when forking - * SUREFIRE-679 - * - * @author Kristian Rosenvold - */ -public class ReportersIT - extends SurefireJUnit4IntegrationTestCase -{ - @Test - public void testRedirectOutputTestNg() - { - OutputValidator reporters = unpack( "reporters" ).redirectToFile( true ).printSummary( true ).executeTest(); - - reporters.getSurefireReportsFile( "TestSuite-output.txt" ).assertFileExists(); - reporters.getSurefireReportsXmlFile( "TEST-TestSuite.xml" ).assertFileExists(); - reporters.getSurefireReportsFile( "TestSuite.txt" ).assertFileExists(); - } -} - http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/4d00932a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/ResultCountingIT.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/ResultCountingIT.java b/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/ResultCountingIT.java deleted file mode 100644 index 714d0c4..0000000 --- a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/ResultCountingIT.java +++ /dev/null @@ -1,66 +0,0 @@ -package org.apache.maven.surefire.its; - -/* - * 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.it.VerificationException; -import org.apache.maven.surefire.its.fixture.OutputValidator; -import org.apache.maven.surefire.its.fixture.SurefireJUnit4IntegrationTestCase; -import org.junit.Test; - -import java.io.IOException; - -/** - * Verifies that the providers get the result summary at the bottom of the run correctly, in different forkmodes - * SUREFIRE-613 Asserts proper test counts when running in parallel - * - * @author Kristian Rosenvold - */ -public class ResultCountingIT - extends SurefireJUnit4IntegrationTestCase -{ - @Test - public void testCountingWithJunit481ForkNever() - throws Exception - { - assertForkMode( "never" ); - } - - @Test - public void testCountingWithJunit481ForkOnce() - throws Exception - { - assertForkMode( "once" ); - } - - @Test - public void testCountingWithJunit481ForkAlways() - throws Exception - { - assertForkMode( "always" ); - } - - private void assertForkMode( String forkMode ) - throws IOException, VerificationException - { - OutputValidator outputValidator = unpack( "result-counting" ).failNever().forkMode( forkMode ).executeTest(); - outputValidator.assertTestSuiteResults( 36, 23, 4, 2 ); - outputValidator.verifyTextInLog( "Tests run: 36, Failures: 4, Errors: 23, Skipped: 2" ); - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/4d00932a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/RunOrderIT.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/RunOrderIT.java b/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/RunOrderIT.java deleted file mode 100644 index 099aa07..0000000 --- a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/RunOrderIT.java +++ /dev/null @@ -1,108 +0,0 @@ -package org.apache.maven.surefire.its; - -/* - * 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 java.io.IOException; -import java.util.Calendar; -import org.apache.maven.it.VerificationException; -import org.apache.maven.surefire.its.fixture.OutputValidator; -import org.apache.maven.surefire.its.fixture.SurefireJUnit4IntegrationTestCase; -import org.apache.maven.surefire.its.fixture.SurefireLauncher; -import org.junit.Test; - -/** - * Verifies the runOrder setting and its effect - * - * @author Kristian Rosenvold - */ -public class RunOrderIT - extends SurefireJUnit4IntegrationTestCase -{ - private static final String[] TESTS_IN_ALPHABETICAL_ORDER = { "TA", "TB", "TC" }; - - private static final String[] TESTS_IN_REVERSE_ALPHABETICAL_ORDER = { "TC", "TB", "TA" }; - - // testing random is left as an exercise to the reader. Patches welcome - - @Test - public void testAlphabetical() - throws Exception - { - OutputValidator validator = executeWithRunOrder( "alphabetical" ); - assertTestnamesAppearInSpecificOrder( validator, TESTS_IN_ALPHABETICAL_ORDER ); - } - - @Test - public void testReverseAlphabetical() - throws Exception - { - OutputValidator validator = executeWithRunOrder( "reversealphabetical" ); - assertTestnamesAppearInSpecificOrder( validator, TESTS_IN_REVERSE_ALPHABETICAL_ORDER ); - } - - @Test - public void testHourly() - throws Exception - { - int startHour = Calendar.getInstance().get( Calendar.HOUR_OF_DAY ); - OutputValidator validator = executeWithRunOrder( "hourly" ); - int endHour = Calendar.getInstance().get( Calendar.HOUR_OF_DAY ); - if ( startHour != endHour ) - { - return; // Race condition, cannot test when hour changed mid-run - } - - String[] testnames = - ( ( startHour % 2 ) == 0 ) ? TESTS_IN_ALPHABETICAL_ORDER : TESTS_IN_REVERSE_ALPHABETICAL_ORDER; - assertTestnamesAppearInSpecificOrder( validator, testnames ); - } - - @Test - public void testNonExistingRunOrder() - throws Exception - { - unpack().forkMode( getForkMode() ).runOrder( "nonExistingRunOrder" ).maven().withFailure().executeTest().verifyTextInLog( - "There's no RunOrder with the name nonExistingRunOrder." ); - } - - private OutputValidator executeWithRunOrder( String runOrder ) - { - return unpack().forkMode( getForkMode() ).runOrder( runOrder ).executeTest().verifyErrorFree( 3 ); - } - - protected String getForkMode() - { - return "once"; - } - - private SurefireLauncher unpack() - { - return unpack( "runOrder" ); - } - - private void assertTestnamesAppearInSpecificOrder( OutputValidator validator, String[] testnames ) - throws VerificationException - { - if ( !validator.stringsAppearInSpecificOrderInLog( testnames ) ) - { - throw new VerificationException( "Response does not contain expected item" ); - } - } -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/4d00932a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/RunOrderParallelForksIT.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/RunOrderParallelForksIT.java b/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/RunOrderParallelForksIT.java deleted file mode 100644 index 72fc428..0000000 --- a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/RunOrderParallelForksIT.java +++ /dev/null @@ -1,31 +0,0 @@ -package org.apache.maven.surefire.its; - -/* - * 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. - */ - -public class RunOrderParallelForksIT - extends RunOrderIT -{ - - @Override - protected String getForkMode() - { - return "perthread"; - } -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/4d00932a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/SiblingAggregatorIT.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/SiblingAggregatorIT.java b/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/SiblingAggregatorIT.java deleted file mode 100644 index 69c9e4c..0000000 --- a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/SiblingAggregatorIT.java +++ /dev/null @@ -1,47 +0,0 @@ -package org.apache.maven.surefire.its; - -/* - * 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.OutputValidator; -import org.apache.maven.surefire.its.fixture.SurefireJUnit4IntegrationTestCase; -import org.apache.maven.surefire.its.fixture.SurefireLauncher; -import org.junit.Test; - -/** - * Test aggregator as a sibling to child modules; invokes modules as "../child" - * - * @author <a href="mailto:dfabul...@apache.org">Dan Fabulich</a> - * @author <a href="mailto:krosenv...@apache.org">Kristian Rosenvold</a> - */ -public class SiblingAggregatorIT - extends SurefireJUnit4IntegrationTestCase -{ - - @Test - public void testSiblingAggregator() - throws Exception - { - final SurefireLauncher unpack = unpack( "sibling-aggregator" ); - SurefireLauncher aggregator = unpack.getSubProjectLauncher( "aggregator" ); - aggregator.executeTest().verifyErrorFreeLog(); - OutputValidator child2 = unpack.getSubProjectValidator( "child2" ); - child2.assertTestSuiteResults( 1, 0, 0, 0 ); - } -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/4d00932a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/SmartStackTraceIT.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/SmartStackTraceIT.java b/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/SmartStackTraceIT.java deleted file mode 100644 index b98155e..0000000 --- a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/SmartStackTraceIT.java +++ /dev/null @@ -1,44 +0,0 @@ -package org.apache.maven.surefire.its; - -/* - * 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.OutputValidator; -import org.apache.maven.surefire.its.fixture.SurefireJUnit4IntegrationTestCase; -import org.junit.Test; - -/** - * IT of smart stack trace parser - * - * @author Kristian Rosenvold - */ -public class SmartStackTraceIT - extends SurefireJUnit4IntegrationTestCase -{ - - @Test - public void misg() - throws Exception - { - OutputValidator outputValidator = unpack( "/junit48-smartStackTrace" ).maven().withFailure().executeTest(); - outputValidator.verifyTextInLog( "SmartStackTraceTest.shouldFailInMethodButDoesnt Expected exception: java.lang.RuntimeException" ); - outputValidator.verifyTextInLog( "SmartStackTraceTest.shortName Expected exception: java.io.IOException" ); - - } -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/4d00932a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/SystemPropertiesTestIT.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/SystemPropertiesTestIT.java b/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/SystemPropertiesTestIT.java deleted file mode 100644 index 121b8fc..0000000 --- a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/SystemPropertiesTestIT.java +++ /dev/null @@ -1,55 +0,0 @@ -package org.apache.maven.surefire.its; - -/* - * 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.apache.maven.surefire.its.fixture.SurefireLauncher; -import org.junit.Test; - -/** - * Test system properties - * - * @author <a href="mailto:dfabul...@apache.org">Dan Fabulich</a> - */ -public class SystemPropertiesTestIT - extends SurefireJUnit4IntegrationTestCase -{ - - @Test - public void testSystemProperties() - { - unpack().addGoal( "-DsetOnMavenCommandLine=baz" ).addGoal( - "-DsetOnArgLineWorkAround=baz" ).executeTest().verifyErrorFree( 8 ); - } - - @Test - public void testSystemPropertiesNoFork() - { - - unpack().forkNever().addGoal( "-DsetOnMavenCommandLine=baz" ).addGoal( "-DsetOnArgLineWorkAround=baz" ) - // DGF fake the argLine, since we're not forking - .addGoal( "-DsetOnArgLine=bar" ).executeTest().verifyErrorFree( 8 ); - } - - public SurefireLauncher unpack() - { - return unpack( "/system-properties" ); - } -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/4d00932a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestMethodPatternIT.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestMethodPatternIT.java b/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestMethodPatternIT.java deleted file mode 100644 index 447d8f1..0000000 --- a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestMethodPatternIT.java +++ /dev/null @@ -1,115 +0,0 @@ -package org.apache.maven.surefire.its; - -/* - * 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.OutputValidator; -import org.apache.maven.surefire.its.fixture.SurefireJUnit4IntegrationTestCase; -import org.apache.maven.surefire.its.fixture.SurefireLauncher; -import org.junit.Test; - -import java.util.Collections; -import java.util.HashMap; -import java.util.Map; -import java.util.Map.Entry; - -/** - * Test project using -Dtest=mtClass#myMethod - * - * @author Olivier Lamy - */ -public class TestMethodPatternIT - extends SurefireJUnit4IntegrationTestCase -{ - private static final String RUNNING_WITH_PROVIDER47 = "parallel='none', perCoreThreadCount=true, threadCount=0"; - - public OutputValidator runMethodPattern( String projectName, Map<String, String> props, String... goals ) - { - SurefireLauncher launcher = unpack( projectName ); - for ( Entry<String, String> entry : props.entrySet() ) - { - launcher.sysProp( entry.getKey(), entry.getValue() ); - } - for ( String goal : goals ) - { - launcher.addGoal( goal ); - } - return launcher.showErrorStackTraces().debugLogging() - .executeTest() - .assertTestSuiteResults( 2, 0, 0, 0 ); - } - - @Test - public void testJUnit44() - { - runMethodPattern( "junit44-method-pattern", Collections.<String, String>emptyMap() ); - } - - @Test - public void testJUnit48Provider4() - { - runMethodPattern( "junit48-method-pattern", Collections.<String, String>emptyMap(), "-P surefire-junit4" ); - } - - @Test - public void testJUnit48Provider47() - { - runMethodPattern( "junit48-method-pattern", Collections.<String, String>emptyMap(), "-P surefire-junit47" ) - .verifyTextInLog( RUNNING_WITH_PROVIDER47 ); - } - - @Test - public void testJUnit48WithCategoryFilter() - { - unpack( "junit48-method-pattern" ) - .addGoal( "-Dgroups=junit4.SampleCategory" ) - .executeTest() - .assertTestSuiteResults( 1, 0, 0, 0 ); - } - - @Test - public void testTestNgMethodBefore() - { - Map<String, String> props = new HashMap<String, String>(); - props.put( "testNgVersion", "5.7" ); - props.put( "testNgClassifier", "jdk15" ); - runMethodPattern( "testng-method-pattern-before", props ); - } - - @Test - public void testTestNGMethodPattern() - { - Map<String, String> props = new HashMap<String, String>(); - props.put( "testNgVersion", "5.7" ); - props.put( "testNgClassifier", "jdk15" ); - runMethodPattern( "/testng-method-pattern", props ); - } - - @Test - public void testMethodPatternAfter() - { - unpack( "testng-method-pattern-after" ) - .sysProp( "testNgVersion", "5.7" ) - .sysProp( "testNgClassifier", "jdk15" ) - .executeTest() - .verifyErrorFree( 2 ) - .verifyTextInLog( "Called tearDown" ); - } - -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/4d00932a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestMultipleMethodPatternsIT.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestMultipleMethodPatternsIT.java b/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestMultipleMethodPatternsIT.java deleted file mode 100644 index d490ce5..0000000 --- a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestMultipleMethodPatternsIT.java +++ /dev/null @@ -1,67 +0,0 @@ -package org.apache.maven.surefire.its; - -/* - * 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.Settings; -import org.apache.maven.surefire.its.fixture.SurefireLauncher; -import org.junit.runner.RunWith; -import org.junit.runners.Parameterized; - -import java.util.Arrays; - -/** - * JUnit test project using multiple method patterns, including wildcards in class and method names. - */ -@RunWith( Parameterized.class ) -public class TestMultipleMethodPatternsIT - extends AbstractTestMultipleMethodPatterns -{ - private final Settings settings; - - public TestMultipleMethodPatternsIT( Settings settings ) - { - this.settings = settings; - } - - @Parameterized.Parameters - public static Iterable<Object[]> data() - { - return Arrays.asList( new Object[][]{ - { Settings.JUNIT4_TEST }, - { Settings.JUNIT47_TEST }, - { Settings.JUNIT4_INCLUDES }, - { Settings.JUNIT47_INCLUDES }, - { Settings.JUNIT4_INCLUDES_EXCLUDES }, - { Settings.JUNIT47_INCLUDES_EXCLUDES } - } ); - } - - @Override - protected Settings getSettings() - { - return settings; - } - - @Override - protected SurefireLauncher unpack() - { - return unpack( "junit48-multiple-method-patterns", "_" + settings.path() ); - } -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/4d00932a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestMultipleMethodPatternsTestNGIT.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestMultipleMethodPatternsTestNGIT.java b/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestMultipleMethodPatternsTestNGIT.java deleted file mode 100644 index 2de3670..0000000 --- a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestMultipleMethodPatternsTestNGIT.java +++ /dev/null @@ -1,64 +0,0 @@ -package org.apache.maven.surefire.its; - -/* - * 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.Settings; -import org.apache.maven.surefire.its.fixture.SurefireLauncher; -import org.junit.runner.RunWith; -import org.junit.runners.Parameterized; - -import java.util.Arrays; - -/** - * TestNG test project using multiple method patterns, including wildcards in class and method names. - */ -@RunWith( Parameterized.class ) -public class TestMultipleMethodPatternsTestNGIT - extends AbstractTestMultipleMethodPatterns -{ - private final Settings settings; - - public TestMultipleMethodPatternsTestNGIT( Settings settings ) - { - this.settings = settings; - } - - @Parameterized.Parameters - public static Iterable<Object[]> data() - { - return Arrays.asList( new Object[][]{ - { Settings.TestNG_TEST }, - { Settings.TestNG_INCLUDES }, - { Settings.TestNG_INCLUDES_EXCLUDES } - } ); - } - - @Override - protected Settings getSettings() - { - return settings; - } - - @Override - protected SurefireLauncher unpack() - { - return unpack( "testng-multiple-method-patterns", "_" + settings.path() ); - } -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/4d00932a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestMultipleMethodsIT.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestMultipleMethodsIT.java b/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestMultipleMethodsIT.java deleted file mode 100644 index cb773cd..0000000 --- a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestMultipleMethodsIT.java +++ /dev/null @@ -1,74 +0,0 @@ -package org.apache.maven.surefire.its; - -/* - * 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.OutputValidator; -import org.apache.maven.surefire.its.fixture.SurefireJUnit4IntegrationTestCase; -import org.apache.maven.surefire.its.fixture.SurefireLauncher; -import org.junit.Test; - - -/** - * Test project using -Dtest=mtClass#myMethod+myMethod2,secondClass#testMethod - * - * @author <a href="mailto:ytso...@gmail.com">rainLee</a> - */ -public class TestMultipleMethodsIT - extends SurefireJUnit4IntegrationTestCase -{ - - private static final String RUNNING_WITH_PROVIDER47 = "parallel='none', perCoreThreadCount=true, threadCount=0"; - - public OutputValidator multipleMethod( String projectName, String... goals ) - throws Exception - { - SurefireLauncher launcher = unpack( projectName ); - for ( String goal : goals ) - { - launcher.addGoal( goal ); - } - return launcher.showErrorStackTraces().debugLogging() - .executeTest() - .verifyErrorFreeLog().assertTestSuiteResults( 3, 0, 0, 0 ); - } - - @Test - public void testJunit44() - throws Exception - { - multipleMethod( "junit44-multiple-methods" ); - } - - @Test - public void testJunit48Provider4() - throws Exception - { - multipleMethod( "junit48-multiple-methods", "-P surefire-junit4" ); - } - - @Test - public void testJunit48Provider47() - throws Exception - { - multipleMethod( "junit48-multiple-methods", "-P surefire-junit47" ) - .verifyTextInLog( RUNNING_WITH_PROVIDER47 ); - } - -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/4d00932a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgGroupsIT.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgGroupsIT.java b/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgGroupsIT.java deleted file mode 100644 index 74771c8..0000000 --- a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgGroupsIT.java +++ /dev/null @@ -1,69 +0,0 @@ -package org.apache.maven.surefire.its; - -/* - * 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.apache.maven.surefire.its.fixture.SurefireLauncher; - -import org.junit.Test; - -/** - * Test the group filter for TestNG - * - */ -public class TestNgGroupsIT - extends SurefireJUnit4IntegrationTestCase -{ - @Test - public void testExclusion() - { - unpack().setExcludedGroups( "notincluded" ).executeTest().verifyErrorFree( 5 ); - } - - @Test - public void testOnlyGroups() - { - unpack().setGroups( "functional" ).executeTest().verifyErrorFree( 2 ); - } - - @Test - public void testGroupsAndExclusion() - { - unpack().setGroups( "functional" ).setExcludedGroups( "notincluded" ).executeTest().verifyErrorFree( 1 ); - } - - @Test - public void groupsWithDash() - { - unpack().setGroups( "abc-def" ).executeTest().verifyErrorFree( 1 ); - } - - @Test - public void groupsBySimpleRegex() - { - unpack().setGroups( "foo\\..*" ).executeTest().verifyErrorFree( 2 ); - } - - public SurefireLauncher unpack() - { - return unpack( "/testng-groups" ); - } - -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/4d00932a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgParallelWithAnnotationsIT.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgParallelWithAnnotationsIT.java b/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgParallelWithAnnotationsIT.java deleted file mode 100644 index 1e6044e..0000000 --- a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgParallelWithAnnotationsIT.java +++ /dev/null @@ -1,38 +0,0 @@ -package org.apache.maven.surefire.its; - -/* - * 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; - -/** - * Test that TestNG's @Test(threadPoolSize = n, invocationCount=n) causes tests to be run in parallel. - * - * @author <a href="mailto:spam.hai...@gmail.com">Haikal Saadh</a> - */ -public class TestNgParallelWithAnnotationsIT - extends SurefireJUnit4IntegrationTestCase -{ - @Test - public void testTestNgGroupThreadParallel() - { - executeErrorFreeTest( "/testng-parallel-with-annotations", 3 ); - } -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/4d00932a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgSuccessPercentageIT.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgSuccessPercentageIT.java b/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgSuccessPercentageIT.java deleted file mode 100644 index 3b12e03..0000000 --- a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgSuccessPercentageIT.java +++ /dev/null @@ -1,45 +0,0 @@ -package org.apache.maven.surefire.its; - -/* - * 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.OutputValidator; -import org.apache.maven.surefire.its.fixture.SurefireJUnit4IntegrationTestCase; -import org.junit.Test; - -/** - * Test that TestNG's @Test(successPercentage = n, invocationCount=n) passes so long as successPercentage tests - * have passed. - * - * @author Jon Todd - * @author Andreas Gudian - */ -public class TestNgSuccessPercentageIT extends SurefireJUnit4IntegrationTestCase { - @Test - public void testPassesWhenFailuresLessThanSuccessPercentage() - { - OutputValidator validator = unpack("/testng-succes-percentage") - .sysProp( "testNgVersion", "5.7" ) - .sysProp( "testNgClassifier", "jdk15" ) - .mavenTestFailureIgnore( true ) - .executeTest(); - validator.assertTestSuiteResults(8, 0, 1, 0); - } - -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/4d00932a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestSingleMethodIT.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestSingleMethodIT.java b/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestSingleMethodIT.java deleted file mode 100644 index 53eddce..0000000 --- a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestSingleMethodIT.java +++ /dev/null @@ -1,141 +0,0 @@ -package org.apache.maven.surefire.its; - -/* - * 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.OutputValidator; -import org.apache.maven.surefire.its.fixture.SurefireJUnit4IntegrationTestCase; -import org.apache.maven.surefire.its.fixture.SurefireLauncher; -import org.junit.Test; - -import java.util.Collections; -import java.util.HashMap; -import java.util.Map; - -/** - * Test project using -Dtest=mtClass#myMethod - * - * @author Olivier Lamy - */ -public class TestSingleMethodIT - extends SurefireJUnit4IntegrationTestCase -{ - private static final String RUNNING_WITH_PROVIDER47 = "parallel='none', perCoreThreadCount=true, threadCount=0"; - - public OutputValidator singleMethod( String projectName, Map<String, String> props, String testToRun, - String... goals ) - throws Exception - { - SurefireLauncher launcher = unpack( projectName ); - for ( Map.Entry<String, String> entry : props.entrySet() ) - { - launcher.sysProp( entry.getKey(), entry.getValue() ); - } - for ( String goal : goals ) - { - launcher.addGoal( goal ); - } - launcher.showErrorStackTraces().debugLogging(); - if ( testToRun != null ) - { - launcher.setTestToRun( testToRun ); - } - return launcher.executeTest() - .verifyErrorFreeLog() - .assertTestSuiteResults( 1, 0, 0, 0 ); - } - - @Test - public void testJunit44() - throws Exception - { - singleMethod( "junit44-single-method", Collections.<String, String>emptyMap(), null ); - } - - @Test - public void testJunit48Provider4() - throws Exception - { - singleMethod( "junit48-single-method", Collections.<String, String>emptyMap(), null, "-P surefire-junit4" ); - } - - @Test - public void testJunit48Provider47() - throws Exception - { - singleMethod( "junit48-single-method", Collections.<String, String>emptyMap(), null, "-P surefire-junit47" ) - .verifyTextInLog( RUNNING_WITH_PROVIDER47 ); - } - - @Test - public void testJunit48parallel() - throws Exception - { - unpack( "junit48-single-method" ) - .parallel( "all" ) - .useUnlimitedThreads() - .executeTest() - .verifyErrorFreeLog() - .assertTestSuiteResults( 1, 0, 0, 0 ); - } - - @Test - public void testTestNg() - throws Exception - { - Map<String, String> props = new HashMap<String, String>(); - props.put( "testNgVersion", "5.7" ); - props.put( "testNgClassifier", "jdk15" ); - singleMethod( "testng-single-method", props, null ); - } - - @Test - public void testTestNg5149() - throws Exception - { - singleMethod( "/testng-single-method-5-14-9", Collections.<String, String>emptyMap(), null ); - } - - @Test - public void fullyQualifiedJunit48Provider4() - throws Exception - { - singleMethod( "junit48-single-method", Collections.<String, String>emptyMap(), - "junit4.BasicTest#testSuccessOne", "-P surefire-junit4" ); - } - - @Test - public void fullyQualifiedJunit48Provider47() - throws Exception - { - singleMethod("junit48-single-method", Collections.<String, String>emptyMap(), - "junit4.BasicTest#testSuccessOne", "-P surefire-junit47"); - } - - @Test - public void fullyQualifiedTestNg() - throws Exception - { - Map<String, String> props = new HashMap<String, String>(); - props.put( "testNgVersion", "5.7" ); - props.put( "testNgClassifier", "jdk15" ); - singleMethod( "testng-single-method", props, "testng.BasicTest#testSuccessOne" ); - } - -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/4d00932a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TimeoutForkedTestIT.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TimeoutForkedTestIT.java b/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TimeoutForkedTestIT.java deleted file mode 100644 index fdcea20..0000000 --- a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TimeoutForkedTestIT.java +++ /dev/null @@ -1,43 +0,0 @@ -package org.apache.maven.surefire.its; - -/* - * 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; - -/** - * Test - * - * @author <a href="mailto:dfabul...@apache.org">Dan Fabulich</a> - */ -public class TimeoutForkedTestIT - extends SurefireJUnit4IntegrationTestCase -{ - @Test - public void testTimeoutForked() - throws Exception - { - unpack( "/timeout-forked" ).addGoal( "-DsleepLength=10000" ).addGoal( - "-DforkTimeout=1" ).maven().withFailure().executeTest(); - // SUREFIRE-468 test that had to be reverted due to SUREFIRE-705 - //assertFalse( getSurefireReportsFile( "TEST-timeoutForked.BasicTest.xml" ).exists() ); - // assertFalse( getSurefireReportsFile( "timeoutForked.BasicTest.txt" ).exists() ); - } -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/4d00932a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TwoTestCasesIT.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TwoTestCasesIT.java b/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TwoTestCasesIT.java deleted file mode 100644 index c218769..0000000 --- a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TwoTestCasesIT.java +++ /dev/null @@ -1,130 +0,0 @@ -package org.apache.maven.surefire.its; - -/* - * 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 java.util.HashSet; -import java.util.List; -import java.util.Set; -import org.apache.maven.plugins.surefire.report.ReportTestSuite; -import org.apache.maven.surefire.its.fixture.*; -import org.junit.Test; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.fail; - -/** - * Test running two test cases; confirms reporting works correctly - * - * @author <a href="mailto:dfabul...@apache.org">Dan Fabulich</a> - */ -public class TwoTestCasesIT - extends SurefireJUnit4IntegrationTestCase -{ - @Test - public void testTwoTestCases() - throws Exception - { - unpack( "junit-twoTestCases" ) - .sysProp( "testNgVersion", "5.7" ) - .sysProp( "testNgClassifier", "jdk15" ) - .executeTest() - .verifyErrorFreeLog() - .assertTestSuiteResults( 2, 0, 0, 0 ); - } - - /** - * Runs two tests encapsulated in a suite - */ - @Test - public void testTwoTestCaseSuite() - throws Exception - { - final OutputValidator outputValidator = unpack( "junit-twoTestCaseSuite" ) - .sysProp( "testNgVersion", "5.7" ) - .sysProp( "testNgClassifier", "jdk15" ) - .executeTest(); - outputValidator.verifyErrorFreeLog().assertTestSuiteResults( 2, 0, 0, 0 ); - List<ReportTestSuite> reports = HelperAssertions.extractReports( outputValidator.getBaseDir() ); - Set<String> classNames = extractClassNames( reports ); - assertContains( classNames, "junit.twoTestCaseSuite.BasicTest" ); - assertContains( classNames, "junit.twoTestCaseSuite.TestTwo" ); - assertEquals( "wrong number of classes", 2, classNames.size() ); - IntegrationTestSuiteResults results = HelperAssertions.parseReportList( reports ); - HelperAssertions.assertTestSuiteResults( 2, 0, 0, 0, results ); - } - - private void assertContains( Set<String> set, String expected ) - { - if ( set.contains( expected ) ) - { - return; - } - fail( "Set didn't contain " + expected ); - } - - private Set<String> extractClassNames( List<ReportTestSuite> reports ) - { - HashSet<String> classNames = new HashSet<String>(); - for ( ReportTestSuite suite : reports ) - { - classNames.add( suite.getFullClassName() ); - } - return classNames; - } - - @Test - public void testJunit4Suite() - throws Exception - { - final OutputValidator outputValidator = unpack( "junit4-twoTestCaseSuite" ) - .sysProp( "testNgVersion", "5.7" ) - .sysProp( "testNgClassifier", "jdk15" ) - .executeTest(); - outputValidator.verifyErrorFreeLog().assertTestSuiteResults( 2, 0, 0, 0 ); - - List<ReportTestSuite> reports = - HelperAssertions.extractReports( outputValidator.getBaseDir() ); - Set<String> classNames = extractClassNames( reports ); - assertContains( classNames, "twoTestCaseSuite.BasicTest" ); - assertContains( classNames, "twoTestCaseSuite.Junit4TestTwo" ); - assertEquals( "wrong number of classes", 2, classNames.size() ); - IntegrationTestSuiteResults results = HelperAssertions.parseReportList( reports ); - HelperAssertions.assertTestSuiteResults( 2, 0, 0, 0, results ); - } - - @Test - public void testTestNGSuite() - throws Exception - { - final OutputValidator outputValidator = unpack( "testng-twoTestCaseSuite" ) - .sysProp( "testNgVersion", "5.7" ) - .sysProp( "testNgClassifier", "jdk15" ) - .executeTest(); - outputValidator.verifyErrorFreeLog().assertTestSuiteResults( 2, 0, 0, 0 ); - List<ReportTestSuite> reports = HelperAssertions.extractReports( outputValidator.getBaseDir() ); - Set<String> classNames = extractClassNames( reports ); - assertContains( classNames, "testng.two.TestNGTestTwo" ); - assertContains( classNames, "testng.two.TestNGSuiteTest" ); - assertEquals( "wrong number of classes", 2, classNames.size() ); - IntegrationTestSuiteResults results = HelperAssertions.parseReportList( reports ); - HelperAssertions.assertTestSuiteResults( 2, 0, 0, 0, results ); - } - -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/4d00932a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/UmlautDirIT.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/UmlautDirIT.java b/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/UmlautDirIT.java deleted file mode 100644 index 8848dc2..0000000 --- a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/UmlautDirIT.java +++ /dev/null @@ -1,64 +0,0 @@ -package org.apache.maven.surefire.its; - -/* - * 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.it.VerificationException; -import org.apache.maven.surefire.its.fixture.MavenLauncher; -import org.apache.maven.surefire.its.fixture.SurefireJUnit4IntegrationTestCase; -import org.apache.maven.surefire.its.fixture.SurefireLauncher; -import org.junit.Test; - -import java.io.File; -import java.io.IOException; - -/** - * Test a directory with an umlaut - * - * @author <a href="mailto:dfabul...@apache.org">Dan Fabulich</a> - */ -public class UmlautDirIT - extends SurefireJUnit4IntegrationTestCase -{ - @Test - public void testUmlaut() - throws Exception - { - specialUnpack().executeTest().verifyErrorFreeLog().assertTestSuiteResults( 1, 0, 0, 0 ); - } - - @Test - public void testUmlautIsolatedClassLoader() - throws Exception - { - specialUnpack().useSystemClassLoader( false ).executeTest().assertTestSuiteResults( 1, 0, 0, 0 ); - } - - SurefireLauncher specialUnpack() - throws VerificationException, IOException - { - SurefireLauncher unpack = unpack( "junit-pathWithUmlaut" ); - MavenLauncher maven = unpack.maven(); - - File dest = new File( maven.getUnpackedAt().getParentFile().getPath(), "/junit-pathWith\u00DCmlaut" ); - maven.moveUnpackTo( dest ); - return unpack; - } - -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/4d00932a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/UnicodeTestNamesIT.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/UnicodeTestNamesIT.java b/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/UnicodeTestNamesIT.java deleted file mode 100644 index 64db960..0000000 --- a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/UnicodeTestNamesIT.java +++ /dev/null @@ -1,75 +0,0 @@ -package org.apache.maven.surefire.its; - -/* - * 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 LicenseUni. - */ - -import org.apache.maven.surefire.its.fixture.OutputValidator; -import org.apache.maven.surefire.its.fixture.SurefireJUnit4IntegrationTestCase; -import org.apache.maven.surefire.its.fixture.SurefireLauncher; -import org.apache.maven.surefire.its.fixture.TestFile; -import org.junit.Test; - -import java.io.File; - -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; -import static org.junit.Assume.assumeFalse; - -/** - * Verifies unicode filenames pass through correctly. - */ -public class UnicodeTestNamesIT - extends SurefireJUnit4IntegrationTestCase -{ - private static final String TXT_REPORT = "junit.twoTestCases.\u800C\u7D22\u5176\u60C5Test.txt"; - private static final String XML_REPORT = "TEST-junit.twoTestCases.\u800C\u7D22\u5176\u60C5Test.xml"; - - @Test - public void checkFileNamesWithUnicode() - { - SurefireLauncher unpacked = unpack( "unicode-testnames" ); - File basedir = unpacked.getUnpackedAt(); - - unpacked.execute( "clean" ); - - File xxyz = new File( basedir, "src/test/java/junit/twoTestCases/XXYZTest.java" ); - File dest = new File( basedir, "src/test/java/junit/twoTestCases/\u800C\u7D22\u5176\u60C5Test.java" ); - - //noinspection ResultOfMethodCallIgnored - dest.delete(); - assertTrue( xxyz.renameTo( dest ) ); - - assertTrue( dest.exists() ); - assumeFalse( new File( basedir, "src/test/java/junit/twoTestCases/????Test.java" ).exists() ); - - OutputValidator outputValidator = - unpacked.executeTest() - .assertTestSuiteResults( 2, 0, 0, 0 ); - - TestFile surefireReportFile = outputValidator.getSurefireReportsFile( TXT_REPORT ); - assertTrue( surefireReportFile.exists() ); - surefireReportFile.assertContainsText( "junit.twoTestCases.????Test" ); - - TestFile surefireXmlReportFile = outputValidator.getSurefireReportsXmlFile( XML_REPORT ); - assertTrue( surefireXmlReportFile.exists() ); - assertFalse( surefireXmlReportFile.readFileToString().isEmpty() ); - surefireXmlReportFile.assertContainsText( "junit.twoTestCases.\u800C\u7D22\u5176\u60C5Test" ); - } - -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/4d00932a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/UseIsolatedClassLoaderIT.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/UseIsolatedClassLoaderIT.java b/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/UseIsolatedClassLoaderIT.java deleted file mode 100644 index b87f603..0000000 --- a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/UseIsolatedClassLoaderIT.java +++ /dev/null @@ -1,38 +0,0 @@ -package org.apache.maven.surefire.its; - -/* - * 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; - -/** - * Test useSystemClassLoader option - * - * @author <a href="mailto:dfabul...@apache.org">Dan Fabulich</a> - */ -public class UseIsolatedClassLoaderIT - extends SurefireJUnit4IntegrationTestCase -{ - @Test - public void testUseSystemClassLoader() - { - executeErrorFreeTest( "/isolated-classloader", 1 ); - } -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/4d00932a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/WorkingDirectoryIT.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/WorkingDirectoryIT.java b/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/WorkingDirectoryIT.java deleted file mode 100644 index 66fa3df..0000000 --- a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/WorkingDirectoryIT.java +++ /dev/null @@ -1,134 +0,0 @@ -package org.apache.maven.surefire.its; - -/* - * 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 java.io.File; -import java.io.FileInputStream; -import java.io.IOException; -import java.util.Properties; -import org.apache.maven.it.VerificationException; -import org.apache.maven.surefire.its.fixture.*; -import org.junit.Test; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; - -/** - * Test working directory configuration, SUREFIRE-416 - * - * @author <a href="mailto:dfabul...@apache.org">Dan Fabulich</a> - * @author <a href="mailto:krosenv...@apache.org">Kristian Rosenvold</a> - */ -public class WorkingDirectoryIT - extends SurefireJUnit4IntegrationTestCase -{ - - @Test - public void testWorkingDirectory() - throws Exception - { - final SurefireLauncher unpack = getUnpacked(); - final OutputValidator child = getPreparedChild( unpack ); - unpack.executeTest().verifyErrorFreeLog(); - child.assertTestSuiteResults( 1, 0, 0, 0 ); - verifyOutputDirectory( child ); - } - - @Test - public void testWorkingDirectoryNoFork() - throws Exception - { - final SurefireLauncher unpack = getUnpacked(); - final OutputValidator child = getPreparedChild( unpack ); - unpack.forkNever().executeTest().verifyErrorFreeLog(); - child.assertTestSuiteResults( 1, 0, 0, 0 ); - verifyOutputDirectory( child ); - } - - @Test - public void testWorkingDirectoryChildOnly() - throws Exception - { - final SurefireLauncher unpack = getUnpacked(); - final SurefireLauncher child = unpack.getSubProjectLauncher( "child" ); - //child.getTargetFile( "out.txt" ).delete(); - final OutputValidator outputValidator = child.executeTest().assertTestSuiteResults( 1, 0, 0, 0 ); - verifyOutputDirectory( outputValidator ); - } - - @Test - public void testWorkingDirectoryChildOnlyNoFork() - throws Exception - { - - final SurefireLauncher unpack = getUnpacked(); - final SurefireLauncher child = unpack.getSubProjectLauncher( "child" ); - //child.getTargetFile( "out.txt" ).delete(); - final OutputValidator outputValidator = child.forkNever().executeTest().assertTestSuiteResults( 1, 0, 0, 0 ); - verifyOutputDirectory( outputValidator ); - } - - private SurefireLauncher getUnpacked() - throws VerificationException, IOException - { - return unpack( "working-directory" ); - } - - private OutputValidator getPreparedChild( SurefireLauncher unpack ) - throws VerificationException - { - final OutputValidator child = unpack.getSubProjectValidator( "child" ); - getOutFile( child ).delete(); - return child; - } - - - private TestFile getOutFile( OutputValidator child ) - { - return child.getTargetFile( "out.txt" ); - } - - public void verifyOutputDirectory( OutputValidator childTestDir ) - throws IOException - { - final TestFile outFile = getOutFile( childTestDir ); - assertTrue( "out.txt doesn't exist: " + outFile.getAbsolutePath(), outFile.exists() ); - Properties p = new Properties(); - FileInputStream is = outFile.getFileInputStream(); - p.load( is ); - is.close(); - String userDirPath = p.getProperty( "user.dir" ); - assertNotNull( "user.dir was null in property file", userDirPath ); - File userDir = new File( userDirPath ); - // test if not a symlink - if ( childTestDir.getBaseDir().getCanonicalFile().equals( childTestDir.getBaseDir().getAbsoluteFile() ) ) - { - assertTrue( "wrong user.dir ! symlink ", - childTestDir.getBaseDir().getAbsolutePath().equalsIgnoreCase( userDir.getAbsolutePath() ) ); - } - else - { - assertEquals( "wrong user.dir symlink ", childTestDir.getBaseDir().getCanonicalPath(), - userDir.getCanonicalPath() ); - } - } - -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/4d00932a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/WorkingDirectoryIsInvalidPropertyIT.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/WorkingDirectoryIsInvalidPropertyIT.java b/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/WorkingDirectoryIsInvalidPropertyIT.java deleted file mode 100644 index 1415b6e..0000000 --- a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/WorkingDirectoryIsInvalidPropertyIT.java +++ /dev/null @@ -1,39 +0,0 @@ -package org.apache.maven.surefire.its; -/* - * 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; - -/** - * Test when the configured working directory is an invalid property, SUREFIRE-715 - * - * @author <a href="mailto:krosenv...@apache.org">Kristian Rosenvold</a> - */ -public class WorkingDirectoryIsInvalidPropertyIT - extends SurefireJUnit4IntegrationTestCase -{ - @Test - public void testWorkingDirectory() - throws Exception - { - unpack( "working-directory-is-invalid-property" ).maven().withFailure().executeTest().verifyTextInLog( - "workingDirectory cannot be null" ); - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/4d00932a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/WorkingDirectoryMissingIT.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/WorkingDirectoryMissingIT.java b/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/WorkingDirectoryMissingIT.java deleted file mode 100644 index 5247160..0000000 --- a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/WorkingDirectoryMissingIT.java +++ /dev/null @@ -1,39 +0,0 @@ -package org.apache.maven.surefire.its; - -/* - * 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; - -/** - * Test when the configured working directory does not exist, SUREFIRE-607 - * - * @author <a href="mailto:steph...@apache.org">Stephen Connolly</a> - */ -public class WorkingDirectoryMissingIT - extends SurefireJUnit4IntegrationTestCase -{ - @Test - public void testWorkingDirectory() - { - unpack( "working-directory-missing" ).executeTest().verifyErrorFreeLog(); - } - -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/4d00932a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/XmlReporterRunTimeIT.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/XmlReporterRunTimeIT.java b/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/XmlReporterRunTimeIT.java deleted file mode 100644 index e8ee58b..0000000 --- a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/XmlReporterRunTimeIT.java +++ /dev/null @@ -1,75 +0,0 @@ -package org.apache.maven.surefire.its; - -/* - * 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.plugins.surefire.report.ReportTestSuite; -import org.apache.maven.surefire.its.fixture.OutputValidator; -import org.apache.maven.surefire.its.fixture.SurefireJUnit4IntegrationTestCase; -import org.junit.Test; - -import static org.apache.maven.surefire.its.fixture.HelperAssertions.extractReports; -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.Matchers.allOf; -import static org.hamcrest.Matchers.greaterThanOrEqualTo; -import static org.hamcrest.Matchers.lessThan; - -/** - * Test reported runtime - * - * @author Kristian Rosenvold - */ -public class XmlReporterRunTimeIT - extends SurefireJUnit4IntegrationTestCase -{ - @Test - public void testForkModeAlways() - throws Exception - { - // just generate .surefire-<hash> in order to apply runOrder - unpack( "/runorder-parallel" ) - .executeTest() - .verifyErrorFree( 9 ); - - // now assert test results match expected values - OutputValidator outputValidator = unpack( "/runorder-parallel" ) - .executeTest() - .verifyErrorFree( 9 ); - - for ( ReportTestSuite report : extractReports( outputValidator.getBaseDir() ) ) - { - if ( "runorder.parallel.Test1".equals( report.getFullClassName() ) ) - { - // should be 6f but because of having Windows sleep discrepancy it is 5.95f - assertThat( "runorder.parallel.Test1 report.getTimeElapsed found:" + report.getTimeElapsed(), - report.getTimeElapsed(), allOf( greaterThanOrEqualTo( 5.95f ), lessThan( 7f ) ) ); - } - else if ( "runorder.parallel.Test2".equals( report.getFullClassName() ) ) - { - // should be 5f but because of having Windows sleep discrepancy it is 4.95f - assertThat( "runorder.parallel.Test2 report.getTimeElapsed found:" + report.getTimeElapsed(), - report.getTimeElapsed(), allOf( greaterThanOrEqualTo( 4.95f ), lessThan( 6f ) ) ); - } - else - { - System.out.println( "report = " + report ); - } - } - } -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/4d00932a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/fixture/Configuration.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/fixture/Configuration.java b/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/fixture/Configuration.java deleted file mode 100644 index dcd8184..0000000 --- a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/fixture/Configuration.java +++ /dev/null @@ -1,29 +0,0 @@ -package org.apache.maven.surefire.its.fixture; - -/* - * 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. - */ - -/** - * @author <a href="mailto:tibordig...@apache.org">Tibor Digana (tibor17)</a> - * @since 2.19 - */ -public enum Configuration -{ - TEST, INCLUDES, INCLUDES_FILE, INCLUDES_EXCLUDES, INCLUDES_EXCLUDES_FILE -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/4d00932a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/fixture/FailsafeOutputValidator.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/fixture/FailsafeOutputValidator.java b/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/fixture/FailsafeOutputValidator.java deleted file mode 100644 index b96cf9b..0000000 --- a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/fixture/FailsafeOutputValidator.java +++ /dev/null @@ -1,47 +0,0 @@ -package org.apache.maven.surefire.its.fixture; - -/* - * 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.it.VerificationException; - -public class FailsafeOutputValidator - extends OutputValidator -{ - public FailsafeOutputValidator( OutputValidator source ) - { - super( source.verifier ); - } - - @Override - public OutputValidator verifyErrorFree( int total ) - { - try - { - verifier.verifyErrorFreeLog(); - this.assertIntegrationTestSuiteResults( total, 0, 0, 0 ); - return this; - } - catch ( VerificationException e ) - { - throw new SurefireVerifierException( e ); - } - } - -}