Contact Us 1-800-596-4880

Dynamic Directories

logo acb active Anypoint Code Builder

logo studio active Anypoint Studio

When managing files and folders during a test, MUnit provides the munit.temporary.directory property to reference a temporary directory. You can create files and folders inside this directory to use in your tests.

The temporary directory is deleted at the end of each test.

For example, using the file connector, you could configure the working directory as follows:

<file:config name="tmpDir">
    <file:connection workingDir="${munit.temporary.directory}"/>
</file:config>

And then use it to create files/folders inside it:

<file:create-directory config-ref="tmpDir" directoryPath="example"/>

See Also