> For the complete documentation index, see [llms.txt](https://boomi.markusschmidt.pro/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://boomi.markusschmidt.pro/boomi-scriptease/general/use-test-data.md).

# Use Test Data

The first question that might come up is: "**Where can I get test data?"** that is needed to debug and test my script? The answer is simple as that: run your process, and grab the documents that hit the - not yet developed - Data-Process Shape which is going to host the script.

## Get test data

Imaging, you have a process that executes a Business-Rule and you want to serializes the Business-Rule XML results into a plain string. You want to develop a script for that *XML conversion purpose*, and you need test data.

<figure><img src="/files/X9SorjfS6EaNpbdXT6hR" alt=""><figcaption><p>Copy &#x26; Paste documents from a test execution.</p></figcaption></figure>

* Temporarily add a Stop-Shape where you want to insert the script.&#x20;
* Run your process.
* Copy and paste as many documents as you need from the Stop-Shape,

  * and save each document as a file \
    in your script's `testData`folder, in you project directory.

  <figure><img src="/files/jWcU1GM4oBwongm2oUJV" alt="" width="201"><figcaption><p>Four files containing test data <br>pasted from a Boomi execution.</p></figcaption></figure>

## Use test data when testing

In your Test class read the documents from file:

<figure><img src="/files/cxqZ0DHy5kPCa5kAHfeK" alt=""><figcaption><p>Reading test data from file.</p></figcaption></figure>

Note: The `_testfiles` object has been created on the class level, and it point to *testFiles* directory, relative to the Test file location.

```groovy
final TestFilesHelper _testFiles = 
    new TestFilesHelper( "testData", _sourceUri)
```

<figure><img src="/files/WWlF8UinMO7DJZ9ha9Xa" alt=""><figcaption><p>Test data full-path.</p></figcaption></figure>

## Share local test data with Boomi Integration

If you test on a local machine, using your local ATOM, you can use the *testData* directly from your ATOM. Copy the *testData's* full-path, which is probably: `%UserProfile%\Documents\GroovyTraining.`

1. Setup a generic (empty) **Disk v2** connector:<br>

   <figure><img src="/files/0KykhA64Gfe4FpGcHT7b" alt=""><figcaption></figcaption></figure>

2. Create a generic query Disk v2 operation:<br>

   <figure><img src="/files/S4QL6J46zlDSBOkMg2p9" alt=""><figcaption><p>Generic Disk v2 operation</p></figcaption></figure>

3. Amend your Test-Process to read test data from disk:

<figure><img src="/files/C18dEdOH619SUaKqd3ER" alt=""><figcaption></figcaption></figure>

The SetProperties Shape sets the **testData directory** and it defines \
`DDP_FileFilter = *.json`

<figure><img src="/files/RdMynwAyfqImAkL1BerO" alt=""><figcaption><p>Directory: Fix project path + relative testData directory for this process.</p></figcaption></figure>

The dynamic document property is then used in the Disk v2 operation: \
**matchWildcard parameter**.

<figure><img src="/files/bKjWKkKJx1pVvvHMVRHC" alt=""><figcaption><p>Use DDP_FileFilter in the operation's parameters.</p></figcaption></figure>

{% hint style="info" %}
**IMPORTANT**:exclamation:: It is important that you execute the process on your **local ATOM**, please. A cloud or a customer ATOM normally does not have access to your local disk drive and folder!
{% endhint %}

That is it! Your Boomi test process and your local test script share the same test data.

<figure><img src="/files/fCuHBftrYtRwY28tnB7f" alt=""><figcaption><p>Process execution with the same four files from local disk.</p></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://boomi.markusschmidt.pro/boomi-scriptease/general/use-test-data.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
