Uploaded image for project: 'BlueJ'
  1. BlueJ
  2. BLUEJ-1258

Remove "noise" from JUnit output

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Low
    • Resolution: Done
    • Affects Version/s: 4.2.0
    • Fix Version/s: 4.2.1
    • Component/s: TestMgr
    • Sprint:
      4.2.1

      Description

      Here is a typical JUnit test failure. Much of the error message is "noise" and not relevant to the user. 

      testClear
      ---
      java.lang.AssertionError: expected:<0> but was:<5> at
          org.junit.Assert.fail(Assert.java:88) at
          org.junit.Assert.failNotEquals(Assert.java:743) at
          org.junit.Assert.assertEquals(Assert.java:118) at
          org.junit.Assert.assertEquals(Assert.java:555) at
          org.junit.Assert.assertEquals(Assert.java:542) at
          MetaArrayTest.testClear(MetaArrayTest.java:136) at
          java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
          java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at
          java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      

       Would it be possible to either highlight the important lines or remove the superfluous ones? If the unnecessary ones are removed, this is what the message could look like:

      testClear
      ---
      java.lang.AssertionError: expected:<0> but was:<5> at
          MetaArrayTest.testClear(MetaArrayTest.java:136)

       

        Attachments

          Activity

            People

            • Assignee:
              hitech Hamza Hamza
              Reporter:
              bbrown Barry Brown
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: