View Javadoc

1   package org.apache.maven.plugin.failsafe;
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.artifact.factory.ArtifactFactory;
23  import org.apache.maven.artifact.metadata.ArtifactMetadataSource;
24  import org.apache.maven.artifact.repository.ArtifactRepository;
25  import org.apache.maven.artifact.resolver.ArtifactResolver;
26  import org.apache.maven.execution.MavenSession;
27  import org.apache.maven.plugin.MojoExecutionException;
28  import org.apache.maven.plugin.MojoFailureException;
29  import org.apache.maven.plugin.surefire.AbstractSurefireMojo;
30  import org.apache.maven.plugin.surefire.ProviderInfo;
31  import org.apache.maven.plugin.surefire.SurefireExecutionParameters;
32  import org.apache.maven.plugin.surefire.booterclient.ForkConfiguration;
33  import org.apache.maven.plugin.surefire.booterclient.ForkStarter;
34  import org.apache.maven.project.MavenProject;
35  import org.apache.maven.surefire.booter.ClassLoaderConfiguration;
36  import org.apache.maven.surefire.booter.ProviderConfiguration;
37  import org.apache.maven.surefire.booter.SurefireBooterForkException;
38  import org.apache.maven.surefire.booter.SurefireExecutionException;
39  import org.apache.maven.surefire.failsafe.model.FailsafeSummary;
40  import org.apache.maven.surefire.failsafe.model.io.xpp3.FailsafeSummaryXpp3Writer;
41  import org.apache.maven.toolchain.ToolchainManager;
42  import org.codehaus.plexus.util.ReaderFactory;
43  import org.codehaus.plexus.util.StringUtils;
44  
45  import java.io.BufferedOutputStream;
46  import java.io.File;
47  import java.io.FileOutputStream;
48  import java.io.IOException;
49  import java.io.OutputStreamWriter;
50  import java.io.Writer;
51  import java.util.HashMap;
52  import java.util.Iterator;
53  import java.util.List;
54  import java.util.Map;
55  import java.util.Properties;
56  
57  /**
58   * Run integration tests using Surefire.
59   *
60   * @author Jason van Zyl
61   * @author Stephen Connolly
62   * @requiresProject true
63   * @requiresDependencyResolution test
64   * @goal integration-test
65   * @phase integration-test
66   * @threadSafe
67   * @noinspection JavaDoc
68   */
69  public class IntegrationTestMojo
70      extends AbstractSurefireMojo
71      implements SurefireExecutionParameters
72  {
73  
74      /**
75       * Set this to 'true' to skip running tests, but still compile them. Its use is NOT RECOMMENDED, but quite
76       * convenient on occasion.
77       *
78       * @parameter default-value="false" expression="${skipTests}"
79       * @since 2.4
80       */
81      private boolean skipTests;
82  
83      /**
84       * Set this to 'true' to skip running integration tests, but still compile them. Its use is NOT RECOMMENDED, but quite
85       * convenient on occasion.
86       *
87       * @parameter expression="${skipITs}"
88       * @since 2.4.3-alpha-2
89       */
90      private boolean skipITs;
91  
92      /**
93       * This old parameter is just like skipTests, but bound to the old property maven.test.skip.exec.
94       *
95       * @parameter expression="${maven.test.skip.exec}"
96       * @since 2.3
97       * @deprecated Use -DskipTests instead.
98       */
99      private boolean skipExec;
100 
101     /**
102      * Set this to 'true' to bypass unit tests entirely. Its use is NOT RECOMMENDED, especially if you
103      * enable it using the "maven.test.skip" property, because maven.test.skip disables both running the
104      * tests and compiling the tests.  Consider using the skipTests parameter instead.
105      *
106      * @parameter default-value="false" expression="${maven.test.skip}"
107      */
108     private boolean skip;
109 
110     /**
111      * The base directory of the project being tested. This can be obtained in your unit test by
112      * System.getProperty("basedir").
113      *
114      * @parameter default-value="${basedir}"
115      */
116     private File basedir;
117 
118     /**
119      * The directory containing generated test classes of the project being tested.
120      * This will be included at the beginning the test classpath.
121      *
122      * @parameter default-value="${project.build.testOutputDirectory}"
123      */
124     private File testClassesDirectory;
125 
126     /**
127      * The directory containing generated classes of the project being tested.
128      * This will be included after the test classes in the test classpath.
129      *
130      * @parameter default-value="${project.build.outputDirectory}"
131      */
132     private File classesDirectory;
133 
134     /**
135      * The Maven Project Object
136      *
137      * @parameter default-value="${project}"
138      * @readonly
139      */
140     private MavenProject project;
141 
142     /**
143      * List of dependencies to exclude from the test classpath.
144      * Each dependency string must follow the format <i>groupId:artifactId</i>.
145      * For example: <i>org.acme:project-a</i>
146      *
147      * @parameter
148      * @since 2.6
149      */
150     private List classpathDependencyExcludes;
151 
152     /**
153      * A dependency scope to exclude from the test classpath
154      * The scope should be one of the scopes defined by org.apache.maven.artifact.Artifact.
155      * This includes the following
156      * <p/>
157      * <ul>
158      * <li><i>compile</i> - system, provided, compile
159      * <li><i>runtime</i> - compile, runtime
160      * <li><i>compile+runtime</i> - system, provided, compile, runtime
161      * <li><i>runtime+system</i> - system, compile, runtime
162      * <li><i>test</i> - system, provided, compile, runtime, test
163      * </ul>
164      *
165      * @parameter default-value=""
166      * @since 2.6
167      */
168     private String classpathDependencyScopeExclude;
169 
170     /**
171      * Additional elements to be appended to the classpath.
172      *
173      * @parameter
174      * @since 2.4
175      */
176     private List additionalClasspathElements;
177 
178     /**
179      * Base directory where all reports are written to.
180      *
181      * @parameter default-value="${project.build.directory}/failsafe-reports"
182      */
183     private File reportsDirectory;
184 
185     /**
186      * The test source directory containing test class sources.
187      *
188      * @parameter default-value="${project.build.testSourceDirectory}"
189      * @required
190      * @since 2.2
191      */
192     private File testSourceDirectory;
193 
194     /**
195      * Specify this parameter to run individual tests by file name, overriding the <code>includes/excludes</code>
196      * parameters.  Each pattern you specify here will be used to create an
197      * include pattern formatted like <code>**&#47;${test}.java</code>, so you can just type "-Dtest=MyTest"
198      * to run a single test called "foo/MyTest.java".  This parameter will override the TestNG suiteXmlFiles
199      * parameter.
200      *
201      * @parameter expression="${it.test}"
202      */
203     private String test;
204 
205     /**
206      * A list of &lt;include> elements used to specify the the tests that should be included in testing. When not
207      * specified and when the <code>test</code> parameter is not specified, the default includes will be
208      * <code><br/>
209         &lt;includes><br/>
210             &nbsp;&lt;include>**&#47;Test*.java&lt;/include><br/>
211             &nbsp;&lt;include>**&#47;*Test.java&lt;/include><br/>
212             &nbsp;&lt;include>**&#47;*TestCase.java&lt;/include><br/>
213         &lt;/includes><br/>
214      * </code>
215      * This parameter is ignored if TestNG suiteXmlFiles are specified.
216      *
217      * @parameter
218      */
219     private List includes;
220 
221     /**
222      * List of patterns (separated by commas) used to specify the tests that should be excluded in testing. When not
223      * specified and when the <code>test</code> parameter is not specified, the default excludes will be
224      * <code><br/>
225         &lt;excludes><br/>
226             &nbsp;&lt;exclude>**&#47;*$*&lt;/exclude><br/>
227         &lt;/excludes><br/>
228      * </code>
229      * (which excludes all inner classes).  This parameter is ignored if TestNG suiteXmlFiles are specified.
230      *
231      * @parameter
232      */
233     private List excludes;
234 
235     /**
236      * ArtifactRepository of the localRepository. To obtain the directory of localRepository in unit tests use
237      * System.setProperty( "localRepository").
238      *
239      * @parameter expression="${localRepository}"
240      * @required
241      * @readonly
242      */
243     private ArtifactRepository localRepository;
244 
245     /**
246      * List of System properties to pass to the JUnit tests.
247      *
248      * @parameter
249      * @deprecated Use systemPropertyVariables instead.
250      */
251     private Properties systemProperties;
252 
253     /**
254      * List of System properties to pass to the JUnit tests.
255      *
256      * @parameter
257      * @since 2.5
258      */
259     private Map systemPropertyVariables;
260 
261     /**
262      * List of properties for configuring all TestNG related configurations. This is the new
263      * preferred method of configuring TestNG.
264      *
265      * @parameter
266      * @since 2.4
267      */
268     private Properties properties;
269 
270     /**
271      * Map of of plugin artifacts.
272      *
273      * @parameter expression="${plugin.artifactMap}"
274      * @required
275      * @readonly
276      */
277     private Map pluginArtifactMap;
278 
279     /**
280      * Map of of project artifacts.
281      *
282      * @parameter expression="${project.artifactMap}"
283      * @required
284      * @readonly
285      */
286     private Map projectArtifactMap;
287 
288     /**
289      * The summary file to write integration test results to.
290      *
291      * @parameter expression="${project.build.directory}/failsafe-reports/failsafe-summary.xml"
292      * @required
293      */
294     private File summaryFile;
295 
296     /**
297      * Option to print summary of test suites or just print the test cases that has errors.
298      *
299      * @parameter expression="${failsafe.printSummary}" default-value="true"
300      */
301     private boolean printSummary;
302 
303     /**
304      * Selects the formatting for the test report to be generated. Can be set as brief or plain.
305      *
306      * @parameter expression="${failsafe.reportFormat}" default-value="brief"
307      */
308     private String reportFormat;
309 
310     /**
311      * Option to generate a file test report or just output the test report to the console.
312      *
313      * @parameter expression="${failsafe.useFile}" default-value="true"
314      */
315     private boolean useFile;
316 
317     /**
318      * When forking, set this to true to redirect the unit test standard output to a file (found in
319      * reportsDirectory/testName-output.txt).
320      *
321      * @parameter expression="${maven.test.redirectTestOutputToFile}" default-value="false"
322      * @since 2.3
323      */
324     private boolean redirectTestOutputToFile;
325 
326     /**
327      * Set this to "true" to cause a failure if there are no tests to run. Defaults to false.
328      *
329      * @parameter expression="${failIfNoTests}"
330      * @since 2.4
331      */
332     private Boolean failIfNoTests;
333 
334     /**
335      * Option to specify the forking mode. Can be "never", "once" or "always". "none" and "pertest" are also accepted
336      * for backwards compatibility.
337      *
338      * @parameter expression="${forkMode}" default-value="once"
339      * @since 2.1
340      */
341     private String forkMode;
342 
343     /**
344       * Option to specify the jvm (or path to the java executable) to use with the forking options. For the default, the
345       * jvm will be a new instance of the same VM as the one used to run Maven. JVM settings are not inherited from
346       * MAVEN_OPTS
347      *
348      * @parameter expression="${jvm}"
349      * @since 2.1
350      */
351     private String jvm;
352 
353     /**
354      * Arbitrary JVM options to set on the command line.
355      *
356      * @parameter expression="${argLine}"
357      * @since 2.1
358      */
359     private String argLine;
360 
361     /**
362      * Attach a debugger to the forked JVM.  If set to "true", the process will suspend and
363      * wait for a debugger to attach on port 5005.  If set to some other string, that
364      * string will be appended to the argLine, allowing you to configure arbitrary
365      * debuggability options (without overwriting the other options specified in the argLine).
366      *
367      * @parameter expression="${maven.failsafe.debug}"
368      * @since 2.4
369      */
370     private String debugForkedProcess;
371 
372     /**
373      * Kill the forked test process after a certain number of seconds.  If set to 0,
374      * wait forever for the process, never timing out.
375      *
376      * @parameter expression="${failsafe.timeout}"
377      * @since 2.4
378      */
379     private int forkedProcessTimeoutInSeconds;
380 
381     /**
382      * Additional environments to set on the command line.
383      *
384      * @parameter
385      * @since 2.1.3
386      */
387     private Map environmentVariables = new HashMap();
388 
389     /**
390      * Command line working directory.
391      *
392      * @parameter expression="${basedir}"
393      * @since 2.1.3
394      */
395     private File workingDirectory;
396 
397     /**
398      * When false it makes tests run using the standard classloader delegation instead of the default Maven isolated
399      * classloader. Only used when forking (forkMode is not "none").<br/> Setting it to false helps with some problems
400      * caused by conflicts between xml parsers in the classpath and the Java 5 provider parser.
401      *
402      * @parameter expression="${childDelegation}" default-value="false"
403      * @since 2.1
404      */
405     private boolean childDelegation;
406 
407     /**
408      * (TestNG only) Groups for this test. Only classes/methods/etc decorated with one of the groups specified here will be included
409      * in test run, if specified.  This parameter is overridden if suiteXmlFiles are specified.
410      *
411      * @parameter expression="${groups}"
412      * @since 2.2
413      */
414     private String groups;
415 
416     /**
417      * (TestNG only) Excluded groups. Any methods/classes/etc with one of the groups specified in this list will specifically not be
418      * run.  This parameter is overridden if suiteXmlFiles are specified.
419      *
420      * @parameter expression="${excludedGroups}"
421      * @since 2.2
422      */
423     private String excludedGroups;
424 
425     /**
426      * (TestNG only) List of TestNG suite xml file locations, seperated by commas. Note that suiteXmlFiles is incompatible
427      * with several other parameters on this plugin, like includes/excludes.  This parameter is ignored if
428      * the "test" parameter is specified (allowing you to run a single test instead of an entire suite).
429      *
430      * @parameter
431      * @since 2.2
432      */
433     private File[] suiteXmlFiles;
434 
435     /**
436      * Allows you to specify the name of the JUnit artifact. If not set, <code>junit:junit</code> will be used.
437      *
438      * @parameter expression="${junitArtifactName}" default-value="junit:junit"
439      * @since 2.3.1
440      */
441     private String junitArtifactName;
442 
443     /**
444      * Allows you to specify the name of the TestNG artifact. If not set, <code>org.testng:testng</code> will be used.
445      *
446      * @parameter expression="${testNGArtifactName}" default-value="org.testng:testng"
447      * @since 2.3.1
448      */
449     private String testNGArtifactName;
450 
451     /**
452      * (TestNG/JUnit 4.7 provider only) The attribute thread-count allows you to specify how many threads should be allocated for this execution. Only
453      * makes sense to use in conjunction with parallel.
454      *
455      * @parameter expression="${threadCount}"
456      * @since 2.2
457      */
458     private int threadCount;
459 
460     /**
461      * (JUnit 4.7 provider) Indicates that threadCount is per cpu core. Defaults to true
462      *
463      * @parameter expression="${perCoreThreadCount}"
464      * @since 2.5
465      */
466     private String perCoreThreadCount;
467 
468     /**
469      * (JUnit 4.7 provider) Indicates that the thread pool will be unlimited. The parallel parameter and the actual number of classes/methods
470      * will decide. Setting this to true effectively disables perCoreThreadCount and threadCount.
471      *
472      * @parameter expression="${useUnlimitedThreads}"
473      * @since 2.5
474      */
475     private String useUnlimitedThreads;
476 
477     /**
478      * (TestNG only) When you use the parallel attribute, TestNG will try to run all your test methods in separate threads, except for
479      * methods that depend on each other, which will be run in the same thread in order to respect their order of
480      * execution.
481      * <p/>
482      * (JUnit 4.7 provider) Supports values classes/methods/both to run in separate threads, as controlled by threadCount.
483      *
484      * @parameter expression="${parallel}"
485      * @todo test how this works with forking, and console/file output parallelism
486      * @since 2.2
487      */
488     private String parallel;
489 
490     /**
491      * Whether to trim the stack trace in the reports to just the lines within the test, or show the full trace.
492      *
493      * @parameter expression="${trimStackTrace}" default-value="true"
494      * @since 2.2
495      */
496     private boolean trimStackTrace;
497 
498     /**
499      * Resolves the artifacts needed.
500      *
501      * @component
502      */
503     private ArtifactResolver artifactResolver;
504 
505     /**
506      * Creates the artifact
507      *
508      * @component
509      */
510     private ArtifactFactory artifactFactory;
511 
512     /**
513      * The plugin remote repositories declared in the POM.
514      *
515      * @parameter expression="${project.pluginArtifactRepositories}"
516      * @since 2.2
517      */
518     private List remoteRepositories;
519 
520     /**
521      * For retrieval of artifact's metadata.
522      *
523      * @component
524      */
525     private ArtifactMetadataSource metadataSource;
526 
527     private static final String BRIEF_REPORT_FORMAT = "brief";
528 
529     private static final String PLAIN_REPORT_FORMAT = "plain";
530 
531     private Properties originalSystemProperties;
532 
533     /**
534      * systemPropertyVariables + systemProperties
535      */
536     private Properties internalSystemProperties = new Properties();
537 
538     /**
539      * Flag to disable the generation of report files in xml format.
540      *
541      * @parameter expression="${disableXmlReport}" default-value="false"
542      * @since 2.2
543      */
544     private boolean disableXmlReport;
545 
546     /**
547      * Option to pass dependencies to the system's classloader instead of using an isolated class loader when forking.
548      * Prevents problems with JDKs which implement the service provider lookup mechanism by using the system's
549      * classloader.  Default value is "true".
550      *
551      * @parameter expression="${failsafe.useSystemClassLoader}"
552      * @since 2.3
553      */
554     private Boolean useSystemClassLoader;
555 
556     /**
557      * By default, Surefire forks your tests using a manifest-only JAR; set this parameter
558      * to "false" to force it to launch your tests with a plain old Java classpath.
559      * (See http://maven.apache.org/plugins/maven-surefire-plugin/examples/class-loading.html
560      * for a more detailed explanation of manifest-only JARs and their benefits.)
561      * <p/>
562      * Beware, setting this to "false" may cause your tests to
563      * fail on Windows if your classpath is too long.
564      *
565      * @parameter expression="${failsafe.useManifestOnlyJar}" default-value="true"
566      * @since 2.4.3
567      */
568     private boolean useManifestOnlyJar;
569 
570     /**
571      * By default, Surefire enables JVM assertions for the execution of your test cases. To disable the assertions, set
572      * this flag to <code>false</code>.
573      *
574      * @parameter expression="${enableAssertions}" default-value="true"
575      * @since 2.3.1
576      */
577     private boolean enableAssertions;
578 
579     /**
580      * The current build session instance.
581      *
582      * @parameter expression="${session}"
583      * @required
584      * @readonly
585      */
586     private MavenSession session;
587 
588     /**
589      * (TestNG only) Define the factory class used to create all test instances
590      *
591      * @parameter expression="${objectFactory}"
592      * @since 2.5
593      */
594     private String objectFactory;
595 
596     /**
597      * The character encoding scheme to be applied.
598      *
599      * @parameter expression="${encoding}" default-value="${project.reporting.outputEncoding}"
600      */
601     private String encoding;
602 
603     /**
604      * @parameter default-value="${session.parallel}"
605      * @readonly
606      */
607     private Boolean parallelMavenExecution;
608 
609     /**
610      * Defines the order the tests will be run in. Supported values are alphabetical, reversealphabetical
611      * random, hourly (alphabetical on even hours, reverse alphabetical on odd hours) and filesystem.
612      * <p/>
613      * Not supplying a value for this setting will run tests in filesystem order.
614      * <p/>
615      * Odd/Even for hourly is determined at the time the of scanning the classpath, meaning it could change during
616      * a multi-module build.
617      *
618      * @parameter
619      * @since 2.7
620      */
621      private String runOrder;
622 
623     /**
624      * @component
625      */
626     private ToolchainManager toolchainManager;
627 
628 
629     public void execute()
630         throws MojoExecutionException, MojoFailureException
631     {
632         if ( verifyParameters() )
633         {
634             logReportsDirectory();
635 
636             final List providers = initialize();
637             String exceptionMessage = null;
638             FailsafeSummary result = new FailsafeSummary();
639 
640             ForkConfiguration forkConfiguration = null;
641             for ( Iterator iter = providers.iterator(); iter.hasNext(); )
642             {
643                 ProviderInfo provider = (ProviderInfo) iter.next();
644                 forkConfiguration = getForkConfiguration();
645                 ClassLoaderConfiguration classLoaderConfiguration = getClassLoaderConfiguration( forkConfiguration );
646                 ForkStarter forkStarter = createForkStarter( provider, forkConfiguration, classLoaderConfiguration );
647                 try
648                 {
649                     result.setResult( forkStarter.run() );
650                 }
651                 catch ( SurefireBooterForkException e )
652                 {
653                     if ( exceptionMessage == null )
654                     {
655                         exceptionMessage = e.getMessage();
656                     }
657                 }
658                 catch ( SurefireExecutionException e )
659                 {
660                     if ( exceptionMessage == null )
661                     {
662                         exceptionMessage = e.getMessage();
663                     }
664                 }
665             }
666 
667             if ( exceptionMessage != null )
668             {
669                 // Fail no matter what as long as any provider failed
670                 result.setResult( ProviderConfiguration.TESTS_FAILED_EXIT_CODE );
671                 result.setException( exceptionMessage );
672             }
673 
674             if ( getOriginalSystemProperties() != null && forkConfiguration != null && !forkConfiguration.isForking() )
675             {
676                 // restore system properties, only makes sense when not forking..
677                 System.setProperties( getOriginalSystemProperties() );
678             }
679 
680             if ( !getSummaryFile().getParentFile().isDirectory() )
681             {
682                 getSummaryFile().getParentFile().mkdirs();
683             }
684 
685             try
686             {
687                 String encoding;
688                 if ( StringUtils.isEmpty( this.encoding ) )
689                 {
690                     getLog().warn(
691                         "File encoding has not been set, using platform encoding " + ReaderFactory.FILE_ENCODING +
692                             ", i.e. build is platform dependent!" );
693                     encoding = ReaderFactory.FILE_ENCODING;
694                 }
695                 else
696                 {
697                     encoding = this.encoding;
698                 }
699 
700                 FileOutputStream fileOutputStream = new FileOutputStream( getSummaryFile() );
701                 BufferedOutputStream bufferedOutputStream = new BufferedOutputStream( fileOutputStream );
702                 Writer writer = new OutputStreamWriter( bufferedOutputStream, encoding );
703                 FailsafeSummaryXpp3Writer xpp3Writer = new FailsafeSummaryXpp3Writer();
704                 xpp3Writer.write( writer, result );
705                 writer.close();
706                 bufferedOutputStream.close();
707                 fileOutputStream.close();
708             }
709             catch ( IOException e )
710             {
711                 throw new MojoExecutionException( e.getMessage(), e );
712             }
713         }
714     }
715 
716     protected boolean verifyParameters()
717         throws MojoFailureException
718     {
719         if ( isSkip() || isSkipTests() || isSkipITs() || isSkipExec() )
720         {
721             getLog().info( "Tests are skipped." );
722             return false;
723         }
724 
725         if ( !getTestClassesDirectory().exists() )
726         {
727             if ( getFailIfNoTests() != null && getFailIfNoTests().booleanValue() )
728             {
729                 throw new MojoFailureException( "No tests to run!" );
730             }
731             getLog().info( "No tests to run." );
732             return false;
733         }
734 
735         ensureWorkingDirectoryExists();
736 
737         ensureParallelRunningCompatibility();
738 
739         warnIfUselessUseSystemClassLoaderParameter();
740 
741         return true;
742     }
743 
744     protected String getPluginName()
745     {
746         return "failsafe";
747     }
748 
749     protected String[] getDefaultIncludes()
750     {
751         return new String[]{ "**/IT*.java", "**/*IT.java", "**/*ITCase.java" };
752     }
753 
754     public boolean isSkipTests()
755     {
756         return skipTests;
757     }
758 
759     public void setSkipTests( boolean skipTests )
760     {
761         this.skipTests = skipTests;
762     }
763 
764     public boolean isSkipITs()
765     {
766         return skipITs;
767     }
768 
769     public void setSkipITs( boolean skipITs )
770     {
771         this.skipITs = skipITs;
772     }
773 
774     public boolean isSkipExec()
775     {
776         return skipExec;
777     }
778 
779     public void setSkipExec( boolean skipExec )
780     {
781         this.skipExec = skipExec;
782     }
783 
784     public boolean isSkip()
785     {
786         return skip;
787     }
788 
789     public void setSkip( boolean skip )
790     {
791         this.skip = skip;
792     }
793 
794     public File getBasedir()
795     {
796         return basedir;
797     }
798 
799     public void setBasedir( File basedir )
800     {
801         this.basedir = basedir;
802     }
803 
804     public File getTestClassesDirectory()
805     {
806         return testClassesDirectory;
807     }
808 
809     public void setTestClassesDirectory( File testClassesDirectory )
810     {
811         this.testClassesDirectory = testClassesDirectory;
812     }
813 
814     public File getClassesDirectory()
815     {
816         return classesDirectory;
817     }
818 
819     public void setClassesDirectory( File classesDirectory )
820     {
821         this.classesDirectory = classesDirectory;
822     }
823 
824     public MavenProject getProject()
825     {
826         return project;
827     }
828 
829     public void setProject( MavenProject project )
830     {
831         this.project = project;
832     }
833 
834     public List getClasspathDependencyExcludes()
835     {
836         return classpathDependencyExcludes;
837     }
838 
839     public void setClasspathDependencyExcludes( List classpathDependencyExcludes )
840     {
841         this.classpathDependencyExcludes = classpathDependencyExcludes;
842     }
843 
844     public String getClasspathDependencyScopeExclude()
845     {
846         return classpathDependencyScopeExclude;
847     }
848 
849     public void setClasspathDependencyScopeExclude( String classpathDependencyScopeExclude )
850     {
851         this.classpathDependencyScopeExclude = classpathDependencyScopeExclude;
852     }
853 
854     public List getAdditionalClasspathElements()
855     {
856         return additionalClasspathElements;
857     }
858 
859     public void setAdditionalClasspathElements( List additionalClasspathElements )
860     {
861         this.additionalClasspathElements = additionalClasspathElements;
862     }
863 
864     public File getReportsDirectory()
865     {
866         return reportsDirectory;
867     }
868 
869     public void setReportsDirectory( File reportsDirectory )
870     {
871         this.reportsDirectory = reportsDirectory;
872     }
873 
874     public File getTestSourceDirectory()
875     {
876         return testSourceDirectory;
877     }
878 
879     public void setTestSourceDirectory( File testSourceDirectory )
880     {
881         this.testSourceDirectory = testSourceDirectory;
882     }
883 
884     public String getTest()
885     {
886         return test;
887     }
888 
889     public void setTest( String test )
890     {
891         this.test = test;
892     }
893 
894     public List getIncludes()
895     {
896         return includes;
897     }
898 
899     public void setIncludes( List includes )
900     {
901         this.includes = includes;
902     }
903 
904     public List getExcludes()
905     {
906         return excludes;
907     }
908 
909     public void setExcludes( List excludes )
910     {
911         this.excludes = excludes;
912     }
913 
914     public ArtifactRepository getLocalRepository()
915     {
916         return localRepository;
917     }
918 
919     public void setLocalRepository( ArtifactRepository localRepository )
920     {
921         this.localRepository = localRepository;
922     }
923 
924     public Properties getSystemProperties()
925     {
926         return systemProperties;
927     }
928 
929     public void setSystemProperties( Properties systemProperties )
930     {
931         this.systemProperties = systemProperties;
932     }
933 
934     public Map getSystemPropertyVariables()
935     {
936         return systemPropertyVariables;
937     }
938 
939     public void setSystemPropertyVariables( Map systemPropertyVariables )
940     {
941         this.systemPropertyVariables = systemPropertyVariables;
942     }
943 
944     public Properties getProperties()
945     {
946         return properties;
947     }
948 
949     public void setProperties( Properties properties )
950     {
951         this.properties = properties;
952     }
953 
954     public Map getPluginArtifactMap()
955     {
956         return pluginArtifactMap;
957     }
958 
959     public void setPluginArtifactMap( Map pluginArtifactMap )
960     {
961         this.pluginArtifactMap = pluginArtifactMap;
962     }
963 
964     public Map getProjectArtifactMap()
965     {
966         return projectArtifactMap;
967     }
968 
969     public void setProjectArtifactMap( Map projectArtifactMap )
970     {
971         this.projectArtifactMap = projectArtifactMap;
972     }
973 
974     public File getSummaryFile()
975     {
976         return summaryFile;
977     }
978 
979     public void setSummaryFile( File summaryFile )
980     {
981         this.summaryFile = summaryFile;
982     }
983 
984     public boolean isPrintSummary()
985     {
986         return printSummary;
987     }
988 
989     public void setPrintSummary( boolean printSummary )
990     {
991         this.printSummary = printSummary;
992     }
993 
994     public String getReportFormat()
995     {
996         return reportFormat;
997     }
998 
999     public void setReportFormat( String reportFormat )
1000     {
1001         this.reportFormat = reportFormat;
1002     }
1003 
1004     public boolean isUseFile()
1005     {
1006         return useFile;
1007     }
1008 
1009     public void setUseFile( boolean useFile )
1010     {
1011         this.useFile = useFile;
1012     }
1013 
1014     public boolean isRedirectTestOutputToFile()
1015     {
1016         return redirectTestOutputToFile;
1017     }
1018 
1019     public void setRedirectTestOutputToFile( boolean redirectTestOutputToFile )
1020     {
1021         this.redirectTestOutputToFile = redirectTestOutputToFile;
1022     }
1023 
1024     public Boolean getFailIfNoTests()
1025     {
1026         return failIfNoTests;
1027     }
1028 
1029     public void setFailIfNoTests( Boolean failIfNoTests )
1030     {
1031         this.failIfNoTests = failIfNoTests;
1032     }
1033 
1034     public String getForkMode()
1035     {
1036         return forkMode;
1037     }
1038 
1039     public void setForkMode( String forkMode )
1040     {
1041         this.forkMode = forkMode;
1042     }
1043 
1044     public String getJvm()
1045     {
1046         return jvm;
1047     }
1048 
1049     public void setJvm( String jvm )
1050     {
1051         this.jvm = jvm;
1052     }
1053 
1054     public String getArgLine()
1055     {
1056         return argLine;
1057     }
1058 
1059     public void setArgLine( String argLine )
1060     {
1061         this.argLine = argLine;
1062     }
1063 
1064     public String getDebugForkedProcess()
1065     {
1066         return debugForkedProcess;
1067     }
1068 
1069     public void setDebugForkedProcess( String debugForkedProcess )
1070     {
1071         this.debugForkedProcess = debugForkedProcess;
1072     }
1073 
1074     public int getForkedProcessTimeoutInSeconds()
1075     {
1076         return forkedProcessTimeoutInSeconds;
1077     }
1078 
1079     public void setForkedProcessTimeoutInSeconds( int forkedProcessTimeoutInSeconds )
1080     {
1081         this.forkedProcessTimeoutInSeconds = forkedProcessTimeoutInSeconds;
1082     }
1083 
1084     public Map getEnvironmentVariables()
1085     {
1086         return environmentVariables;
1087     }
1088 
1089     public void setEnvironmentVariables( Map environmentVariables )
1090     {
1091         this.environmentVariables = environmentVariables;
1092     }
1093 
1094     public File getWorkingDirectory()
1095     {
1096         return workingDirectory;
1097     }
1098 
1099     public void setWorkingDirectory( File workingDirectory )
1100     {
1101         this.workingDirectory = workingDirectory;
1102     }
1103 
1104     public boolean isChildDelegation()
1105     {
1106         return childDelegation;
1107     }
1108 
1109     public void setChildDelegation( boolean childDelegation )
1110     {
1111         this.childDelegation = childDelegation;
1112     }
1113 
1114     public String getGroups()
1115     {
1116         return groups;
1117     }
1118 
1119     public void setGroups( String groups )
1120     {
1121         this.groups = groups;
1122     }
1123 
1124     public String getExcludedGroups()
1125     {
1126         return excludedGroups;
1127     }
1128 
1129     public void setExcludedGroups( String excludedGroups )
1130     {
1131         this.excludedGroups = excludedGroups;
1132     }
1133 
1134     public File[] getSuiteXmlFiles()
1135     {
1136         return suiteXmlFiles;
1137     }
1138 
1139     public void setSuiteXmlFiles( File[] suiteXmlFiles )
1140     {
1141         this.suiteXmlFiles = suiteXmlFiles;
1142     }
1143 
1144     public String getJunitArtifactName()
1145     {
1146         return junitArtifactName;
1147     }
1148 
1149     public void setJunitArtifactName( String junitArtifactName )
1150     {
1151         this.junitArtifactName = junitArtifactName;
1152     }
1153 
1154     public String getTestNGArtifactName()
1155     {
1156         return testNGArtifactName;
1157     }
1158 
1159     public void setTestNGArtifactName( String testNGArtifactName )
1160     {
1161         this.testNGArtifactName = testNGArtifactName;
1162     }
1163 
1164     public int getThreadCount()
1165     {
1166         return threadCount;
1167     }
1168 
1169     public void setThreadCount( int threadCount )
1170     {
1171         this.threadCount = threadCount;
1172     }
1173 
1174     public String getPerCoreThreadCount()
1175     {
1176         return perCoreThreadCount;
1177     }
1178 
1179     public void setPerCoreThreadCount( String perCoreThreadCount )
1180     {
1181         this.perCoreThreadCount = perCoreThreadCount;
1182     }
1183 
1184     public String getUseUnlimitedThreads()
1185     {
1186         return useUnlimitedThreads;
1187     }
1188 
1189     public void setUseUnlimitedThreads( String useUnlimitedThreads )
1190     {
1191         this.useUnlimitedThreads = useUnlimitedThreads;
1192     }
1193 
1194     public String getParallel()
1195     {
1196         return parallel;
1197     }
1198 
1199     public void setParallel( String parallel )
1200     {
1201         this.parallel = parallel;
1202     }
1203 
1204     public boolean isTrimStackTrace()
1205     {
1206         return trimStackTrace;
1207     }
1208 
1209     public void setTrimStackTrace( boolean trimStackTrace )
1210     {
1211         this.trimStackTrace = trimStackTrace;
1212     }
1213 
1214     public ArtifactResolver getArtifactResolver()
1215     {
1216         return artifactResolver;
1217     }
1218 
1219     public void setArtifactResolver( ArtifactResolver artifactResolver )
1220     {
1221         this.artifactResolver = artifactResolver;
1222     }
1223 
1224     public ArtifactFactory getArtifactFactory()
1225     {
1226         return artifactFactory;
1227     }
1228 
1229     public void setArtifactFactory( ArtifactFactory artifactFactory )
1230     {
1231         this.artifactFactory = artifactFactory;
1232     }
1233 
1234     public List getRemoteRepositories()
1235     {
1236         return remoteRepositories;
1237     }
1238 
1239     public void setRemoteRepositories( List remoteRepositories )
1240     {
1241         this.remoteRepositories = remoteRepositories;
1242     }
1243 
1244     public ArtifactMetadataSource getMetadataSource()
1245     {
1246         return metadataSource;
1247     }
1248 
1249     public void setMetadataSource( ArtifactMetadataSource metadataSource )
1250     {
1251         this.metadataSource = metadataSource;
1252     }
1253 
1254     public Properties getOriginalSystemProperties()
1255     {
1256         return originalSystemProperties;
1257     }
1258 
1259     public void setOriginalSystemProperties( Properties originalSystemProperties )
1260     {
1261         this.originalSystemProperties = originalSystemProperties;
1262     }
1263 
1264     public Properties getInternalSystemProperties()
1265     {
1266         return internalSystemProperties;
1267     }
1268 
1269     public void setInternalSystemProperties( Properties internalSystemProperties )
1270     {
1271         this.internalSystemProperties = internalSystemProperties;
1272     }
1273 
1274     public boolean isDisableXmlReport()
1275     {
1276         return disableXmlReport;
1277     }
1278 
1279     public void setDisableXmlReport( boolean disableXmlReport )
1280     {
1281         this.disableXmlReport = disableXmlReport;
1282     }
1283 
1284     public Boolean getUseSystemClassLoader()
1285     {
1286         return useSystemClassLoader;
1287     }
1288 
1289     public void setUseSystemClassLoader( Boolean useSystemClassLoader )
1290     {
1291         this.useSystemClassLoader = useSystemClassLoader;
1292     }
1293 
1294     public boolean isUseManifestOnlyJar()
1295     {
1296         return useManifestOnlyJar;
1297     }
1298 
1299     public void setUseManifestOnlyJar( boolean useManifestOnlyJar )
1300     {
1301         this.useManifestOnlyJar = useManifestOnlyJar;
1302     }
1303 
1304     public boolean isEnableAssertions()
1305     {
1306         return enableAssertions;
1307     }
1308 
1309     public void setEnableAssertions( boolean enableAssertions )
1310     {
1311         this.enableAssertions = enableAssertions;
1312     }
1313 
1314     public MavenSession getSession()
1315     {
1316         return session;
1317     }
1318 
1319     public void setSession( MavenSession session )
1320     {
1321         this.session = session;
1322     }
1323 
1324     public String getObjectFactory()
1325     {
1326         return objectFactory;
1327     }
1328 
1329     public void setObjectFactory( String objectFactory )
1330     {
1331         this.objectFactory = objectFactory;
1332     }
1333 
1334     public ToolchainManager getToolchainManager()
1335     {
1336         return toolchainManager;
1337     }
1338 
1339     public void setToolchainManager( ToolchainManager toolchainManager )
1340     {
1341         this.toolchainManager = toolchainManager;
1342     }
1343 
1344     // the following will be refactored out once the common code is all in one place
1345 
1346     public boolean isTestFailureIgnore()
1347     {
1348         return true; // ignore
1349     }
1350 
1351     public void setTestFailureIgnore( boolean testFailureIgnore )
1352     {
1353         // ignore
1354     }
1355 
1356     public boolean isMavenParallel()
1357     {
1358         return parallelMavenExecution != null && parallelMavenExecution.booleanValue();
1359     }
1360 
1361     public String getRunOrder()
1362     {
1363         return runOrder;
1364     }
1365 
1366     public void setRunOrder( String runOrder )
1367     {
1368         this.runOrder = runOrder;
1369     }
1370 }