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
0
votes
0 answers

Munit test fails when deploying to Cloudhub using Azure Devops CI/CD Pipeline

I created a munit test for the application and the test runs locally without any error, but when I try deploying in to the Cloudhub the Munit Test fail and below is the error detail java.lang.IllegalStateException: Cannot start embedded…
user4912134
  • 1,003
  • 5
  • 18
  • 47
0
votes
1 answer

Munit tests for the POst request end point

I am very new to Mulesoft and struggling to understand how to create the MUnit Tests for the simple flow which looks like below
trx
  • 2,077
  • 9
  • 48
  • 97
0
votes
0 answers

Munit integration test cases fail when I create multiple suites but works when I add all the test cases in a single file

I am trying to write integration test cases(without mocking responses) for my mule flows using Munit. I have created 2 different test suites for 2 of the flows under test. Individually these tests run successfully in my local. But the build fails in…
0
votes
0 answers

Getting error : "'flow-ref' is pointing to 'main-flow-LoggingConnector-default-config-global-element-suffix' which does not exist" when running Munits

Using a client logging connector from exchange in the main flow and it works fine. However, when I try to run Munits getting below error and no tests get executed: [org/mule/extensions/smart/connector/module-logging.xml:309]: 'flow-ref' is pointing…
0
votes
1 answer

Mule Dataweave Assertion Function haveKey is not validating keys with null values

Does anyone know if the DW Assertions Function haveKey is expected to validate a key pair with the key value being null? It seems MUnit fails the assertion if the value is null as shown below: Expected: to contain key carelineId Actual:…
Pierre
  • 51
  • 8
0
votes
1 answer

Mule APIKit:Router errors for mUnit due to boolean queryParam

I have an API on Anypoint Platform, it's important specs are: http scheme request endpoint = "retrieveInformation" queryParams = {"key": "value", isAllow: true} I built the Mule flows using the RAML v1.0 having the above specs, and all…
Sambit Swain
  • 131
  • 1
  • 13
0
votes
0 answers

Can we create Munit for on Error propagate in mule 4?

Does on Error Propagate Munit should fail or pass? Scenario: When I get db connectivity error, it triggers email with error notification. Flow reference to Error email flow. Flow reference is placed in On Error Propagate. I have mocked database with…
anonymous
  • 81
  • 9
0
votes
1 answer

Run Munit and application simultaneously

I need to run Munit 2 and application simultaneously in Anypoint Studio. Here is the flow: We have two applications (Project) A and B. Application A contains http listener endpoint flow fA1. When data is received here, it sends transformed JSON…
0
votes
1 answer

Munit coverage - how to override coverage by mvn command?

Given - POM file which has munit requiredApplicationCoverage defined as 75. WHEN - tried following command mvn test with-Dcoverage and help:effective-pom Edit - have mention command as comment to this thread THEN - when mvn test executes it does…
0
votes
1 answer

MUnits fails with "An Object Store was already defined for name token-manager-store-tokenManagerConfig-System_API_Config"

I am using Anypoint generated connector to call other apis from my main Mule API. While running munits by mocking the connectors and using munit:store to store payload to a key and retrieve from the key to verify, I am getting this error. An Object…
Thinker-101
  • 554
  • 5
  • 19
0
votes
2 answers

Mule 4: HTTP:SERVICE_UNAVAILABLE when trying to send a request to a HTTP listener in a MUnit test

I am trying to create a MUnit test for a flow with a HTTP Listener as message source. When I'm running the test, I get: org.mule.munit.runner.model.TestExecutionException: Error [HTTP:SERVICE_UNAVAILABLE] while running test…
hc0re
  • 1,806
  • 2
  • 26
  • 61
0
votes
1 answer

How to omit one message processor in MUnit test?

I have a flow, in which I have an error handler which deletes an input file.
hc0re
  • 1,806
  • 2
  • 26
  • 61
0
votes
1 answer

How to write a Munit test case for an integration that is using a common HTTP request connector for calling 5 different resources of the system layer?

I am calling a system layer from process layer as first get: /abc get: /xyz post: /efg for all these 3 calls using a common http requestor by setting path, method and host before calling this http requestor. how to mock this http requestor for each…
Anurag Sharma
  • 780
  • 7
  • 31
0
votes
0 answers

Running MUnit gives error Invalid property name: `maskedRequestPath`

I have a flow that uses http:listener and apikit-soap:router. I recorded a MUnit test for the flow, executing the flow via SoapUI. When I run the generated MUnit, it fails with the following error: "Invalid property name: `maskedRequestPath` on…
AndrWeisR
  • 1,110
  • 11
  • 21
0
votes
1 answer

How to access attributes including headers, queryparams in Munit set Event processor. I am using Anypoint Studio 7.5

How to access attributes including headers, queryparams in Munit set Event processor. I am using Anypoint Studio 7.5 I have tried with but it didn't worked.
naren
  • 105
  • 2
  • 13