http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/testng-method-pattern-before/pom.xml ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/testng-method-pattern-before/pom.xml b/surefire-integration-tests/src/test/resources/testng-method-pattern-before/pom.xml deleted file mode 100644 index 41768cd..0000000 --- a/surefire-integration-tests/src/test/resources/testng-method-pattern-before/pom.xml +++ /dev/null @@ -1,79 +0,0 @@ -<?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/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - - <groupId>org.apache.maven.plugins.surefire</groupId> - <artifactId>junit4</artifactId> - <version>1.0-SNAPSHOT</version> - <name>Test for Testng</name> - - <properties> - <maven.compiler.source>1.7</maven.compiler.source> - <maven.compiler.target>1.7</maven.compiler.target> - </properties> - - <profiles> - <profile> - <id>testng-old</id> - <activation> - <property><name>testNgClassifier</name></property> - </activation> - <dependencies> - <dependency> - <groupId>org.testng</groupId> - <artifactId>testng</artifactId> - <version>${testNgVersion}</version> - <classifier>${testNgClassifier}</classifier> - </dependency> - </dependencies> - </profile> - <profile> - <id>testng-new</id> - <activation> - <property><name>!testNgClassifier</name></property> - </activation> - <dependencies> - <dependency> - <groupId>org.testng</groupId> - <artifactId>testng</artifactId> - <version>${testNgVersion}</version> - </dependency> - </dependencies> - </profile> - </profiles> - - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-surefire-plugin</artifactId> - <version>${surefire.version}</version> - <configuration> - <test>BasicTest#testSuccess*</test> - </configuration> - </plugin> - </plugins> - </build> - -</project>
http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/testng-method-pattern-before/src/test/java/testng/BasicTest.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/testng-method-pattern-before/src/test/java/testng/BasicTest.java b/surefire-integration-tests/src/test/resources/testng-method-pattern-before/src/test/java/testng/BasicTest.java deleted file mode 100644 index 468e425..0000000 --- a/surefire-integration-tests/src/test/resources/testng-method-pattern-before/src/test/java/testng/BasicTest.java +++ /dev/null @@ -1,79 +0,0 @@ -package testng; - -/* - * 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.testng.annotations.*; -import org.testng.Assert; - -public class BasicTest -{ - - private boolean setUpCalled = false; - - private static boolean tearDownCalled = false; - - private Integer foo; - - @BeforeTest - public void intialize() - { - setUpCalled = true; - tearDownCalled = false; - System.out.println( "Called setUp" ); - foo = Integer.valueOf( 1 ); - } - - @AfterTest - public void shutdown() - { - setUpCalled = false; - tearDownCalled = true; - System.out.println( "Called tearDown" ); - } - - @Test - public void testSetUp() - { - Assert.assertTrue( setUpCalled ); - Assert.assertNotNull( foo ); - } - - - @Test - public void testSuccessOne() - { - Assert.assertTrue( true ); - Assert.assertNotNull( foo ); - } - - @Test - public void testSuccessTwo() - { - Assert.assertTrue( true ); - Assert.assertNotNull( foo ); - } - - @AfterClass - public static void oneTimeTearDown() - { - - } - -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/testng-method-pattern/pom.xml ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/testng-method-pattern/pom.xml b/surefire-integration-tests/src/test/resources/testng-method-pattern/pom.xml deleted file mode 100644 index 50b08bf..0000000 --- a/surefire-integration-tests/src/test/resources/testng-method-pattern/pom.xml +++ /dev/null @@ -1,80 +0,0 @@ -<?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/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - - <groupId>org.apache.maven.plugins.surefire</groupId> - <artifactId>junit4</artifactId> - <version>1.0-SNAPSHOT</version> - <name>Test for Testng</name> - - <properties> - <maven.compiler.source>1.7</maven.compiler.source> - <maven.compiler.target>1.7</maven.compiler.target> - </properties> - - <profiles> - <profile> - <id>testng-old</id> - <activation> - <property><name>testNgClassifier</name></property> - </activation> - <dependencies> - <dependency> - <groupId>org.testng</groupId> - <artifactId>testng</artifactId> - <version>${testNgVersion}</version> - <classifier>${testNgClassifier}</classifier> - </dependency> - </dependencies> - </profile> - <profile> - <id>testng-new</id> - <activation> - <property><name>!testNgClassifier</name></property> - </activation> - <dependencies> - <dependency> - <groupId>org.testng</groupId> - <artifactId>testng</artifactId> - <version>${testNgVersion}</version> - </dependency> - </dependencies> - </profile> - </profiles> - - - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-surefire-plugin</artifactId> - <version>${surefire.version}</version> - <configuration> - <test>BasicTest#testSuccess*</test> - </configuration> - </plugin> - </plugins> - </build> - -</project> http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/testng-method-pattern/src/test/java/testng/BasicTest.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/testng-method-pattern/src/test/java/testng/BasicTest.java b/surefire-integration-tests/src/test/resources/testng-method-pattern/src/test/java/testng/BasicTest.java deleted file mode 100644 index 381016c..0000000 --- a/surefire-integration-tests/src/test/resources/testng-method-pattern/src/test/java/testng/BasicTest.java +++ /dev/null @@ -1,73 +0,0 @@ -package testng; - -/* - * 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.testng.annotations.*; -import org.testng.Assert; - -public class BasicTest -{ - - private boolean setUpCalled = false; - - private static boolean tearDownCalled = false; - - @BeforeTest - public void setUp() - { - setUpCalled = true; - tearDownCalled = false; - System.out.println( "Called setUp" ); - } - - @AfterTest - public void tearDown() - { - setUpCalled = false; - tearDownCalled = true; - System.out.println( "Called tearDown" ); - } - - @Test - public void testSetUp() - { - Assert.assertTrue( setUpCalled ); - } - - - @Test - public void testSuccessOne() - { - Assert.assertTrue( true ); - } - - @Test - public void testSuccessTwo() - { - Assert.assertTrue( true ); - } - - @AfterClass - public static void oneTimeTearDown() - { - - } - -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/testng-multiple-method-patterns/pom.xml ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/testng-multiple-method-patterns/pom.xml b/surefire-integration-tests/src/test/resources/testng-multiple-method-patterns/pom.xml deleted file mode 100644 index eef5f57..0000000 --- a/surefire-integration-tests/src/test/resources/testng-multiple-method-patterns/pom.xml +++ /dev/null @@ -1,108 +0,0 @@ -<?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/xsd/maven-4.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-745-testng</artifactId> - <version>1.0</version> - - <properties> - <included/> - <excluded/> - </properties> - - <dependencies> - <dependency> - <groupId>org.testng</groupId> - <artifactId>testng</artifactId> - <version>5.7</version> - <classifier>jdk15</classifier> - <scope>test</scope> - </dependency> - </dependencies> - - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-surefire-plugin</artifactId> - </plugin> - </plugins> - </build> - - <profiles> - <profile> - <id>testng-test</id> - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-surefire-plugin</artifactId> - </plugin> - </plugins> - </build> - </profile> - <profile> - <id>testng-includes</id> - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-surefire-plugin</artifactId> - <configuration> - <includes> - <include>${included}</include> - </includes> - </configuration> - </plugin> - </plugins> - </build> - </profile> - <profile> - <id>testng-includes-excludes</id> - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-surefire-plugin</artifactId> - <configuration> - <includes> - <include>${included}</include> - </includes> - <excludes> - <exclude>${excluded}</exclude> - </excludes> - </configuration> - </plugin> - </plugins> - </build> - </profile> - </profiles> - -</project> http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/testng-multiple-method-patterns/src/test/java/jiras/surefire745/BasicTest.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/testng-multiple-method-patterns/src/test/java/jiras/surefire745/BasicTest.java b/surefire-integration-tests/src/test/resources/testng-multiple-method-patterns/src/test/java/jiras/surefire745/BasicTest.java deleted file mode 100644 index 3e2728e..0000000 --- a/surefire-integration-tests/src/test/resources/testng-multiple-method-patterns/src/test/java/jiras/surefire745/BasicTest.java +++ /dev/null @@ -1,47 +0,0 @@ -package jiras.surefire745; - - -/* - * 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.testng.annotations.*; -import static org.testng.Assert.*; - -public class BasicTest -{ - - @Test - public void testSuccessOne() - { - System.out.println( getClass() + "#testSuccessOne" ); - } - - @Test - public void testSuccessTwo() - { - System.out.println( getClass() + "#testSuccessTwo" ); - } - - @Test - public void testFailure() - { - System.out.println( getClass() + "#testFailure" ); - fail( ); - } -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/testng-multiple-method-patterns/src/test/java/jiras/surefire745/TestFive.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/testng-multiple-method-patterns/src/test/java/jiras/surefire745/TestFive.java b/surefire-integration-tests/src/test/resources/testng-multiple-method-patterns/src/test/java/jiras/surefire745/TestFive.java deleted file mode 100644 index d11ef5d..0000000 --- a/surefire-integration-tests/src/test/resources/testng-multiple-method-patterns/src/test/java/jiras/surefire745/TestFive.java +++ /dev/null @@ -1,44 +0,0 @@ -package jiras.surefire745; - -/* - * 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.testng.annotations.*; - -public class TestFive -{ - - @Test - public void testSuccessOne() - { - System.out.println( getClass() + "#testSuccessOne" ); - } - - @Test - public void testSuccessTwo() - { - System.out.println( getClass() + "#testSuccessTwo" ); - } - - @Test - public void testSuccessThree() - { - System.out.println( getClass() + "#testSuccessThree" ); - } -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/testng-multiple-method-patterns/src/test/java/jiras/surefire745/TestFour.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/testng-multiple-method-patterns/src/test/java/jiras/surefire745/TestFour.java b/surefire-integration-tests/src/test/resources/testng-multiple-method-patterns/src/test/java/jiras/surefire745/TestFour.java deleted file mode 100644 index 0b1b6c6..0000000 --- a/surefire-integration-tests/src/test/resources/testng-multiple-method-patterns/src/test/java/jiras/surefire745/TestFour.java +++ /dev/null @@ -1,44 +0,0 @@ -package jiras.surefire745; - -/* - * 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.testng.annotations.*; - -public class TestFour -{ - - @Test - public void testSuccessOne() - { - System.out.println( getClass() + "#testSuccessOne" ); - } - - @Test - public void testSuccessTwo() - { - System.out.println( getClass() + "#testSuccessTwo" ); - } - - @Test - public void testSuccessThree() - { - System.out.println( getClass() + "#testSuccessThree" ); - } -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/testng-multiple-method-patterns/src/test/java/jiras/surefire745/TestThree.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/testng-multiple-method-patterns/src/test/java/jiras/surefire745/TestThree.java b/surefire-integration-tests/src/test/resources/testng-multiple-method-patterns/src/test/java/jiras/surefire745/TestThree.java deleted file mode 100644 index 0d290dc..0000000 --- a/surefire-integration-tests/src/test/resources/testng-multiple-method-patterns/src/test/java/jiras/surefire745/TestThree.java +++ /dev/null @@ -1,46 +0,0 @@ -package jiras.surefire745; - -/* - * 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.testng.annotations.*; -import static org.testng.Assert.*; - -public class TestThree -{ - - @Test - public void testSuccessOne() - { - System.out.println( getClass() + "#testSuccessOne" ); - } - - @Test - public void testSuccessTwo() - { - System.out.println( getClass() + "#testSuccessTwo" ); - } - - @Test - public void testFailOne() - { - System.out.println( getClass() + "#testFailOne" ); - fail(); - } -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/testng-multiple-method-patterns/src/test/java/jiras/surefire745/TestTwo.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/testng-multiple-method-patterns/src/test/java/jiras/surefire745/TestTwo.java b/surefire-integration-tests/src/test/resources/testng-multiple-method-patterns/src/test/java/jiras/surefire745/TestTwo.java deleted file mode 100644 index 4e1b56d..0000000 --- a/surefire-integration-tests/src/test/resources/testng-multiple-method-patterns/src/test/java/jiras/surefire745/TestTwo.java +++ /dev/null @@ -1,38 +0,0 @@ -package jiras.surefire745; - -/* - * 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.testng.annotations.*; - -public class TestTwo -{ - - @Test - public void testSuccessOne() - { - System.out.println( getClass() + "#testSuccessOne" ); - } - - @Test - public void testSuccessTwo() - { - System.out.println( getClass() + "#testSuccessTwo" ); - } -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/testng-objectFactory/pom.xml ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/testng-objectFactory/pom.xml b/surefire-integration-tests/src/test/resources/testng-objectFactory/pom.xml deleted file mode 100644 index ee76f09..0000000 --- a/surefire-integration-tests/src/test/resources/testng-objectFactory/pom.xml +++ /dev/null @@ -1,66 +0,0 @@ -<?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/xsd/maven-4.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>testng-testobjectfactory</artifactId> - <version>1.0</version> - <name>TestNG using custom object factory.</name> - - <dependencies> - <dependency> - <groupId>org.testng</groupId> - <artifactId>testng</artifactId> - <version>5.7</version> - <classifier>jdk15</classifier> - <scope>test</scope> - </dependency> - </dependencies> - - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-surefire-plugin</artifactId> - <configuration> - <properties> - <property> - <name>objectfactory</name> - <value>testng.objectfactory.TestNGCustomObjectFactory</value> - </property> - </properties> - </configuration> - </plugin> - </plugins> - </build> - -</project> - http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/testng-objectFactory/src/test/java/testng/objectfactory/FileHelper.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/testng-objectFactory/src/test/java/testng/objectfactory/FileHelper.java b/surefire-integration-tests/src/test/resources/testng-objectFactory/src/test/java/testng/objectfactory/FileHelper.java deleted file mode 100644 index 4db30b6..0000000 --- a/surefire-integration-tests/src/test/resources/testng-objectFactory/src/test/java/testng/objectfactory/FileHelper.java +++ /dev/null @@ -1,25 +0,0 @@ -package testng.objectfactory; - -import java.io.File; -import java.io.FileWriter; -import java.io.IOException; - -public class FileHelper -{ - public static void writeFile( String fileName, String content ) - { - try - { - File target = new File( System.getProperty("user.dir"), "target" ).getCanonicalFile(); - File listenerOutput = new File( target, fileName ); - FileWriter out = new FileWriter( listenerOutput, true ); - out.write( content ); - out.flush(); - out.close(); - } - catch ( IOException exception ) - { - throw new RuntimeException( exception ); - } - } -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/testng-objectFactory/src/test/java/testng/objectfactory/TestNGCustomObjectFactory.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/testng-objectFactory/src/test/java/testng/objectfactory/TestNGCustomObjectFactory.java b/surefire-integration-tests/src/test/resources/testng-objectFactory/src/test/java/testng/objectfactory/TestNGCustomObjectFactory.java deleted file mode 100644 index 74feb33..0000000 --- a/surefire-integration-tests/src/test/resources/testng-objectFactory/src/test/java/testng/objectfactory/TestNGCustomObjectFactory.java +++ /dev/null @@ -1,22 +0,0 @@ -package testng.objectfactory; - -import java.lang.reflect.Constructor; -import org.testng.IObjectFactory; - -public class TestNGCustomObjectFactory implements IObjectFactory -{ - public Object newInstance( Constructor constructor, Object... params ) - { - String testClassName = constructor.getDeclaringClass().getName(); - FileHelper.writeFile( "objectFactory-output.txt", "Instantiated Test: " + testClassName + "\n" ); - try - { - return constructor.newInstance( params ); - } - catch ( Exception exception ) - { - throw new RuntimeException( exception ); - } - } - -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/testng-objectFactory/src/test/java/testng/objectfactory/TestNGSuiteTest.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/testng-objectFactory/src/test/java/testng/objectfactory/TestNGSuiteTest.java b/surefire-integration-tests/src/test/resources/testng-objectFactory/src/test/java/testng/objectfactory/TestNGSuiteTest.java deleted file mode 100644 index 1dcc7ed..0000000 --- a/surefire-integration-tests/src/test/resources/testng-objectFactory/src/test/java/testng/objectfactory/TestNGSuiteTest.java +++ /dev/null @@ -1,11 +0,0 @@ -package testng.objectfactory; - -import org.testng.annotations.Test; - -public class TestNGSuiteTest -{ - @Test - public void doNothing() - { - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/testng-parallel-suites/pom.xml ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/testng-parallel-suites/pom.xml b/surefire-integration-tests/src/test/resources/testng-parallel-suites/pom.xml deleted file mode 100644 index e3e347b..0000000 --- a/surefire-integration-tests/src/test/resources/testng-parallel-suites/pom.xml +++ /dev/null @@ -1,81 +0,0 @@ -<?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/xsd/maven-4.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>testng-parallel-suites</artifactId> - <version>1.0</version> - - <url>http://maven.apache.org</url> - - <developers> - <developer> - <id>tibordigana</id> - <name>Tibor DigaÅa (tibor17)</name> - <email>tibordig...@apache.org</email> - <roles> - <role>Committer</role> - </roles> - <timezone>Europe/Bratislava</timezone> - </developer> - </developers> - - <dependencies> - <dependency> - <groupId>org.testng</groupId> - <artifactId>testng</artifactId> - <version>6.9.8</version> - <scope>test</scope> - </dependency> - </dependencies> - - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-surefire-plugin</artifactId> - <configuration> - <suiteXmlFiles> - <file>src/test/resources/testng1.xml</file> - <file>src/test/resources/testng2.xml</file> - </suiteXmlFiles> - <properties> - <property> - <name>suitethreadpoolsize</name> - <value>2</value> - </property> - </properties> - </configuration> - </plugin> - </plugins> - </build> - -</project> http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/testng-parallel-suites/src/test/java/testng/suiteXml/ShouldNotRunTest.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/testng-parallel-suites/src/test/java/testng/suiteXml/ShouldNotRunTest.java b/surefire-integration-tests/src/test/resources/testng-parallel-suites/src/test/java/testng/suiteXml/ShouldNotRunTest.java deleted file mode 100644 index d2eb9ca..0000000 --- a/surefire-integration-tests/src/test/resources/testng-parallel-suites/src/test/java/testng/suiteXml/ShouldNotRunTest.java +++ /dev/null @@ -1,35 +0,0 @@ -package testng.suiteXml; - -/* - * 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.testng.annotations.Test; - -/** - * @author <a href="mailto:tibordig...@apache.org">Tibor Digana (tibor17)</a> - * @since 2.19 - */ -public class ShouldNotRunTest { - - @Test - public void shouldNotRun() - { - System.out.println( getClass().getSimpleName() + "#shouldNotRun()" ); - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/testng-parallel-suites/src/test/java/testng/suiteXml/TestNGSuiteTest.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/testng-parallel-suites/src/test/java/testng/suiteXml/TestNGSuiteTest.java b/surefire-integration-tests/src/test/resources/testng-parallel-suites/src/test/java/testng/suiteXml/TestNGSuiteTest.java deleted file mode 100644 index b20e81e..0000000 --- a/surefire-integration-tests/src/test/resources/testng-parallel-suites/src/test/java/testng/suiteXml/TestNGSuiteTest.java +++ /dev/null @@ -1,43 +0,0 @@ -package testng.suiteXml; - -/* - * 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.testng.annotations.Test; - -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; - -/** - * @author <a href="mailto:tibordig...@apache.org">Tibor Digana (tibor17)</a> - * @since 2.19 - */ -public class TestNGSuiteTest { - private static final AtomicInteger counter = new AtomicInteger(); - - @Test - public void shouldRunAndPrintItself() - throws Exception - { - System.out.println( getClass().getSimpleName() + "#shouldRunAndPrintItself() " - + counter.incrementAndGet() + "."); - - TimeUnit.SECONDS.sleep( 2 ); - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/testng-parallel-suites/src/test/resources/testng1.xml ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/testng-parallel-suites/src/test/resources/testng1.xml b/surefire-integration-tests/src/test/resources/testng-parallel-suites/src/test/resources/testng1.xml deleted file mode 100644 index ac62eca..0000000 --- a/surefire-integration-tests/src/test/resources/testng-parallel-suites/src/test/resources/testng1.xml +++ /dev/null @@ -1,30 +0,0 @@ -<!-- - ~ 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. - --> - -<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" > - -<suite name="Suite 1 Test" verbose="4"> - - <test name="Sample Test 1"> - <classes> - <class name="testng.suiteXml.TestNGSuiteTest"/> - </classes> - </test> - -</suite> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/testng-parallel-suites/src/test/resources/testng2.xml ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/testng-parallel-suites/src/test/resources/testng2.xml b/surefire-integration-tests/src/test/resources/testng-parallel-suites/src/test/resources/testng2.xml deleted file mode 100644 index 4036c21..0000000 --- a/surefire-integration-tests/src/test/resources/testng-parallel-suites/src/test/resources/testng2.xml +++ /dev/null @@ -1,30 +0,0 @@ -<!-- - ~ 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. - --> - -<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" > - -<suite name="Suite 2 Test" verbose="4"> - - <test name="Sample Test 2"> - <classes> - <class name="testng.suiteXml.TestNGSuiteTest"/> - </classes> - </test> - -</suite> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/testng-parallel-with-annotations/pom.xml ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/testng-parallel-with-annotations/pom.xml b/surefire-integration-tests/src/test/resources/testng-parallel-with-annotations/pom.xml deleted file mode 100644 index 9464c84..0000000 --- a/surefire-integration-tests/src/test/resources/testng-parallel-with-annotations/pom.xml +++ /dev/null @@ -1,42 +0,0 @@ -<?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/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - - <groupId>org.apache.maven.plugins.surefire</groupId> - <artifactId>testng-group-thread-parallel</artifactId> - <version>1.0-SNAPSHOT</version> - <name>TestNG group/parallel thread tests, with parallel settings set by @Test(threadPoolSize)</name> - <properties> - <maven.compiler.source>1.7</maven.compiler.source> - <maven.compiler.target>1.7</maven.compiler.target> - </properties> - <dependencies> - <dependency> - <groupId>org.testng</groupId> - <artifactId>testng</artifactId> - <version>5.8</version> - <classifier>jdk15</classifier> - <scope>test</scope> - </dependency> - </dependencies> - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-surefire-plugin</artifactId> - <version>${surefire.version}</version> - </plugin> - </plugins> - </build> -</project> http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/testng-parallel-with-annotations/src/test/java/testng/paralellwithannotations/TestNGParallelTest.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/testng-parallel-with-annotations/src/test/java/testng/paralellwithannotations/TestNGParallelTest.java b/surefire-integration-tests/src/test/resources/testng-parallel-with-annotations/src/test/java/testng/paralellwithannotations/TestNGParallelTest.java deleted file mode 100644 index e6904e9..0000000 --- a/surefire-integration-tests/src/test/resources/testng-parallel-with-annotations/src/test/java/testng/paralellwithannotations/TestNGParallelTest.java +++ /dev/null @@ -1,69 +0,0 @@ -package testng.paralellwithannotations; - -/* - * 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 static org.testng.Assert.*; -import org.testng.annotations.AfterSuite; -import org.testng.annotations.BeforeSuite; -import org.testng.annotations.Test; -import java.util.Date; - -/** - * Test that parallel tests actually run and complete within the expected time. - */ -public class TestNGParallelTest -{ - - static int testCount = 0; - - static long startTime; - - @BeforeSuite( alwaysRun = true ) - public void startClock() - { - startTime = new Date().getTime(); - } - - @AfterSuite( alwaysRun = true ) - public void checkTestResults() - { - long runtime = new Date().getTime() - startTime; - System.out.println( "Runtime was: " + runtime ); - assertTrue( testCount == 3, "Expected test to be run 3 times, but was " + testCount ); - // Note, this can be < 1000 on Windows. - assertTrue( runtime < 1400, "Runtime was " + runtime + ". It should be a little over 1000ms" ); - } - - @Test( threadPoolSize = 2, invocationCount = 3 ) - public void incrementTestCountAndSleepForOneSecond() - throws InterruptedException - { - incrementTestCount(); - Thread.sleep( 500 ); - System.out.println( "Ran test" ); - } - - private synchronized void incrementTestCount() - { - testCount++; - } - -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/testng-path with spaces/pom.xml ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/testng-path with spaces/pom.xml b/surefire-integration-tests/src/test/resources/testng-path with spaces/pom.xml deleted file mode 100644 index 3f1138a..0000000 --- a/surefire-integration-tests/src/test/resources/testng-path with spaces/pom.xml +++ /dev/null @@ -1,76 +0,0 @@ -<?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/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - - <groupId>org.apache.maven.plugins.surefire</groupId> - <artifactId>testng-path-with-spaces</artifactId> - <version>1.0-SNAPSHOT</version> - <name>TestNG test in a path with spaces</name> - - <properties> - <maven.compiler.source>1.7</maven.compiler.source> - <maven.compiler.target>1.7</maven.compiler.target> - </properties> - - <profiles> - <profile> - <id>testng-old</id> - <activation> - <property><name>testNgClassifier</name></property> - </activation> - <dependencies> - <dependency> - <groupId>org.testng</groupId> - <artifactId>testng</artifactId> - <version>${testNgVersion}</version> - <classifier>${testNgClassifier}</classifier> - </dependency> - </dependencies> - </profile> - <profile> - <id>testng-new</id> - <activation> - <property><name>!testNgClassifier</name></property> - </activation> - <dependencies> - <dependency> - <groupId>org.testng</groupId> - <artifactId>testng</artifactId> - <version>${testNgVersion}</version> - </dependency> - </dependencies> - </profile> - </profiles> - - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-surefire-plugin</artifactId> - <version>${surefire.version}</version> - </plugin> - </plugins> - </build> - -</project> http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/testng-path with spaces/src/test/java/testng/pathWithSpaces/TestNGSuiteTest.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/testng-path with spaces/src/test/java/testng/pathWithSpaces/TestNGSuiteTest.java b/surefire-integration-tests/src/test/resources/testng-path with spaces/src/test/java/testng/pathWithSpaces/TestNGSuiteTest.java deleted file mode 100644 index 92549a3..0000000 --- a/surefire-integration-tests/src/test/resources/testng-path with spaces/src/test/java/testng/pathWithSpaces/TestNGSuiteTest.java +++ /dev/null @@ -1,35 +0,0 @@ -package testng.pathWithSpaces; - -/* - * 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.net.URISyntaxException; - -import org.testng.annotations.Test; - - -public class TestNGSuiteTest { - - @Test - public void loadTestResourceWithSpaces() throws URISyntaxException - { - new File( getClass().getResource( "/test.txt" ).toURI() ); - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/testng-path with spaces/src/test/resources/test.txt ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/testng-path with spaces/src/test/resources/test.txt b/surefire-integration-tests/src/test/resources/testng-path with spaces/src/test/resources/test.txt deleted file mode 100644 index 6769dd6..0000000 --- a/surefire-integration-tests/src/test/resources/testng-path with spaces/src/test/resources/test.txt +++ /dev/null @@ -1 +0,0 @@ -Hello world! \ No newline at end of file http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/testng-simple/pom.xml ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/testng-simple/pom.xml b/surefire-integration-tests/src/test/resources/testng-simple/pom.xml deleted file mode 100644 index d361ddc..0000000 --- a/surefire-integration-tests/src/test/resources/testng-simple/pom.xml +++ /dev/null @@ -1,103 +0,0 @@ -<?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/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - - <groupId>org.apache.maven.plugins.surefire</groupId> - <artifactId>testng-simple</artifactId> - <version>1.0-SNAPSHOT</version> - <name>TestNG simple test</name> - - <profiles> - <profile> - <id>testng-old</id> - <activation> - <property><name>testNgClassifier</name></property> - </activation> - <dependencies> - <dependency> - <groupId>org.testng</groupId> - <artifactId>testng</artifactId> - <version>${testNgVersion}</version> - <classifier>${testNgClassifier}</classifier> - <exclusions> - <exclusion> - <!-- NOTE: Deliberaty excluding junit to enforce TestNG only tests, cf. SUREFIRE-642 --> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - </exclusion> - </exclusions> - </dependency> - </dependencies> - </profile> - <profile> - <id>testng-new</id> - <activation> - <property><name>!testNgClassifier</name></property> - </activation> - <dependencies> - <dependency> - <groupId>org.testng</groupId> - <artifactId>testng</artifactId> - <version>${testNgVersion}</version> - <exclusions> - <exclusion> - <!-- NOTE: Deliberaty excluding junit to enforce TestNG only tests, cf. SUREFIRE-642 --> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - </exclusion> - </exclusions> - </dependency> - </dependencies> - </profile> - </profiles> - - <properties> - <surefire.testng.verbose>0</surefire.testng.verbose> - <argLine/> - <jacoco.agent/> - <maven.compiler.source>1.7</maven.compiler.source> - <maven.compiler.target>1.7</maven.compiler.target> - </properties> - - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-surefire-plugin</artifactId> - <version>${surefire.version}</version> - <configuration> - <argLine>${argLine} ${jacoco.agent}</argLine> - <runOrder>reversealphabetical</runOrder> - <properties> - <property> - <name>surefire.testng.verbose</name> - <value>${surefire.testng.verbose}</value> - </property> - </properties> - </configuration> - </plugin> - </plugins> - </build> - -</project> http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/testng-simple/src/test/java/testng/simple/TestNGSuiteTestA.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/testng-simple/src/test/java/testng/simple/TestNGSuiteTestA.java b/surefire-integration-tests/src/test/resources/testng-simple/src/test/java/testng/simple/TestNGSuiteTestA.java deleted file mode 100644 index 6f97d09..0000000 --- a/surefire-integration-tests/src/test/resources/testng-simple/src/test/java/testng/simple/TestNGSuiteTestA.java +++ /dev/null @@ -1,32 +0,0 @@ -package testng.simple; - -/* - * 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.testng.annotations.Test; - - -public class TestNGSuiteTestA { - - @Test - public void doNothing() - { - - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/testng-simple/src/test/java/testng/simple/TestNGSuiteTestB.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/testng-simple/src/test/java/testng/simple/TestNGSuiteTestB.java b/surefire-integration-tests/src/test/resources/testng-simple/src/test/java/testng/simple/TestNGSuiteTestB.java deleted file mode 100644 index e8d856d..0000000 --- a/surefire-integration-tests/src/test/resources/testng-simple/src/test/java/testng/simple/TestNGSuiteTestB.java +++ /dev/null @@ -1,32 +0,0 @@ -package testng.simple; - -/* - * 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.testng.annotations.Test; - - -public class TestNGSuiteTestB { - - @Test - public void doNothing() - { - - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/testng-simple/src/test/java/testng/simple/TestNGSuiteTestC.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/testng-simple/src/test/java/testng/simple/TestNGSuiteTestC.java b/surefire-integration-tests/src/test/resources/testng-simple/src/test/java/testng/simple/TestNGSuiteTestC.java deleted file mode 100644 index 751feff..0000000 --- a/surefire-integration-tests/src/test/resources/testng-simple/src/test/java/testng/simple/TestNGSuiteTestC.java +++ /dev/null @@ -1,32 +0,0 @@ -package testng.simple; - -/* - * 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.testng.annotations.Test; - - -public class TestNGSuiteTestC { - - @Test - public void doNothing() - { - - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/testng-single-method-5-14-9/pom.xml ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/testng-single-method-5-14-9/pom.xml b/surefire-integration-tests/src/test/resources/testng-single-method-5-14-9/pom.xml deleted file mode 100644 index a10bd0f..0000000 --- a/surefire-integration-tests/src/test/resources/testng-single-method-5-14-9/pom.xml +++ /dev/null @@ -1,57 +0,0 @@ -<?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/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - - <groupId>org.apache.maven.plugins.surefire</groupId> - <artifactId>junit4</artifactId> - <version>1.0-SNAPSHOT</version> - <name>Test for Testng</name> - - <properties> - <maven.compiler.source>1.7</maven.compiler.source> - <maven.compiler.target>1.7</maven.compiler.target> - </properties> - - <dependencies> - <dependency> - <groupId>org.testng</groupId> - <artifactId>testng</artifactId> - <version>5.14.9</version> - </dependency> - </dependencies> - - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-surefire-plugin</artifactId> - <version>${surefire.version}</version> - <configuration> - <test>BasicTest#testSuccessOne</test> - </configuration> - </plugin> - </plugins> - </build> - -</project> http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/testng-single-method-5-14-9/src/test/java/testng/BasicTest.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/testng-single-method-5-14-9/src/test/java/testng/BasicTest.java b/surefire-integration-tests/src/test/resources/testng-single-method-5-14-9/src/test/java/testng/BasicTest.java deleted file mode 100644 index 381016c..0000000 --- a/surefire-integration-tests/src/test/resources/testng-single-method-5-14-9/src/test/java/testng/BasicTest.java +++ /dev/null @@ -1,73 +0,0 @@ -package testng; - -/* - * 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.testng.annotations.*; -import org.testng.Assert; - -public class BasicTest -{ - - private boolean setUpCalled = false; - - private static boolean tearDownCalled = false; - - @BeforeTest - public void setUp() - { - setUpCalled = true; - tearDownCalled = false; - System.out.println( "Called setUp" ); - } - - @AfterTest - public void tearDown() - { - setUpCalled = false; - tearDownCalled = true; - System.out.println( "Called tearDown" ); - } - - @Test - public void testSetUp() - { - Assert.assertTrue( setUpCalled ); - } - - - @Test - public void testSuccessOne() - { - Assert.assertTrue( true ); - } - - @Test - public void testSuccessTwo() - { - Assert.assertTrue( true ); - } - - @AfterClass - public static void oneTimeTearDown() - { - - } - -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/testng-single-method/pom.xml ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/testng-single-method/pom.xml b/surefire-integration-tests/src/test/resources/testng-single-method/pom.xml deleted file mode 100644 index 32ebfaf..0000000 --- a/surefire-integration-tests/src/test/resources/testng-single-method/pom.xml +++ /dev/null @@ -1,80 +0,0 @@ -<?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/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - - <groupId>org.apache.maven.plugins.surefire</groupId> - <artifactId>junit4</artifactId> - <version>1.0-SNAPSHOT</version> - <name>Test for Testng</name> - - <properties> - <maven.compiler.source>1.7</maven.compiler.source> - <maven.compiler.target>1.7</maven.compiler.target> - </properties> - - <profiles> - <profile> - <id>testng-old</id> - <activation> - <property><name>testNgClassifier</name></property> - </activation> - <dependencies> - <dependency> - <groupId>org.testng</groupId> - <artifactId>testng</artifactId> - <version>${testNgVersion}</version> - <classifier>${testNgClassifier}</classifier> - </dependency> - </dependencies> - </profile> - <profile> - <id>testng-new</id> - <activation> - <property><name>!testNgClassifier</name></property> - </activation> - <dependencies> - <dependency> - <groupId>org.testng</groupId> - <artifactId>testng</artifactId> - <version>${testNgVersion}</version> - </dependency> - </dependencies> - </profile> - </profiles> - - - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-surefire-plugin</artifactId> - <version>${surefire.version}</version> - <configuration> - <test>BasicTest#testSuccessOne</test> - </configuration> - </plugin> - </plugins> - </build> - -</project> http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/testng-single-method/src/test/java/testng/BasicTest.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/testng-single-method/src/test/java/testng/BasicTest.java b/surefire-integration-tests/src/test/resources/testng-single-method/src/test/java/testng/BasicTest.java deleted file mode 100644 index 381016c..0000000 --- a/surefire-integration-tests/src/test/resources/testng-single-method/src/test/java/testng/BasicTest.java +++ /dev/null @@ -1,73 +0,0 @@ -package testng; - -/* - * 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.testng.annotations.*; -import org.testng.Assert; - -public class BasicTest -{ - - private boolean setUpCalled = false; - - private static boolean tearDownCalled = false; - - @BeforeTest - public void setUp() - { - setUpCalled = true; - tearDownCalled = false; - System.out.println( "Called setUp" ); - } - - @AfterTest - public void tearDown() - { - setUpCalled = false; - tearDownCalled = true; - System.out.println( "Called tearDown" ); - } - - @Test - public void testSetUp() - { - Assert.assertTrue( setUpCalled ); - } - - - @Test - public void testSuccessOne() - { - Assert.assertTrue( true ); - } - - @Test - public void testSuccessTwo() - { - Assert.assertTrue( true ); - } - - @AfterClass - public static void oneTimeTearDown() - { - - } - -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/testng-succes-percentage/pom.xml ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/testng-succes-percentage/pom.xml b/surefire-integration-tests/src/test/resources/testng-succes-percentage/pom.xml deleted file mode 100644 index 4e74bd8..0000000 --- a/surefire-integration-tests/src/test/resources/testng-succes-percentage/pom.xml +++ /dev/null @@ -1,65 +0,0 @@ -<?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/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - - <parent> - <groupId>org.apache.maven.surefire</groupId> - <artifactId>it-parent</artifactId> - <version>1.0</version> - </parent> - - <artifactId>testng-success-percentage</artifactId> - <version>1.0-SNAPSHOT</version> - <name>Test for Testng</name> - - <profiles> - <profile> - <id>testng-old</id> - <activation> - <property><name>testNgClassifier</name></property> - </activation> - <dependencies> - <dependency> - <groupId>org.testng</groupId> - <artifactId>testng</artifactId> - <version>${testNgVersion}</version> - <classifier>${testNgClassifier}</classifier> - </dependency> - </dependencies> - </profile> - <profile> - <id>testng-new</id> - <activation> - <property><name>!testNgClassifier</name></property> - </activation> - <dependencies> - <dependency> - <groupId>org.testng</groupId> - <artifactId>testng</artifactId> - <version>${testNgVersion}</version> - </dependency> - </dependencies> - </profile> - </profiles> -</project> http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/testng-succes-percentage/src/test/java/testng/TestNGSuccessPercentFailingTest.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/testng-succes-percentage/src/test/java/testng/TestNGSuccessPercentFailingTest.java b/surefire-integration-tests/src/test/resources/testng-succes-percentage/src/test/java/testng/TestNGSuccessPercentFailingTest.java deleted file mode 100644 index 791869c..0000000 --- a/surefire-integration-tests/src/test/resources/testng-succes-percentage/src/test/java/testng/TestNGSuccessPercentFailingTest.java +++ /dev/null @@ -1,44 +0,0 @@ -package testng; - -/* - * 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.testng.annotations.*; -import static org.testng.Assert.*; -import java.util.concurrent.atomic.AtomicInteger; - -public class TestNGSuccessPercentFailingTest -{ - - private static final AtomicInteger counter = new AtomicInteger( 0 ); - - // Pass 2 of 4 tests, expect this test to fail when 60% success is required - @Test( invocationCount = 4, successPercentage = 60 ) - public void testFailure() - { - int value = counter.addAndGet( 1 ); - assertTrue( isOdd( value ), "is odd: " + value ); - } - - private boolean isOdd( int number ) - { - return number % 2 == 0; - } - -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/testng-succes-percentage/src/test/java/testng/TestNGSuccessPercentPassingTest.java ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/testng-succes-percentage/src/test/java/testng/TestNGSuccessPercentPassingTest.java b/surefire-integration-tests/src/test/resources/testng-succes-percentage/src/test/java/testng/TestNGSuccessPercentPassingTest.java deleted file mode 100644 index 35a1be4..0000000 --- a/surefire-integration-tests/src/test/resources/testng-succes-percentage/src/test/java/testng/TestNGSuccessPercentPassingTest.java +++ /dev/null @@ -1,43 +0,0 @@ -package testng; - -/* - * 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.testng.annotations.*; -import static org.testng.Assert.*; -import java.util.concurrent.atomic.AtomicInteger; - -public class TestNGSuccessPercentPassingTest -{ - - private static final AtomicInteger counter = new AtomicInteger( 0 ); - - // Pass 2 of 4 tests, expect this test to pass when 50% success is required - @Test( invocationCount = 4, successPercentage = 50 ) - public void testSuccess() - { - int value = counter.addAndGet( 1 ); - assertTrue( isOdd( value ), "is odd: " + value ); - } - - private boolean isOdd( int number ) - { - return number % 2 == 0; - } -} http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/testng-suite-xml/pom.xml ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/testng-suite-xml/pom.xml b/surefire-integration-tests/src/test/resources/testng-suite-xml/pom.xml deleted file mode 100644 index ec02455..0000000 --- a/surefire-integration-tests/src/test/resources/testng-suite-xml/pom.xml +++ /dev/null @@ -1,84 +0,0 @@ -<?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/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - - <groupId>org.apache.maven.plugins.surefire</groupId> - <artifactId>suiteXml</artifactId> - <version>1.0-SNAPSHOT</version> - <name>TestNG Suite XML File</name> - - <properties> - <maven.compiler.source>1.7</maven.compiler.source> - <maven.compiler.target>1.7</maven.compiler.target> - </properties> - - <profiles> - <profile> - <id>testng-old</id> - <activation> - <property><name>testNgClassifier</name></property> - </activation> - <dependencies> - <dependency> - <groupId>org.testng</groupId> - <artifactId>testng</artifactId> - <version>${testNgVersion}</version> - <classifier>${testNgClassifier}</classifier> - </dependency> - </dependencies> - </profile> - <profile> - <id>testng-new</id> - <activation> - <property><name>!testNgClassifier</name></property> - </activation> - <dependencies> - <dependency> - <groupId>org.testng</groupId> - <artifactId>testng</artifactId> - <version>${testNgVersion}</version> - </dependency> - </dependencies> - </profile> - </profiles> - - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-surefire-plugin</artifactId> - <version>${surefire.version}</version> - <configuration> - <suiteXmlFiles> - <file>src/test-data/testng1.xml</file> - <file>src/test-data/testng2.xml</file> - </suiteXmlFiles> - </configuration> - </plugin> - </plugins> - </build> - - - -</project> http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/testng-suite-xml/src/test-data/testng1.xml ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/testng-suite-xml/src/test-data/testng1.xml b/surefire-integration-tests/src/test/resources/testng-suite-xml/src/test-data/testng1.xml deleted file mode 100644 index ac62eca..0000000 --- a/surefire-integration-tests/src/test/resources/testng-suite-xml/src/test-data/testng1.xml +++ /dev/null @@ -1,30 +0,0 @@ -<!-- - ~ 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. - --> - -<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" > - -<suite name="Suite 1 Test" verbose="4"> - - <test name="Sample Test 1"> - <classes> - <class name="testng.suiteXml.TestNGSuiteTest"/> - </classes> - </test> - -</suite> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/09f0eef8/surefire-integration-tests/src/test/resources/testng-suite-xml/src/test-data/testng2.xml ---------------------------------------------------------------------- diff --git a/surefire-integration-tests/src/test/resources/testng-suite-xml/src/test-data/testng2.xml b/surefire-integration-tests/src/test/resources/testng-suite-xml/src/test-data/testng2.xml deleted file mode 100644 index 4036c21..0000000 --- a/surefire-integration-tests/src/test/resources/testng-suite-xml/src/test-data/testng2.xml +++ /dev/null @@ -1,30 +0,0 @@ -<!-- - ~ 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. - --> - -<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" > - -<suite name="Suite 2 Test" verbose="4"> - - <test name="Sample Test 2"> - <classes> - <class name="testng.suiteXml.TestNGSuiteTest"/> - </classes> - </test> - -</suite> \ No newline at end of file