---
schema_version: "1"
id: 218bbc33568499a9c1b9dc280796b0cdc3371c984b427ea647b3a8dfe9de8bb4
title: Test Recorder in Studio
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/munit/2.3/test-recorder.md
canonical_url: https://docs.mulesoft.com/munit/2.3/test-recorder
source_site: docs.mulesoft.com
content_type: documentation
content_hash: df5e1cd049cdb26ea1bbdb13fe0c2e92bd3cd8292f94d2164635334c43523c7a
description: MuleSoft Documentation Site
release: "2.3"
latest: false
---
---
product: MUnit
version: 2.3
---

# Test Recorder in Studio

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

The Test Recorder enables you to record a processing flow and then configure a unit test based on
the captured event.

The test recorder captures real data as it goes through your application in Anypoint Studio. By
capturing the flow execution, MUnit can automatically generate an MUnit test so that you can
configure the necessary mocks and assertions for your test. See
[Recording a Test from an Exchange Example](https://docs.mulesoft.com/munit/2.3/test-recorder-examples) for a fully working example.

## Compatibility

The following table describes the product versions required to use the Test Recorder.

<table><colgroup><col> <col></colgroup><thead><tr><th>Product</th><th>Version</th></tr></thead><tbody><tr><td><div><div><p>Anypoint Studio</p></div></div></td><td><div><div><p>7.5.0 and later</p></div></div></td></tr><tr><td><div><div><p>MUnit</p></div></div></td><td><div><div><p>2.2.5 and later</p></div></div></td></tr><tr><td><div><div><p>MUnit Anypoint Studio Plugin</p></div></div></td><td><div><div><p>2.5.0 and later</p></div></div></td></tr><tr><td><div><div><p>Mule runtime engine</p></div></div></td><td><div><div><p>4.3.0 and later</p></div></div></td></tr></tbody></table>

## Limitations

The test recorder has the following limitations when you create MUnit tests:

- You cannot create tests for flows with Mule errors raised inside the flow or already existing in
  the incoming event, even if an **on error continue** error handler controls them.

- A recorded flow execution ends successfully, but the result does not reach its destination because
  the application is killed.

- Your validations fail every time your test runs if you configure `spy` or `assert` processors to
  assert values for random data, time-dependent information (such as timestamps), or values
  resulting from parallel processes, because those values change in every execution.

- Mocking values resulting from parallel processes causes a mixture of real and mocked data that
  compromises the execution of the processors that follow in your test.

- Although the recorder supports data iteration in the flow, such as recursions or loops, it does
  not support cases in which the structure of the data being tested changes inside the iteration.

- The recorder does not support mocking a message before or inside a `foreach` processor.

- When using the Test Recorder to generate a test over your flow, you can only mock parameters
  included in your flow. You cannot mock parameters in sub-flows or in referenced flows through the
  Test Recorder UI. If you need to mock parameters in sub-flows of any other process in the project,
  you can modify the mocking component after creating the test.

## See Also

- [Recording a Test from an Exchange Example](https://docs.mulesoft.com/munit/2.3/test-recorder-examples)

- [Mocking a Message Before and Inside a Foreach Processor](https://docs.mulesoft.com/munit/2.3/mock-before-after-foreach-cookbook)
