---
schema_version: "1"
id: 9067f3802e57624c6bb07af2fa6277552151a45e71f626f6e849168f1997567c
title: Testing and Debugging Custom Policies
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/pdk/1.8/policies-pdk-test-debug-overview.md
canonical_url: https://docs.mulesoft.com/pdk/1.8/policies-pdk-test-debug-overview
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 8f45eb01ff7245493fc2ea10f4b35748c6603f1c3d60f5dc39cff40a1b56cede
description: MuleSoft Documentation Site
release: "1.8"
latest: false
---
---
product: Omni Gateway Policy Development Kit (PDK)
version: 1.8
---

# Testing and Debugging Custom Policies

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

Use the Policy Development Kit (PDK) testing options to validate behavior, catch regressions, and
debug before you [publish your policy to Exchange](https://docs.mulesoft.com/pdk/1.8/policies-pdk-publish-policies-overview):

- [Debugging Custom Policies with the PDK Debugging Playground](https://docs.mulesoft.com/pdk/1.8/policies-pdk-debug-local) — Use the
  preconfigured API instance in your project’s `playground` directory to exercise and debug the
  policy interactively.

- [Writing Unit Tests](https://docs.mulesoft.com/pdk/1.8/policies-pdk-unit): Run fast, deterministic Rust unit tests that exercise the
  full request and response lifecycle without configuring Envoy, WebAssembly, or external services.

- [Writing Integration Tests](https://docs.mulesoft.com/pdk/1.8/policies-pdk-integration-tests): Run automated tests on a local mode
  Omni Gateway to verify your policy with real gateway behavior and surrounding configuration.
