View Javadoc

1   package org.apache.maven.surefire.its;
2   
3   /*
4    * Licensed to the Apache Software Foundation (ASF) under one
5    * or more contributor license agreements.  See the NOTICE file
6    * distributed with this work for additional information
7    * regarding copyright ownership.  The ASF licenses this file
8    * to you under the Apache License, Version 2.0 (the
9    * "License"); you may not use this file except in compliance
10   * with the License.  You may obtain a copy of the License at
11   *
12   *     http://www.apache.org/licenses/LICENSE-2.0
13   *
14   * Unless required by applicable law or agreed to in writing,
15   * software distributed under the License is distributed on an
16   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17   * KIND, either express or implied.  See the License for the
18   * specific language governing permissions and limitations
19   * under the License.
20   */
21  
22  import org.apache.maven.surefire.its.fixture.OutputValidator;
23  import org.apache.maven.surefire.its.fixture.SurefireJUnit4IntegrationTestCase;
24  import org.junit.Ignore;
25  import org.junit.Test;
26  
27  /**
28   * Basic suite test using all known versions of TestNG. Used for regression testing Surefire against old versions.
29   * To check new versions of TestNG work with current versions of Surefire, instead run the full test suite with
30   * -Dtestng.version=5.14.2 (for example)
31   *
32   * @author <a href="mailto:dfabulich@apache.org">Dan Fabulich</a>
33   * @author <a href="mailto:krosenvold@apache.org">Kristian Rosenvold</a>
34   */
35  public class CheckTestNgVersionsIT
36      extends SurefireJUnit4IntegrationTestCase
37  {
38  
39      @Test
40      public void test47()
41          throws Exception
42      {
43          runTestNgTest( "4.7" );
44      }
45  
46      @Test
47      @Ignore("5.0 and 5.0.1 jars on central are malformed SUREFIRE-375 + MAVENUPLOAD-1024")
48      public void XXXtest50()
49          throws Exception
50      {
51          runTestNgTest( "5.0" );
52      }
53  
54      @Test
55      @Ignore("5.0 and 5.0.1 jars on central are malformed SUREFIRE-375 + MAVENUPLOAD-1024")
56      public void XXXtest501()
57          throws Exception
58      {
59          runTestNgTest( "5.0.1" );
60      }
61  
62      @Test
63      public void test502()
64          throws Exception
65      {
66          runTestNgTest( "5.0.2" );
67      }
68  
69      @Test
70      public void test51()
71          throws Exception
72      {
73          runTestNgTest( "5.1" );
74      }
75  
76      @Test
77      public void test55()
78          throws Exception
79      {
80          runTestNgTest( "5.5" );
81      }
82  
83      @Test
84      public void test56()
85          throws Exception
86      {
87          runTestNgTest( "5.6" );
88      }
89  
90      @Test
91      public void test57()
92          throws Exception
93      {
94          runTestNgTest( "5.7" );
95      }
96  
97      @Test
98      public void test58()
99          throws Exception
100     {
101         runTestNgTest( "5.8" );
102     }
103 
104     @Test
105     public void test59()
106         throws Exception
107     {
108         runTestNgTest( "5.9" );
109     }
110 
111     @Test
112     public void test510()
113         throws Exception
114     {
115         runTestNgTest( "5.10" );
116     }
117 
118     @Test
119     public void test511()
120         throws Exception
121     {
122         runTestNgTest( "5.11" );
123     }
124 
125     @Test
126     public void test512()
127         throws Exception
128     {
129         runTestNgTest( "5.12.1" );
130     }
131 
132     @Test
133     public void test513()
134         throws Exception
135     {
136         runTestNgTest( "5.13" );
137     }
138 
139     @Test
140     public void test5131()
141         throws Exception
142     {
143         runTestNgTest( "5.13.1" );
144     }
145 
146     @Test
147     public void test514()
148         throws Exception
149     {
150         runTestNgTest( "5.14" );
151     }
152 
153     @Test
154     public void test5141()
155         throws Exception
156     {
157         runTestNgTest( "5.14.1" );
158     }
159 
160     @Test
161     public void test5142()
162         throws Exception
163     {
164         runTestNgTest( "5.14.2" );
165     }
166 
167     @Test
168     public void test60()
169         throws Exception
170     {
171         runTestNgTest( "6.0" );
172     }
173 
174     public void runTestNgTest( String version )
175         throws Exception
176     {
177 
178         final OutputValidator outputValidator = unpack( "testng-simple" ).resetInitialGoals( version ).executeTest();
179         outputValidator.verifyErrorFreeLog().assertTestSuiteResults( 1, 0, 0, 0 );
180     }
181 }