> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/nemo/guardrails/llms.txt.
> For full documentation content, see https://docs.nvidia.com/nemo/guardrails/llms-full.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/nemo/guardrails/_mcp/server.

# nemoguardrails.testing

Public testing surface for NeMo Guardrails.

This subpackage ships utilities that help users write fast, deterministic tests
for their guardrails configurations. The two main building blocks are:

* :class:`FakeLLMModel`: a scriptable implementation of the `LLMModel`
  protocol that returns canned responses.
* :class:`TestChat`: an ergonomic helper for asserting bot replies against a
  scripted conversation.

Pytest fixtures are exposed via the `nemoguardrails.testing.fixtures` plugin.
Add it to your `conftest.py` to opt in::

pytest\_plugins = \["nemoguardrails.testing.fixtures"]

## Submodules

* **[`nemoguardrails.testing.chat_harness`](/guardrails-python-sdk/nemoguardrails/testing/chat_harness)**
* **[`nemoguardrails.testing.fake_model`](/guardrails-python-sdk/nemoguardrails/testing/fake_model)**
* **[`nemoguardrails.testing.fixtures`](/guardrails-python-sdk/nemoguardrails/testing/fixtures)**

## Package Contents

### Data

[`__all__`](#nemoguardrails-testing-__all__)

### API

```python
nemoguardrails.testing.__all__ = ['FakeLLMModel', 'TestChat']
```