notice

This is unreleased documentation for Rasa Documentation Main/Unreleased version.
For the latest released documentation, see the latest version (3.x).

Version: Main/Unreleased

rasa.cli.test

add_subparser

def add_subparser(subparsers: SubParsersAction,
parents: List[argparse.ArgumentParser]) -> None

Add all test parsers.

Arguments:

  • subparsers - subparser we are going to attach to
  • parents - Parent parsers, needed to ensure tree structure in argparse

run_core_test_async

async def run_core_test_async(args: argparse.Namespace) -> None

Run core tests.

run_nlu_test_async

async def run_nlu_test_async(config: Optional[Union[Text, List[Text]]],
data_path: Text, models_path: Text,
output_dir: Text, cross_validation: bool,
percentages: List[int], runs: int,
no_errors: bool, domain_path: Text,
all_args: Dict[Text, Any]) -> None

Runs NLU tests.

Arguments:

  • all_args - all arguments gathered in a Dict so we can pass it as one argument to other functions.
  • config - it refers to the model configuration file. It can be a single file or a list of multiple files or a folder with multiple config files inside.
  • data_path - path for the nlu data.
  • models_path - path to a trained Rasa model.
  • output_dir - output path for any files created during the evaluation.
  • cross_validation - indicates if it should test the model using cross validation or not.
  • percentages - defines the exclusion percentage of the training data.
  • runs - number of comparison runs to make.
  • domain_path - path to domain.
  • no_errors - indicates if incorrect predictions should be written to a file or not.

run_nlu_test

def run_nlu_test(args: argparse.Namespace) -> None

Runs NLU tests.

Arguments:

  • args - the parsed CLI arguments for 'rasa test nlu'.

run_core_test

def run_core_test(args: argparse.Namespace) -> None

Runs Core tests.

Arguments:

  • args - the parsed CLI arguments for 'rasa test core'.

test

def test(args: argparse.Namespace) -> None

Run end-to-end tests.