Reputation: 123
Mule Munit test with maven : mule-domain-config.xml file not found
I am getting an error while trying to run Munit using Maven. It's a domain project and my Munit test cases are available in mule projects. when I ran maven, it is giving me file not found exception (mule-domain-config.xml). I tried all possible ways by checking in this site but of no luck. Below is the stack trace.
INFO 2017-01-06 01:15:01,226 [main] org.mule.munit.runner.MuleContextManager: Loading mule-app.properties ... INFO 2017-01-06 01:15:01,319 [main] org.mule.munit.runner.domain.MunitDomainContextBuilder: Loading mule-deploy.properties ... java.lang.RuntimeException: org.mule.api.config.ConfigurationException: mule-domain-config.xml (java.io.FileNotFoundException)
i already checked my pom configuration and i used an AnypointStudio.exe clean also.
Upvotes: 0
Views: 2215
Reputation: 889
I am not sure if you found a solution of this problem, but I got this working by adding Mule domain project in build path, from Configure Build Path option.
Upvotes: 0
Reputation: 297
Can you check if you are loading your mule domain config xml in your munit settings.
For instance...
<munit:config name="munit" doc:name="MUnit configuration"/>
<spring:beans>
<spring:import resource="classpath:my-munit-test.xml"/>
<spring:import resource="mule-domain-config.xml"/>
</spring:beans>
<munit:test name="tesad-test-suite-FlowTest"...
Check the spring:import
lines
Also, as @anupambhusari said , please check that you are importing your domain config properly
Upvotes: 0
Reputation: 2415
Please add domain project dependency with test scope to your pom file like
<dependency>
<groupId>domain project group id</groupId>
<artifactId>domain project name</artifactId>
<version>domain version</version>
<scope>test</scope>
</dependency>
Hope this helps.
Upvotes: 0