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