Class UnitTestCommand

Executes script unit tests.

Inheritance
object
Sitecore.CH.Cli.Core.Abstractions.Commands.BaseCommand<THandler>Sitecore.CH.Cli.Plugin.Scripting.CommandHandlers.UnitTestCommandHandler
UnitTestCommand
Namespace: SitecoreSitecore.CHSitecore.CH.CliSitecore.CH.Cli.PluginSitecore.CH.Cli.Plugin.ScriptingCommands
Assembly: Sitecore.CH.Cli.Plugin.Scripting.dll
Syntax
RequestResponse
public class UnitTestCommand : BaseCommand<UnitTestCommandHandler>
Remarks

Optional parameters

  • --name -n Specified the name of the script to execute unit tests for.
  • --folder -f Specifies the working directory that contains the script files. If the --folder option is not specified, the current folder is assumed to be the working directory.

Global parameters

  • -? --help -h Show this help message and exit.
  • -v --verbosity Enables verbose logging.
Examples

Executes all unit tests:

RequestResponse
ch-cli scripting unit-test

Executes unit tests from a specific working directory:

RequestResponse
ch-cli scripting unit-test --folder "<working directory path>"

Executes one tests:

RequestResponse
ch-cli scripting unit-test --name "<script name>"

Do you have some feedback for us?

If you have suggestions for improving this article,