Class MochaRunnerTask
- java.lang.Object
-
- com.atlassian.bamboo.specs.api.builders.EntityPropertiesBuilder<P>
-
- com.atlassian.bamboo.specs.api.builders.task.Task<B,P>
-
- com.atlassian.bamboo.specs.builders.task.BaseNodeTask<MochaRunnerTask,MochaRunnerTaskProperties>
-
- com.atlassian.bamboo.specs.builders.task.MochaRunnerTask
-
public class MochaRunnerTask extends BaseNodeTask<MochaRunnerTask,MochaRunnerTaskProperties>
Runs Mocha tests using 'mocha-bamboo-reporter'.- See Also:
- mochajs.org
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringDEFAULT_MOCHA_EXECUTABLEstatic booleanDEFAULT_PARSE_TEST_RESULTSstatic java.lang.StringDEFAULT_TEST_DIRECTORY-
Fields inherited from class com.atlassian.bamboo.specs.builders.task.BaseNodeTask
environmentVariables, nodeExecutable, workingSubdirectory
-
Fields inherited from class com.atlassian.bamboo.specs.api.builders.task.Task
conditions, description, requirements, taskEnabled
-
-
Constructor Summary
Constructors Constructor Description MochaRunnerTask()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MochaRunnerTaskarguments(@Nullable java.lang.String arguments)Additional command line arguments to pass to Mocha.protected @NotNull MochaRunnerTaskPropertiesbuild()booleanequals(java.lang.Object o)inthashCode()MochaRunnerTaskmochaExecutable(@NotNull java.lang.String mochaExecutable)Specify path to the Mocha executable for this task.MochaRunnerTaskparseTestResults(boolean parseTestResults)Whether this task should parse test results produced by Mocha.MochaRunnerTasktestFilesAndDirectories(@NotNull java.lang.String testFilesAndDirectories)Specify files and/or directories containing Mocha tests.-
Methods inherited from class com.atlassian.bamboo.specs.builders.task.BaseNodeTask
environmentVariables, nodeExecutable, workingSubdirectory
-
Methods inherited from class com.atlassian.bamboo.specs.api.builders.task.Task
conditions, description, enabled, requirements, toString
-
-
-
-
Method Detail
-
mochaExecutable
public MochaRunnerTask mochaExecutable(@NotNull @NotNull java.lang.String mochaExecutable)
Specify path to the Mocha executable for this task. Path must be relative to the working directory.Example:
node_modules/mocha/bin/mocha
-
testFilesAndDirectories
public MochaRunnerTask testFilesAndDirectories(@NotNull @NotNull java.lang.String testFilesAndDirectories)
Specify files and/or directories containing Mocha tests. You can specify multiple files and directories separated by a space. Defaults to 'test/' directory.
-
parseTestResults
public MochaRunnerTask parseTestResults(boolean parseTestResults)
Whether this task should parse test results produced by Mocha. Defaults to true. If set to false, a subsequentMochaParserTaskshould be used to gather the results.
-
arguments
public MochaRunnerTask arguments(@Nullable @Nullable java.lang.String arguments)
Additional command line arguments to pass to Mocha. Be aware that some options may already be set by this task configuration.
-
build
@NotNull protected @NotNull MochaRunnerTaskProperties build()
- Specified by:
buildin classTask<MochaRunnerTask,MochaRunnerTaskProperties>
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classBaseNodeTask<MochaRunnerTask,MochaRunnerTaskProperties>
-
hashCode
public int hashCode()
- Overrides:
hashCodein classBaseNodeTask<MochaRunnerTask,MochaRunnerTaskProperties>
-
-