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.plugin.MojoExecutionException;
23  import org.apache.maven.plugin.MojoFailureException;
24  import org.apache.maven.plugin.surefire.AbstractSurefireMojo;
25  import org.apache.maven.plugin.surefire.booterclient.ChecksumCalculator;
26  import org.apache.maven.plugins.annotations.LifecyclePhase;
27  import org.apache.maven.plugins.annotations.Mojo;
28  import org.apache.maven.plugins.annotations.Parameter;
29  import org.apache.maven.plugins.annotations.ResolutionScope;
30  import org.apache.maven.surefire.suite.RunResult;
31  
32  import java.io.File;
33  import java.io.IOException;
34  import java.util.Arrays;
35  import java.util.Collections;
36  import java.util.List;
37  
38  import static org.apache.maven.plugin.failsafe.util.FailsafeSummaryXmlUtils.writeSummary;
39  
40  /**
41   * Run integration tests using Surefire.
42   *
43   * @author Jason van Zyl
44   * @author Stephen Connolly
45   */
46  @Mojo( name = "integration-test", requiresProject = true, requiresDependencyResolution = ResolutionScope.TEST,
47               defaultPhase = LifecyclePhase.INTEGRATION_TEST, threadSafe = true )
48  public class IntegrationTestMojo
49          extends AbstractSurefireMojo
50  {
51  
52      private static final String FAILSAFE_IN_PROGRESS_CONTEXT_KEY = "failsafe-in-progress";
53  
54      /**
55       * The path representing project <em>JAR</em> file, if exists; Otherwise the directory containing generated
56       * classes of the project being tested. This will be included after the test classes in the test classpath.
57       * Defaults to built artifact <em>JAR</em> file or <code>${project.build.outputDirectory}</code>.
58       */
59      @Parameter
60      private File classesDirectory;
61  
62      @Parameter( defaultValue = "${project.build.outputDirectory}", readonly = true, required = true )
63      private File defaultClassesDirectory;
64  
65      /**
66       * Set this to "true" to skip running integration tests, but still compile them. Its use is NOT RECOMMENDED, but
67       * quite convenient on occasion.
68       *
69       * @since 2.4.3-alpha-2
70       */
71      @Parameter( property = "skipITs" )
72      private boolean skipITs;
73  
74      /**
75       * Base directory where all reports are written to.
76       */
77      @Parameter( defaultValue = "${project.build.directory}/failsafe-reports" )
78      private File reportsDirectory;
79  
80      @SuppressWarnings( "checkstyle:linelength" )
81      /**
82       * Specify this parameter to run individual tests by file name, overriding parameter {@code includes} and
83       * {@code excludes}. Each pattern you specify here will be used to create an include pattern formatted like
84       * <code>**{@literal /}${it.test}.java</code>, so you can just type {@code -Dit.test=MyIT} to run
85       * a single test file called "foo/MyIT.java". The test patterns prefixed with a <em>!</em> will be excluded.
86       * <br>
87       * This parameter overrides the parameter {@code includes} and {@code excludes}, and the TestNG parameter
88       * {@code suiteXmlFiles}.
89       * <br>
90       * Since 2.7.3 You can execute a limited number of methods in the test with adding <i>#myMethod</i> or
91       * <i>#my*ethod</i>. E.g. type {@code -Dit.test=MyIT#myMethod} <b>supported for junit 4.x and TestNg.</b>
92       * <br>
93       * Since 2.19 a complex syntax is supported in one parameter (JUnit 4, JUnit 4.7+, TestNG):
94       * <pre><code>"-Dit.test=???IT, !Unstable*, pkg{@literal /}**{@literal /}Ci*leIT.java, *IT#test*One+testTwo?????, #fast*+slowTest"</code></pre>
95       * or e.g.
96       * <br>
97       * <pre><code>"-Dit.test=Basic*, !%regex[.*.Unstable.*], !%regex[.*.MyIT.class#one.*|two.*], %regex[#fast.*|slow.*]"</code></pre>
98       * <br>
99       * The Parameterized JUnit runner {@code describes} test methods using an index in brackets, so the non-regex
100      * method pattern would become: {@code #testMethod[*]}. If using <code>@Parameters(name="{index}: fib({0})={1}")</code>
101      * and selecting the index e.g. 5 in pattern, the non-regex method pattern would become {@code #testMethod[5:*]}.
102      */
103     @Parameter( property = "it.test" )
104     private String test;
105 
106     /**
107      * The summary file to write integration test results to.
108      */
109     @Parameter( defaultValue = "${project.build.directory}/failsafe-reports/failsafe-summary.xml", required = true )
110     private File summaryFile;
111 
112     /**
113      * Option to print summary of test suites or just print the test cases that have errors.
114      */
115     @Parameter( property = "failsafe.printSummary", defaultValue = "true" )
116     private boolean printSummary;
117 
118     /**
119      * Selects the formatting for the test report to be generated. Can be set as "brief" or "plain".
120      * Only applies to the output format of the output files  (target/surefire-reports/testName.txt)
121      */
122     @Parameter( property = "failsafe.reportFormat", defaultValue = "brief" )
123     private String reportFormat;
124 
125     /**
126      * Option to generate a file test report or just output the test report to the console.
127      */
128     @Parameter( property = "failsafe.useFile", defaultValue = "true" )
129     private boolean useFile;
130 
131     /**
132      * Set this to "true" to cause a failure if none of the tests specified in -Dtest=... are run. Defaults to
133      * "true".
134      *
135      * @since 2.12
136      */
137     @Parameter( property = "it.failIfNoSpecifiedTests" )
138     private Boolean failIfNoSpecifiedTests;
139 
140     /**
141      * Attach a debugger to the forked JVM. If set to "true", the process will suspend and wait for a debugger to attach
142      * on port 5005. If set to some other string, that string will be appended to the argLine, allowing you to configure
143      * arbitrary debugging ability options (without overwriting the other options specified through the {@code argLine}
144      * parameter).
145      *
146      * @since 2.4
147      */
148     @Parameter( property = "maven.failsafe.debug" )
149     private String debugForkedProcess;
150 
151     /**
152      * Kill the forked test process after a certain number of seconds. If set to 0, wait forever for the process, never
153      * timing out.
154      *
155      * @since 2.4
156      */
157     @Parameter( property = "failsafe.timeout" )
158     private int forkedProcessTimeoutInSeconds;
159 
160     /**
161      * Forked process is normally terminated without any significant delay after given tests have completed.
162      * If the particular tests started non-daemon Thread(s), the process hangs instead of been properly terminated
163      * by {@code System.exit()}. Use this parameter in order to determine the timeout of terminating the process.
164      * <a href="http://maven.apache.org/surefire/maven-failsafe-plugin/examples/shutdown.html">see the documentation:
165      * http://maven.apache.org/surefire/maven-failsafe-plugin/examples/shutdown.html</a>;
166      *
167      * @since 2.20
168      */
169     @Parameter( property = "failsafe.exitTimeout", defaultValue = "30" )
170     private int forkedProcessExitTimeoutInSeconds;
171 
172     /**
173      * Stop executing queued parallel JUnit tests after a certain number of seconds.
174      * <br>
175      * Example values: "3.5", "4"<br>
176      * <br>
177      * If set to 0, wait forever, never timing out.
178      * Makes sense with specified {@code parallel} different from "none".
179      *
180      * @since 2.16
181      */
182     @Parameter( property = "failsafe.parallel.timeout" )
183     private double parallelTestsTimeoutInSeconds;
184 
185     /**
186      * Stop executing queued parallel JUnit tests
187      * and <i>interrupt</i> currently running tests after a certain number of seconds.
188      * <br>
189      * Example values: "3.5", "4"<br>
190      * <br>
191      * If set to 0, wait forever, never timing out.
192      * Makes sense with specified {@code parallel} different from "none".
193      *
194      * @since 2.16
195      */
196     @Parameter( property = "failsafe.parallel.forcedTimeout" )
197     private double parallelTestsTimeoutForcedInSeconds;
198 
199     @SuppressWarnings( "checkstyle:linelength" )
200     /**
201      * A list of {@literal <include>} elements specifying the test filter (by pattern) of tests which should be
202      * included in testing. If it is not specified and the {@code test} parameter is unspecified as well, the default
203      * includes is
204      * <pre><code>
205      * {@literal <includes>}
206      *     {@literal <include>}**{@literal /}IT*.java{@literal </include>}
207      *     {@literal <include>}**{@literal /}*IT.java{@literal </include>}
208      *     {@literal <include>}**{@literal /}*ITCase.java{@literal </include>}
209      * {@literal </includes>}
210      * </code></pre>
211      * <br>
212      * Each include item may also contain a comma-separated sublist of items, which will be treated as multiple
213      * {@literal <include>} entries.<br>
214      * Since 2.19 a complex syntax is supported in one parameter (JUnit 4, JUnit 4.7+, TestNG):
215      * <pre><code>
216      * {@literal <include>}%regex[.*[Cat|Dog].*], Basic????, !Unstable*{@literal </include>}
217      * {@literal <include>}%regex[.*[Cat|Dog].*], !%regex[pkg.*Slow.*.class], pkg{@literal /}**{@literal /}*Fast*.java{@literal </include>}
218      * </code></pre>
219      * <br>
220      * This parameter is ignored if the TestNG {@code suiteXmlFiles} parameter is specified.<br>
221      * <br>
222      * <b>Notice that</b> these values are relative to the directory containing generated test classes of the project
223      * being tested. This directory is declared by the parameter {@code testClassesDirectory} which defaults
224      * to the POM property <code>${project.build.testOutputDirectory}</code>, typically
225      * <code>{@literal src/test/java}</code> unless overridden.
226      */
227     @Parameter
228     private List<String> includes;
229 
230     /**
231      * Option to pass dependencies to the system's classloader instead of using an isolated class loader when forking.
232      * Prevents problems with JDKs which implement the service provider lookup mechanism by using the system's
233      * classloader.
234      *
235      * @since 2.3
236      */
237     @Parameter( property = "failsafe.useSystemClassLoader", defaultValue = "true" )
238     private boolean useSystemClassLoader;
239 
240     /**
241      * By default, Surefire forks your tests using a manifest-only JAR; set this parameter to "false" to force it to
242      * launch your tests with a plain old Java classpath. (See the
243      * <a href="http://maven.apache.org/plugins/maven-failsafe-plugin/examples/class-loading.html">
244      * http://maven.apache.org/plugins/maven-failsafe-plugin/examples/class-loading.html</a>;
245      * for a more detailed explanation of manifest-only JARs and their benefits.)
246      * <br>
247      * Beware, setting this to "false" may cause your tests to fail on Windows if your classpath is too long.
248      *
249      * @since 2.4.3
250      */
251     @Parameter( property = "failsafe.useManifestOnlyJar", defaultValue = "true" )
252     private boolean useManifestOnlyJar;
253 
254     /**
255      * The character encoding scheme to be applied while generating test report
256      * files (see target/surefire-reports/yourTestName.txt).
257      * The report output files (*-out.txt) are still encoded with JVM's encoding used in standard out/err pipes.
258      *
259      * @since 3.0.0-M1
260      */
261     @Parameter( property = "encoding", defaultValue = "${project.reporting.outputEncoding}" )
262     private String encoding;
263 
264     /**
265      * (JUnit 4+ providers and JUnit 5+ providers since 3.0.0-M4)
266      * The number of times each failing test will be rerun. If set larger than 0, rerun failing tests immediately after
267      * they fail. If a failing test passes in any of those reruns, it will be marked as pass and reported as a "flake".
268      * However, all the failing attempts will be recorded.
269      */
270     @Parameter( property = "failsafe.rerunFailingTestsCount", defaultValue = "0" )
271     private int rerunFailingTestsCount;
272 
273     /**
274      * (TestNG) List of &lt;suiteXmlFile&gt; elements specifying TestNG suite xml file locations. Note that
275      * {@code suiteXmlFiles} is incompatible with several other parameters of this plugin, like
276      * {@code includes} and {@code excludes}.<br>
277      * This parameter is ignored if the {@code test} parameter is specified (allowing you to run a single test
278      * instead of an entire suite).
279      *
280      * @since 2.2
281      */
282     @Parameter( property = "failsafe.suiteXmlFiles" )
283     private File[] suiteXmlFiles;
284 
285     /**
286      * Defines the order the tests will be run in. Supported values are {@code alphabetical},
287      * {@code reversealphabetical}, {@code random}, {@code hourly} (alphabetical on even hours, reverse alphabetical
288      * on odd hours), {@code failedfirst}, {@code balanced} and {@code filesystem}.
289      * <br>
290      * <br>
291      * Odd/Even for hourly is determined at the time the of scanning the classpath, meaning it could change during a
292      * multi-module build.
293      * <br>
294      * <br>
295      * Failed first will run tests that failed on previous run first, as well as new tests for this run.
296      * <br>
297      * <br>
298      * Balanced is only relevant with parallel=classes, and will try to optimize the run-order of the tests reducing the
299      * overall execution time. Initially a statistics file is created and every next test run will reorder classes.
300      * <br>
301      * <br>
302      * Note that the statistics are stored in a file named <b>.surefire-XXXXXXXXX</b> beside <i>pom.xml</i> and
303      * should not be checked into version control. The "XXXXX" is the SHA1 checksum of the entire surefire
304      * configuration, so different configurations will have different statistics files, meaning if you change any
305      * configuration settings you will re-run once before new statistics data can be established.
306      *
307      * @since 2.7
308      */
309     @Parameter( property = "failsafe.runOrder", defaultValue = "filesystem" )
310     private String runOrder;
311 
312     /**
313      * A file containing include patterns, each in a next line. Blank lines, or lines starting with # are ignored.
314      * If {@code includes} are also specified, these patterns are appended. Example with path, simple and regex
315      * includes:
316      * <pre><code>
317      * *{@literal /}it{@literal /}*
318      * **{@literal /}NotIncludedByDefault.java
319      * %regex[.*IT.*|.*Not.*]
320      * </code></pre>
321      *
322      * @since 2.13
323      */
324     @Parameter( property = "failsafe.includesFile" )
325     private File includesFile;
326 
327     /**
328      * A file containing exclude patterns, each in a next line. Blank lines, or lines starting with # are ignored.
329      * If {@code excludes} are also specified, these patterns are appended.
330      * Example with path, simple and regex excludes:
331      * <pre><code>
332      * *{@literal /}it{@literal /}*
333      * **{@literal /}DontRunIT.*
334      * %regex[.*IT.*|.*Not.*]
335      * </code></pre>
336      *
337      * @since 2.13
338      */
339     @Parameter( property = "failsafe.excludesFile" )
340     private File excludesFile;
341 
342     /**
343      * Set to error/failure count in order to skip remaining tests.
344      * Due to race conditions in parallel/forked execution this may not be fully guaranteed.<br>
345      * Enable with system property {@code -Dfailsafe.skipAfterFailureCount=1} or any number greater than zero.
346      * Defaults to "0".<br>
347      * See the prerequisites and limitations in documentation:<br>
348      * <a href="http://maven.apache.org/plugins/maven-failsafe-plugin/examples/skip-after-failure.html">
349      * http://maven.apache.org/plugins/maven-failsafe-plugin/examples/skip-after-failure.html</a>;
350      *
351      * @since 2.19
352      */
353     @Parameter( property = "failsafe.skipAfterFailureCount", defaultValue = "0" )
354     private int skipAfterFailureCount;
355 
356     /**
357      * After the plugin process is shutdown by sending <i>SIGTERM signal (CTRL+C)</i>, <i>SHUTDOWN command</i> is
358      * received by every forked JVM.
359      * <br>
360      * The value is set to ({@code shutdown=exit}) by default (changed in version 3.0.0-M4).
361      * <br>
362      * The parameter can be configured with other two values {@code testset} and {@code kill}.
363      * <br>
364      * With({@code shutdown=testset}) the test set may still continue to run in forked JVM.
365      * <br>
366      * Using {@code exit} forked JVM executes {@code System.exit(1)} after the plugin process has received
367      * <i>SIGTERM signal</i>.
368      * <br>
369      * Using {@code kill} the JVM executes {@code Runtime.halt(1)} and kills itself.
370      *
371      * @since 2.19
372      */
373     @Parameter( property = "failsafe.shutdown", defaultValue = "exit" )
374     private String shutdown;
375 
376     /**
377      * Disables modular path (aka Jigsaw project since of Java 9) even if <i>module-info.java</i> is used in project.
378      * <br>
379      * Enabled by default.
380      * If enabled, <i>module-info.java</i> exists and executes with JDK 9+, modular path is used.
381      *
382      * @since 3.0.0-M2
383      */
384     @Parameter( property = "failsafe.useModulePath", defaultValue = "true" )
385     private boolean useModulePath;
386 
387     /**
388      * You can selectively exclude individual environment variables by enumerating their keys.
389      * <br>
390      * The environment is a system-dependent mapping from keys to values which is inherited from the Maven process
391      * to the forked Surefire processes. The keys must literally (case sensitive) match in order to exclude
392      * their environment variable.
393      * <br>
394      * Example to exclude three environment variables:
395      * <br>
396      * <i>mvn test -Dfailsafe.excludedEnvironmentVariables=ACME1,ACME2,ACME3</i>
397      *
398      * @since 3.0.0-M4
399      */
400     @Parameter( property = "failsafe.excludedEnvironmentVariables" )
401     private String[] excludedEnvironmentVariables;
402 
403     /**
404      * Since 3.0.0-M4 the process checkers are disabled.
405      * You can enable them namely by setting {@code ping} and {@code native} or {@code all} in this parameter.
406      * <br>
407      * The checker is useful in situations when you kill the build on CI and you want the Surefire forked JVM to kill
408      * the tests asap and free all handlers on the file system been previously used by the JVM and by the tests.
409      *
410      * <br>
411      *
412      * The {@code ping} should be safely used together with ZGC or Shenandoah Garbage Collector.
413      * Due to the {@code ping} relies on timing of PING (triggered every 30 seconds), slow GC may pause
414      * the timers and pretend that the parent process of the fork JVM does not exist.
415      *
416      * <br>
417      *
418      * The {@code native} is very fast checker.
419      * It is useful mechanism on Unix based systems, Linux distributions and Alpine/BusyBox Linux.
420      * See the JIRA <a href="https://issues.apache.org/jira/browse/SUREFIRE-1631">SUREFIRE-1631</a> for Windows issues.
421      *
422      * <br>
423      *
424      * Another useful configuration parameter is {@code forkedProcessTimeoutInSeconds}.
425      * <br>
426      * See the Frequently Asked Questions page with more details:<br>
427      * <a href="http://maven.apache.org/surefire/maven-surefire-plugin/faq.html#kill-jvm">
428      *     http://maven.apache.org/surefire/maven-surefire-plugin/faq.html#kill-jvm</a>
429      * <br>
430      * <a href="http://maven.apache.org/surefire/maven-failsafe-plugin/faq.html#kill-jvm">
431      *     http://maven.apache.org/surefire/maven-failsafe-plugin/faq.html#kill-jvm</a>
432      *
433      * <br>
434      *
435      * Example of use:
436      * <br>
437      * <i>mvn test -Dsurefire.enableProcessChecker=all</i>
438      *
439      * @since 3.0.0-M4
440      */
441     @Parameter( property = "failsafe.enableProcessChecker" )
442     private String enableProcessChecker;
443 
444     @Override
445     protected int getRerunFailingTestsCount()
446     {
447         return rerunFailingTestsCount;
448     }
449 
450     @Override
451     @SuppressWarnings( "unchecked" )
452     protected void handleSummary( RunResult summary, Exception firstForkException )
453             throws MojoExecutionException, MojoFailureException
454     {
455         File summaryFile = getSummaryFile();
456         if ( !summaryFile.getParentFile().isDirectory() )
457         {
458             //noinspection ResultOfMethodCallIgnored
459             summaryFile.getParentFile().mkdirs();
460         }
461 
462         try
463         {
464             Object token = getPluginContext().get( FAILSAFE_IN_PROGRESS_CONTEXT_KEY );
465             writeSummary( summary, summaryFile, token != null );
466         }
467         catch ( Exception e )
468         {
469             throw new MojoExecutionException( e.getMessage(), e );
470         }
471 
472         getPluginContext().put( FAILSAFE_IN_PROGRESS_CONTEXT_KEY, FAILSAFE_IN_PROGRESS_CONTEXT_KEY );
473     }
474 
475     private boolean isJarArtifact( File artifactFile )
476     {
477         return artifactFile != null && artifactFile.isFile() && artifactFile.getName().toLowerCase().endsWith( ".jar" );
478     }
479 
480     private static File toAbsoluteCanonical( File f )
481     {
482         try
483         {
484             return f == null ? null : f.getAbsoluteFile().getCanonicalFile();
485         }
486         catch ( IOException e )
487         {
488             throw new IllegalStateException( e.getLocalizedMessage(), e );
489         }
490     }
491 
492     @Override
493     @SuppressWarnings( "deprecation" )
494     protected boolean isSkipExecution()
495     {
496         return isSkip() || isSkipTests() || isSkipITs() || isSkipExec();
497     }
498 
499     @Override
500     protected String getPluginName()
501     {
502         return "failsafe";
503     }
504 
505     @Override
506     protected String[] getDefaultIncludes()
507     {
508         return new String[]{ "**/IT*.java", "**/*IT.java", "**/*ITCase.java" };
509     }
510 
511     @Override
512     protected String getReportSchemaLocation()
513     {
514         return "https://maven.apache.org/surefire/maven-failsafe-plugin/xsd/failsafe-test-report-3.0.xsd";
515     }
516 
517     @Override
518     public boolean isSkipTests()
519     {
520         return skipTests;
521     }
522 
523     @Override
524     @Deprecated
525     public void setSkipTests( boolean skipTests )
526     {
527         this.skipTests = skipTests;
528     }
529 
530     public boolean isSkipITs()
531     {
532         return skipITs;
533     }
534 
535     public void setSkipITs( boolean skipITs )
536     {
537         this.skipITs = skipITs;
538     }
539 
540     @Override
541     @SuppressWarnings( "deprecation" )
542     @Deprecated
543     public boolean isSkipExec()
544     {
545         return skipExec;
546     }
547 
548     @Override
549     @SuppressWarnings( "deprecation" )
550     @Deprecated
551     public void setSkipExec( boolean skipExec )
552     {
553         this.skipExec = skipExec;
554     }
555 
556     @Override
557     public boolean isSkip()
558     {
559         return skip;
560     }
561 
562     @Override
563     public void setSkip( boolean skip )
564     {
565         this.skip = skip;
566     }
567 
568     @Override
569     public File getBasedir()
570     {
571         return basedir;
572     }
573 
574     @Override
575     public void setBasedir( File basedir )
576     {
577         this.basedir = basedir;
578     }
579 
580     @Override
581     public File getTestClassesDirectory()
582     {
583         return testClassesDirectory;
584     }
585 
586     @Override
587     public void setTestClassesDirectory( File testClassesDirectory )
588     {
589         this.testClassesDirectory = testClassesDirectory;
590     }
591 
592     /**
593      * @return Output directory, or artifact file if artifact type is "jar". If not forking the JVM, parameter
594      * {@link #useSystemClassLoader} is ignored and the {@link org.apache.maven.surefire.booter.IsolatedClassLoader} is
595      * used instead. See the resolution of {@link #getClassLoaderConfiguration() ClassLoaderConfiguration}.
596      */
597     @Override
598     public File getClassesDirectory()
599     {
600         File artifact = getProject().getArtifact().getFile();
601         boolean isDefaultClsDir = classesDirectory == null;
602         return isDefaultClsDir ? ( isJarArtifact( artifact ) ? artifact : defaultClassesDirectory ) : classesDirectory;
603     }
604 
605     @Override
606     public void setClassesDirectory( File classesDirectory )
607     {
608         this.classesDirectory = toAbsoluteCanonical( classesDirectory );
609     }
610 
611     public void setDefaultClassesDirectory( File defaultClassesDirectory )
612     {
613         this.defaultClassesDirectory = toAbsoluteCanonical( defaultClassesDirectory );
614     }
615 
616     @Override
617     public File getReportsDirectory()
618     {
619         return reportsDirectory;
620     }
621 
622     @Override
623     public void setReportsDirectory( File reportsDirectory )
624     {
625         this.reportsDirectory = reportsDirectory;
626     }
627 
628     @Override
629     public String getTest()
630     {
631         return test;
632     }
633 
634     @Override
635     public void setTest( String test )
636     {
637         this.test = test;
638     }
639 
640     public File getSummaryFile()
641     {
642         return summaryFile;
643     }
644 
645     public void setSummaryFile( File summaryFile )
646     {
647         this.summaryFile = summaryFile;
648     }
649 
650     @Override
651     public boolean isPrintSummary()
652     {
653         return printSummary;
654     }
655 
656     @Override
657     public void setPrintSummary( boolean printSummary )
658     {
659         this.printSummary = printSummary;
660     }
661 
662     @Override
663     public String getReportFormat()
664     {
665         return reportFormat;
666     }
667 
668     @Override
669     public void setReportFormat( String reportFormat )
670     {
671         this.reportFormat = reportFormat;
672     }
673 
674     @Override
675     public boolean isUseFile()
676     {
677         return useFile;
678     }
679 
680     @Override
681     public void setUseFile( boolean useFile )
682     {
683         this.useFile = useFile;
684     }
685 
686     @Override
687     public String getDebugForkedProcess()
688     {
689         return debugForkedProcess;
690     }
691 
692     @Override
693     public void setDebugForkedProcess( String debugForkedProcess )
694     {
695         this.debugForkedProcess = debugForkedProcess;
696     }
697 
698     @Override
699     public int getForkedProcessTimeoutInSeconds()
700     {
701         return forkedProcessTimeoutInSeconds;
702     }
703 
704     @Override
705     public void setForkedProcessTimeoutInSeconds( int forkedProcessTimeoutInSeconds )
706     {
707         this.forkedProcessTimeoutInSeconds = forkedProcessTimeoutInSeconds;
708     }
709 
710     @Override
711     public int getForkedProcessExitTimeoutInSeconds()
712     {
713         return forkedProcessExitTimeoutInSeconds;
714     }
715 
716     @Override
717     public void setForkedProcessExitTimeoutInSeconds( int forkedProcessExitTimeoutInSeconds )
718     {
719         this.forkedProcessExitTimeoutInSeconds = forkedProcessExitTimeoutInSeconds;
720     }
721 
722     @Override
723     public double getParallelTestsTimeoutInSeconds()
724     {
725         return parallelTestsTimeoutInSeconds;
726     }
727 
728     @Override
729     public void setParallelTestsTimeoutInSeconds( double parallelTestsTimeoutInSeconds )
730     {
731         this.parallelTestsTimeoutInSeconds = parallelTestsTimeoutInSeconds;
732     }
733 
734     @Override
735     public double getParallelTestsTimeoutForcedInSeconds()
736     {
737         return parallelTestsTimeoutForcedInSeconds;
738     }
739 
740     @Override
741     public void setParallelTestsTimeoutForcedInSeconds( double parallelTestsTimeoutForcedInSeconds )
742     {
743         this.parallelTestsTimeoutForcedInSeconds = parallelTestsTimeoutForcedInSeconds;
744     }
745 
746     @Override
747     public boolean isUseSystemClassLoader()
748     {
749         return useSystemClassLoader;
750     }
751 
752     @Override
753     public void setUseSystemClassLoader( boolean useSystemClassLoader )
754     {
755         this.useSystemClassLoader = useSystemClassLoader;
756     }
757 
758     @Override
759     public boolean isUseManifestOnlyJar()
760     {
761         return useManifestOnlyJar;
762     }
763 
764     @Override
765     public void setUseManifestOnlyJar( boolean useManifestOnlyJar )
766     {
767         this.useManifestOnlyJar = useManifestOnlyJar;
768     }
769 
770     @Override
771     public String getEncoding()
772     {
773         return encoding;
774     }
775 
776     @Override
777     public void setEncoding( String encoding )
778     {
779         this.encoding = encoding;
780     }
781 
782     // the following will be refactored out once the common code is all in one place
783 
784     public boolean isTestFailureIgnore()
785     {
786         return true; // ignore
787     }
788 
789     public void setTestFailureIgnore( boolean testFailureIgnore )
790     {
791         // ignore
792     }
793 
794     @Override
795     protected void addPluginSpecificChecksumItems( ChecksumCalculator checksum )
796     {
797         checksum.add( skipITs );
798         checksum.add( summaryFile );
799     }
800 
801     @Override
802     public Boolean getFailIfNoSpecifiedTests()
803     {
804         return failIfNoSpecifiedTests;
805     }
806 
807     @Override
808     public void setFailIfNoSpecifiedTests( boolean failIfNoSpecifiedTests )
809     {
810         this.failIfNoSpecifiedTests = failIfNoSpecifiedTests;
811     }
812 
813     @Override
814     public int getSkipAfterFailureCount()
815     {
816         return skipAfterFailureCount;
817     }
818 
819     @Override
820     public String getShutdown()
821     {
822         return shutdown;
823     }
824 
825     @Override
826     public List<String> getIncludes()
827     {
828         return includes;
829     }
830 
831     @Override
832     public void setIncludes( List<String> includes )
833     {
834         this.includes = includes;
835     }
836 
837     @Override
838     public File[] getSuiteXmlFiles()
839     {
840         return suiteXmlFiles.clone();
841     }
842 
843     @Override
844     @SuppressWarnings( "UnusedDeclaration" )
845     public void setSuiteXmlFiles( File[] suiteXmlFiles )
846     {
847         this.suiteXmlFiles = suiteXmlFiles.clone();
848     }
849 
850     @Override
851     public String getRunOrder()
852     {
853         return runOrder;
854     }
855 
856     @Override
857     @SuppressWarnings( "UnusedDeclaration" )
858     public void setRunOrder( String runOrder )
859     {
860         this.runOrder = runOrder;
861     }
862 
863     @Override
864     public File getIncludesFile()
865     {
866         return includesFile;
867     }
868 
869     @Override
870     public File getExcludesFile()
871     {
872         return excludesFile;
873     }
874 
875     @Override
876     protected boolean useModulePath()
877     {
878         return useModulePath;
879     }
880 
881     @Override
882     protected void setUseModulePath( boolean useModulePath )
883     {
884         this.useModulePath = useModulePath;
885     }
886 
887     @Override
888     protected final List<File> suiteXmlFiles()
889     {
890         return hasSuiteXmlFiles() ? Arrays.asList( suiteXmlFiles ) : Collections.<File>emptyList();
891     }
892 
893     @Override
894     protected final boolean hasSuiteXmlFiles()
895     {
896         return suiteXmlFiles != null && suiteXmlFiles.length != 0;
897     }
898 
899     @Override
900     protected final String[] getExcludedEnvironmentVariables()
901     {
902         return excludedEnvironmentVariables == null ? new String[0] : excludedEnvironmentVariables;
903     }
904 
905     void setExcludedEnvironmentVariables( String[] excludedEnvironmentVariables )
906     {
907         this.excludedEnvironmentVariables = excludedEnvironmentVariables;
908     }
909 
910     @Override
911     protected final String getEnableProcessChecker()
912     {
913         return enableProcessChecker;
914     }
915 }