# pdk-test Write and run integration tests for custom Flex Gateway policies using the `pdk-test` framework — Docker-based, real Flex Gateway routing, `#[pdk_test]` macro, `TestComposite` orchestration, `HttpMock` / `GrpcBin` backends, `reqwest` assertions. Use whenever the user mentions "PDK integration test", "pdk-test", "functional test PDK", "#[pdk_test]", "TestComposite", "FlexConfig", "tests/requests.rs", "make test", or asks "how do I test my policy against real Flex", "how do I set up Docker-based tests for PDK", "why does my pdk-test timeout", "how do I mock a backend in integration tests". - **Skill Source:** [SKILL.md](https://dev-portal.mulesoft.com/skills/mule-development/pdk-test/SKILL.md) ## Steps ### Step 1: Step 1: Add dev-dependencies ### Step 2: Step 2: Set up test configuration ### Step 3: Step 3: Create tests/common/mod.rs ### Step 4: Step 4: Write the first integration test ### Step 5: Step 5: Run the tests