Coverage Report - org.apache.maven.surefire.providerapi.ProviderParameters
 
Classes in this File Line Coverage Branch Coverage Complexity
ProviderParameters
N/A
N/A
1
 
 1  
 package org.apache.maven.surefire.providerapi;
 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 java.util.Properties;
 23  
 import org.apache.maven.surefire.report.ConsoleLogger;
 24  
 import org.apache.maven.surefire.report.ReporterConfiguration;
 25  
 import org.apache.maven.surefire.report.ReporterFactory;
 26  
 import org.apache.maven.surefire.testset.DirectoryScannerParameters;
 27  
 import org.apache.maven.surefire.testset.TestArtifactInfo;
 28  
 import org.apache.maven.surefire.testset.TestRequest;
 29  
 import org.apache.maven.surefire.util.DirectoryScanner;
 30  
 import org.apache.maven.surefire.util.RunOrderCalculator;
 31  
 
 32  
 /**
 33  
  * Injected into the providers upon provider construction. Allows the provider to request services and data it needs.
 34  
  * <p/>
 35  
  * NOTE: This class is part of the proposed public api for surefire providers from 2.7 and up. It may
 36  
  * still be subject to changes, even for minor revisions.
 37  
  * <p/>
 38  
  * The api covers this interface and all the types reachable from it. And nothing else.
 39  
  *
 40  
  * @author Kristian Rosenvold
 41  
  */
 42  
 public interface ProviderParameters
 43  
 {
 44  
     /**
 45  
      * Provides a directory scanner that enforces the includes/excludes parameters that were passed to surefire.
 46  
      * See #getDirectoryScannerParameters for details
 47  
      *
 48  
      * @return The directory scanner
 49  
      */
 50  
     DirectoryScanner getDirectoryScanner();
 51  
 
 52  
     /**
 53  
      * Provides a service to calculate run order of tests. Applied after directory scanning.
 54  
      * @return A RunOrderCalculator
 55  
      */
 56  
     RunOrderCalculator getRunOrderCalculator();
 57  
 
 58  
     /**
 59  
      * Provides features for creating reporting objects
 60  
      *
 61  
      * @return A ReporterFactory that allows the creation of one or more ReporterManagers
 62  
      */
 63  
     ReporterFactory getReporterFactory();
 64  
 
 65  
     /**
 66  
      * Gets a logger intended for console output.
 67  
      * <p/>
 68  
      * This output is inteded for provider-oriented messages that are not attached to a single test-set
 69  
      * and will normally be written to something console-like immediately.
 70  
      *
 71  
      * @return A console logger
 72  
      */
 73  
     ConsoleLogger getConsoleLogger();
 74  
 
 75  
     /**
 76  
      * The raw parameters used in creating the directory scanner
 77  
      *
 78  
      * @return The parameters
 79  
      */
 80  
     DirectoryScannerParameters getDirectoryScannerParameters();
 81  
 
 82  
     /**
 83  
      * The raw parameters used in creating the ReporterManagerFactory
 84  
      *
 85  
      * @return The reporter configuration
 86  
      */
 87  
     ReporterConfiguration getReporterConfiguration();
 88  
 
 89  
     /**
 90  
      * Contains information about requested test suites or individual tests from the command line.
 91  
      *
 92  
      * @return The testRequest
 93  
      */
 94  
 
 95  
     TestRequest getTestRequest();
 96  
 
 97  
     /**
 98  
      * The class loader for the tests
 99  
      *
 100  
      * @return the classloader
 101  
      */
 102  
     ClassLoader getTestClassLoader();
 103  
 
 104  
     /**
 105  
      * The per-provider specific properties that may come all the way from the plugin's properties setting.
 106  
      *
 107  
      * @return the provider specific properties
 108  
      */
 109  
     Properties getProviderProperties();
 110  
 
 111  
     /**
 112  
      * Artifact info about the artifact used to autodetect provider
 113  
      *
 114  
      * @return The artifactinfo, or null if autodetect was not used.
 115  
      */
 116  
     TestArtifactInfo getTestArtifactInfo();
 117  
 
 118  
 }