Questions tagged [munit]

MUnit is a Mule application testing framework that allows you to easily build automated tests for your integrations and APIs. It provides a full suite of integration and unit test capabilities, and is fully integrated with Maven and Surefire for integration with your continuous deployment environment.

It allows mule developers to automate mule app testing in an easy manner.

151 questions
2
votes
1 answer

Error: Could not create the Java Virtual Machine. Only when running MUnit test

I am attempting the run an MUnit test and everytime I try to run it I receive this error in the console: Unrecognized option: -esb Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit. I have…
cmmoutes13
  • 131
  • 1
  • 7
2
votes
1 answer

Haxe munit with Travis

I'm trying to setup Travis to run munit tests for a Haxe library. It installs the dependencies but fails when it tries to run the first test. Any suggestions would be appreciated. Massive Unit - Copyright 2015 Massive Interactive. Version 2.1.0 …
Rich
  • 331
  • 2
  • 7
2
votes
1 answer

MUnit testing a flow with collection-aggregator

I am trying to write MUnit tests for my Mule flows. I want to write a test for the below flow
Sudarshan
  • 8,574
  • 11
  • 52
  • 74
1
vote
1 answer

it is possible to validate json schema on mule 4 munit assert?

In Postman tests I can validate if response has a given schema: var jsonObject = pm.response.json(); var schemaResponse = { "type": "object", "properties": { "ok": { "type": "boolean" }, "operation_id": { "type":…
mhery
  • 2,097
  • 4
  • 26
  • 35
1
vote
1 answer

Mocking a connector throws error like Element not defined in Mule Registery

I am creating the Munit tests and mocking the salesforce connector for the query. The Query response in the flow returns the payload in application/java type. So below is the Mock the setting
user4912134
  • 1,003
  • 5
  • 18
  • 47
1
vote
1 answer

Mule - How to fail jenkins pipeline when code coverage is less than predefined threshold?

I have a built a Mule API with Munits. I would like to build and deploy the application using jenkins pipeline. However, before build & deploy, I would like to execute maven clean test and check if code coverage is less than some x%. if yes, then I…
Bala
  • 99
  • 2
  • 6
1
vote
1 answer

Error in Mule 4 inside MUnit 2 test when calling soapkit flow saying the flow does not exist even if it is there

I have an API main flow called "api-main" which is a SOAP-Kit flow that has a SOAP Router that distributes the message to sub-flows, the Listener is set up with my WSDL and I can call it perfectly using an HTTP client such as SOAP-UI. However, when…
rod.dinis
  • 1,233
  • 2
  • 11
  • 20
1
vote
2 answers
1
vote
3 answers

Munit test case getting InterceptionException error

I am getting InterceptionException while executing a munit test case. The Munit version I am using is 2.1.5. Below is the error stack trace I am getting. org.mule.runtime.core.internal.processor.interceptor.InterceptionException: at…
Dan
  • 425
  • 1
  • 5
  • 13
1
vote
1 answer

Assert HTTP Status Code in MUnit for Mule 4

How do I assert my HTTP Status Code in MUnit Version 2.2.1 for Mule 4? I have checked all the vars and attributes being returned and none of them have the HTTP Status Code.
Julie
  • 63
  • 10
1
vote
1 answer

Issue with MUnit and Spring Security Schema

I have a API-kit project that incorporates spring security basic authentication. The application builds and runs successfully without MUnit tests. When including MUnit tests, it fails to build giving the following: WARN 2019-07-09 11:21:18,619…
tbriscoe
  • 160
  • 1
  • 13
1
vote
1 answer

Ignore Field in json in assert operation

I'm trying to write a MUNIT test case for mule service and want to ignore a field having timestamp. Currently, i'm using below code to perform the…
Piyush Singh
  • 57
  • 1
  • 8
1
vote
1 answer

Munit 4: Is there a way to mock a payload from the same cache-scoped HTTP Request in different test cases for a suite?

I am trying to Mock a response payload from HTTP request like this:
Ara Kokeba
  • 149
  • 1
  • 4
  • 15
1
vote
2 answers

Issues while validating the two JSON payloads in MUNIT 2.0

I have a service which is returning the below json payload: { "location-details": { "fromPostalCode": "1508XB", "fromGeoCoordinates": "116532,496398", "toPostalCode": "1511MA", "toGeoCoordinates": "120427,493380" }, …
Piyush Singh
  • 57
  • 1
  • 8
1
vote
1 answer

Mulesoft Munit maven build failing

Below is pom.xml I got some sample example in github, trying to build it, it is failing with below error. Can anyone facing same issue? I did google, many project I got it from github, till now, not even single project got built successfully. I…
ravibeli
  • 484
  • 9
  • 30
1
2
3
10 11