View Javadoc

1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one
3    * or more contributor license agreements.  See the NOTICE file
4    * distributed with this work for additional information
5    * regarding copyright ownership.  The ASF licenses this file
6    * to you under the Apache License, Version 2.0 (the
7    * "License"); you may not use this file except in compliance
8    * with the License.  You may obtain a copy of the License at
9    *
10   *   http://www.apache.org/licenses/LICENSE-2.0
11   *
12   * Unless required by applicable law or agreed to in writing,
13   * software distributed under the License is distributed on an
14   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15   * KIND, either express or implied.  See the License for the
16   * specific language governing permissions and limitations
17   * under the License.
18   */
19  package org.apache.maven.continuum.reports.surefire;
20  
21  import java.io.File;
22  import java.util.List;
23  
24  /**
25   * @author <a href="mailto:olamy@apache.org">olamy</a>
26   * @version $Id: ReportTestSuiteGenerator.java 765340 2009-04-15 20:22:00Z evenisse $
27   * @since 12 nov. 07
28   */
29  public interface ReportTestSuiteGenerator
30  {
31  
32      /**
33       * @param directory directory containing surefire tests files
34       * @param includes  file types to include
35       * @param excludes  file types to exclude
36       * @return List of {@link ReportTestSuite}
37       * @throws ReportTestSuiteGeneratorException
38       *
39       */
40      List<ReportTestSuite> generateReports( File directory, List<String> includes, List<String> excludes )
41          throws ReportTestSuiteGeneratorException;
42  
43      /**
44       * Use generateReports with default includes *.xml and default excludes *.txt
45       *
46       * @param directory directory containing surefire tests files
47       * @return List of {@link ReportTestSuite}
48       * @throws ReportTestSuiteGeneratorException
49       *
50       */
51      List<ReportTestSuite> generateReports( File directory )
52          throws ReportTestSuiteGeneratorException;
53  
54      /**
55       * @param buildId
56       * @param projectId
57       * @return List of {@link ReportTestSuite}
58       * @throws ReportTestSuiteGeneratorException
59       *
60       */
61      List<ReportTestSuite> generateReports( int buildId, int projectId )
62          throws ReportTestSuiteGeneratorException;
63  
64      /**
65       * @param buildId
66       * @param projectId
67       * @return List of {@link ReportTestResult}
68       * @throws ReportTestSuiteGeneratorException
69       *
70       */
71      ReportTestResult generateReportTestResult( int buildId, int projectId )
72          throws ReportTestSuiteGeneratorException;
73  }