Uploaded image for project: 'NetBeans'
  1. NetBeans
  2. NETBEANS-296

Hyperlinks missing in stacktraces when using maven-surefire-plugin 3.0.0-M4 or later

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • ?
    • None

    Description

      If Surefire runs a test that throws an exception we see the stacktrace in the Output Window but the line items are not hyperlinked back to the source-code. For example, given:

      removeOrders(com.holdmyspot.pyramid.bitstamp.OrderEventListenerTest)  Time elapsed: 13.942 s  <<< FAILURE!
      java.lang.IllegalArgumentException: 
      amount must be positive.
      Actual: 0
      	at com.holdmyspot.pyramid.exchange.Order.<init>(Order.java:42)
      	at com.holdmyspot.pyramid.bitstamp.OrderStream$OrderEventSubscriber.onEvent(OrderStream.java:209)
      	at com.holdmyspot.pyramid.bitstamp.OrderEventListenerTest.removeOrders(OrderEventListenerTest.java:74)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:124)
      	at org.testng.internal.Invoker.invokeMethod(Invoker.java:571)
      	at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:707)
      	at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:979)
      	at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)
      	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)
      	at org.testng.TestRunner.privateRun(TestRunner.java:648)
      	at org.testng.TestRunner.run(TestRunner.java:505)
      	at org.testng.SuiteRunner.runTest(SuiteRunner.java:455)
      	at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:450)
      	at org.testng.SuiteRunner.privateRun(SuiteRunner.java:415)
      	at org.testng.SuiteRunner.run(SuiteRunner.java:364)
      	at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
      	at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:84)
      	at org.testng.TestNG.runSuitesSequentially(TestNG.java:1187)
      	at org.testng.TestNG.runSuitesLocally(TestNG.java:1116)
      	at org.testng.TestNG.runSuites(TestNG.java:1028)
      	at org.testng.TestNG.run(TestNG.java:996)
      	at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:135)
      	at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.executeSingleClass(TestNGDirectoryTestSuite.java:112)
      	at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute(TestNGDirectoryTestSuite.java:99)
      	at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:146)
      	at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:373)
      	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:334)
      	at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:119)
      	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:407)
      

      We should be able to click on stacktrace elements and the editor should jump to the associated file and line number. I believe this behavior works for Ant projects but it work in most cases for Maven projects.

      Attachments

        Activity

          People

            Unassigned Unassigned
            cowwoc Gili
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: