Free MuleSoft CONNECT Keynote & Expo Pass Available!

Register now+
Nav

FAQ: How To Read MUnit Test Results

This section briefly explains how to read the MUnit console logs.

Successful Build

         
      
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
============================================================
============  Running  new-test-suite.xml suite ============
============================================================
++++++++++++++++++++++++++++++++++++++++++++
+ Running test: test-suite - Test          +
++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ SUCCESS - Test test-suite finished successfully - Time elapsed: 2227ms +
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

==================================================================================
Number of tests run: 1 - Failed: 0 - Errors: 0 - Skipped: 0 - Time elapsed: 2241ms
==================================================================================

[INFO] ====================================================================================
[INFO] MUnit Run Summary
[INFO] ====================================================================================
[INFO]  >> new-test-suite.xml test result: Tests: 1, Errors: 0, Failures: 0, Skipped: 0
[INFO]
[INFO] ====================================================================================
[INFO]  > Tests:           1
[INFO]  > Errors:          0
[INFO]  > Failures:        0
[INFO]  > Skipped:         0
[INFO] ====================================================================================
Failed Build

         
      
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
============================================================
============  Running  new-test-suite.xml suite ============
============================================================
++++++++++++++++++++++++++++++++++++++++++++
+ Running test: test-suite - Test          +
++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ FAILURE - The test test-suite finished with a failure - Time elapsed: 2399ms +
java.lang.AssertionError:
Expected: "Bye World!"
     but: was "Hello World"
        at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20)
        at org.mule.munit.assertion.internal.AssertModule.assertThat(AssertModule.java:34)
        at org.mule.munit.tools.assertion.AssertOperations.assertThat(AssertOperations.java:45)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

==================================================================================
Number of tests run: 1 - Failed: 1 - Errors: 0 - Skipped: 0 - Time elapsed: 2416ms
==================================================================================

[INFO] ====================================================================================
[INFO] MUnit Run Summary
[INFO] ====================================================================================
[INFO]  >> new-test-suite.xml test result: Tests: 1, Errors: 0, Failures: 1, Skipped: 0
[INFO]          --- test-suite <<< FAILED
[INFO]
[INFO] ====================================================================================
[INFO]  > Tests:           1
[INFO]  > Errors:          0
[INFO]  > Failures:        1
[INFO]  > Skipped:         0
[INFO] ====================================================================================
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 22.400 s
[INFO] Finished at: 2017-11-16T14:37:32-03:00
[INFO] Final Memory: 19M/302M
[INFO] ------------------------------------------------------------------------
Build Error

         
      
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
============================================================
============  Running  new-test-suite.xml suite ============
============================================================
++++++++++++++++++++++++++++++++++++++++++++
+ Running test: test-suite - Test          +
++++++++++++++++++++++++++++++++++++++++++++
ERROR 2017-11-16 14:40:20,239 [[coverage].http.requester.HTTP_Request_configuration.01: [coverage].http.requester.HTTP_Request_configuration @55ccbf06 SelectorRunner] org.mule.extension.http.internal.request.HttpRequester: Error sending HTTP request to http://0.0.0.0:8081/
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ ERROR - The test test-suite finished with an error - Time elapsed: 218ms +
java.util.concurrent.ExecutionException: org.mule.runtime.api.component.execution.ComponentExecutionException: org.mule.extension.http.api.error.HttpRequestFailedException: HTTP GET on resource 'http://0.0.0.0:8081/' failed: Connection refused.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

[INFO] ====================================================================================
[INFO] MUnit Run Summary
[INFO] ====================================================================================
[INFO]  >> new-test-suite.xml test result: Tests: 1, Errors: 1, Failures: 0, Skipped: 0
[INFO]          --- test-suite <<< ERROR
[INFO]
[INFO] ====================================================================================
[INFO]  > Tests:           1
[INFO]  > Errors:          1
[INFO]  > Failures:        0
[INFO]  > Skipped:         0
[INFO] ====================================================================================
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 20.167 s
[INFO] Finished at: 2017-11-16T14:40:27-03:00
[INFO] Final Memory: 25M/315M
[INFO] ------------------------------------------------------------------------

In this topic: