---
schema_version: "1"
id: 82c045832ec1d921235c5456af63557f1704fb1214ecce3155ad236b8ef48ce4
title: MUnit Support for Domain-Based Applications
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/munit/3.6/munit-domain-support.md
canonical_url: https://docs.mulesoft.com/munit/3.6/munit-domain-support
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 7f2415c3cfbc6905c58f856e06df29b557a93e03551aff73bdf840286b864a97
description: MuleSoft Documentation Site
release: "3.6"
latest: false
---
---
product: MUnit
version: 3.6
---

# MUnit Support for Domain-Based Applications

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

![logo acb active](/mulesoft/current/en-us/_/img/icons/anypoint-code-builder.svg "Anypoint Code Builder")Anypoint Code
Builder

![logo studio active](/mulesoft/current/en-us/_/img/icons/studio.svg "Anypoint Studio")Anypoint Studio

MUnit allows you to test applications that run referencing a Mule Domain.  
MUnit support for domain based applications is designed to require the minimum change of code from
your end to implement it. However if your Mule Application depends on a Mule Domain, there are a few
considerations to take into account:

- When working in Anypoint Studio, your Mule Domain must always be part of your workspace.

- Your Folder must have the same name as your artifact.  
  Regardless if it’s a Mule application or a Mule domain if, the folder in your workspace containing
  your Mule project must have the same name as the artifact ID defined in your pom file.

  For example, if your mule project’s artifact Id is:

  ```xml
  <artifactId>mule-project</artifactId>
  ```

  Then, the folder in your Studio workspace must be named `mule-project`.  
  This is case sensitive. If your folder is named `Mule-Project`, MUnit won’t recognize your
  project.

- Your resources need to be installed in an M2 repository.  
  You need to handle domains and mule apps as regular dependencies. Setting them as an artifact
  requires for them to be installed in an .M2 repository.

- Your resources need to be in your test suite pom file.

  If your Mule domain project looks like this:

  ```xml
  <modelVersion>4.0.0</modelVersion>
  <groupId>org.mule.app</groupId>
  <artifactId>domain-project</artifactId>
  <packaging>mule-domain</packaging>
  <version>1.0.0-SNAPSHOT</version>
  <name>Domain domain-project Project</name>
  ```

  Then your dependency in your Mule application should look like this:

  ```xml
  <dependency>
      <groupId>org.mule.app</groupId>
      <artifactId>domain-project</artifactId>
      <version>1.0.0-SNAPSHOT</version>
      <classifier>mule-domain</classifier>
      <scope>provided</scope>
  </dependency>
  ```

  > [!TIP] Remember to keep consistency with `<version>` artifact in your repository and in your
  > test suite’s pom file

## See Also

- [Domain Support (Anypoint Studio)](https://docs.mulesoft.com/studio/domain-support-concept)
