Class NUnitRunnerTask


public class NUnitRunnerTask extends Task<NUnitRunnerTask,NUnitRunnerTaskProperties>
Executes, parses and displays NUnit test results.
  • Constructor Details

    • NUnitRunnerTask

      public NUnitRunnerTask()
  • Method Details

    • executable

      public NUnitRunnerTask executable(@NotNull @NotNull String executable)
      Sets label (not a path) of NUnit executable.

      This field is mandatory.

    • nUnitVersion2

      public NUnitRunnerTask nUnitVersion2()
      Sets the version of NUnit corresponding for the provided label.

      Either nUnitVersion2() or nUnitVersion3() must be called.

    • nUnitVersion3

      public NUnitRunnerTask nUnitVersion3()
      Sets the version of NUnit corresponding for the provided label.

      Either nUnitVersion2() or nUnitVersion3() must be called.

    • nUnitTestFiles

      public NUnitRunnerTask nUnitTestFiles(@NotNull @NotNull String nUnitTestFiles)
      Specify an assembly (.dll), Visual Studio project (.csproj), or NUnit Test Suite (.nunit) to test.

      This field is mandatory.

    • resultFilename

      public NUnitRunnerTask resultFilename(@NotNull @NotNull String resultFilename)
      The name Bamboo should give to the results file produced by NUnit. This is an XML file. e.g. "TestResult.xml"

      This field is mandatory.

    • testsToRun

      public NUnitRunnerTask testsToRun(@NotNull @NotNull String... testsToRun)
      Adds tests to run. For each of them specify the full name of the test to run. The name of the test may be that of a test case, test fixture or namespace.

      In case this field is left empty NUnit will execute all tests from the specified test file.

    • testCategoriesToInclude

      public NUnitRunnerTask testCategoriesToInclude(@NotNull @NotNull String... testCategoriesToInclude)
      Adds categories to include.
    • testCategoriesToExclude

      public NUnitRunnerTask testCategoriesToExclude(@NotNull @NotNull String... testCategoriesToExclude)
      Adds categories to exclude. Exclusions take precedence over inclusions.
    • commandLineOptions

      public NUnitRunnerTask commandLineOptions(@Nullable @Nullable String commandLineOptions)
      Add any command line options or switches you wish to include when running NUnit.
    • environmentVariables

      public NUnitRunnerTask environmentVariables(@Nullable @Nullable String environmentVariables)
      Environment variables which will be passed to runner process.
    • build

      @NotNull protected @NotNull NUnitRunnerTaskProperties build()
      Specified by:
      build in class Task<NUnitRunnerTask,NUnitRunnerTaskProperties>
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Task<NUnitRunnerTask,NUnitRunnerTaskProperties>
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Task<NUnitRunnerTask,NUnitRunnerTaskProperties>