[ 
https://issues.apache.org/jira/browse/SUREFIRE-1798?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17189376#comment-17189376
 ] 

James Nord commented on SUREFIRE-1798:
--------------------------------------

just lost a lot of time due to the stacktrace trimming the really important 
information :(

{noformat}
[ERROR] 
com.cloudbees.jenkins.test.acceptance.SlackIntegrationAndBitbucketTest.test_sending_when_pr_is_built
  Time elapsed: 145.47 s  <<< ERROR!
org.openqa.selenium.WebDriverException:
TypeError: a is null
Build info: version: '3.141.59', revision: 'e82be7d358', time: 
'2018-11-14T08:17:03'
System info: host: 'CB-JAMES2', ip: '192.168.147.112', os.name: 'Windows 10', 
os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_265'
Driver info: org.openqa.selenium.remote.RemoteWebDriver
Capabilities {acceptInsecureCerts: true, browserName: firefox, browserVersion: 
79.0, javascriptEnabled: true, moz:accessibilityChecks: false, moz:buildID: 
20200720193547, moz:geckodriverVersion: 0.27.0, moz:headless: false, 
moz:processID: 2521, moz:profile: /tmp/rust_mozprofileXamBcR, 
moz:shutdownTimeout: 60000, moz:useNonSpecCompliantPointerOrigin: false, 
moz:webdriverClick: true, pageLoadStrategy: normal, platform: LINUX, 
platformName: LINUX, platformVersion: 4.19.104-microsoft-standard, rotatable: 
false, setWindowRect: true, strictFileInteractability: false, timeouts: 
{implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: 
dismiss and notify, webdriver.remote.sessionid: de72d1c1-b2e0-45d8-a52f-164...}
Session ID: de72d1c1-b2e0-45d8-a52f-164548f12475
{noformat}

is useless to help me fix the test and work out what and where it has failed.

when disabling stack trimming I get

{noformat}
[ERROR] 
com.cloudbees.jenkins.test.acceptance.SlackIntegrationAndBitbucketTest.test_sending_when_pr_is_built
  Time elapsed: 223.846 s  <<< ERROR!
org.openqa.selenium.WebDriverException:
TypeError: a is null
Build info: version: '3.141.59', revision: 'e82be7d358', time: 
'2018-11-14T08:17:03'
System info: host: 'CB-JAMES2', ip: '192.168.147.112', os.name: 'Windows 10', 
os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_265'
Driver info: org.openqa.selenium.remote.RemoteWebDriver
Capabilities {acceptInsecureCerts: true, browserName: firefox, browserVersion: 
79.0, javascriptEnabled: true, moz:accessibilityChecks: false, moz:buildID: 
20200720193547, moz:geckodriverVersion: 0.27.0, moz:headless: false, 
moz:processID: 2853, moz:profile: /tmp/rust_mozprofilefjc8vM, 
moz:shutdownTimeout: 60000, moz:useNonSpecCompliantPointerOrigin: false, 
moz:webdriverClick: true, pageLoadStrategy: normal, platform: LINUX, 
platformName: LINUX, platformVersion: 4.19.104-microsoft-standard, rotatable: 
false, setWindowRect: true, strictFileInteractability: false, timeouts: 
{implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: 
dismiss and notify, webdriver.remote.sessionid: 8d0ea3c9-747e-4e7f-96f0-fc5...}
Session ID: 8d0ea3c9-747e-4e7f-96f0-fc54ef7de803
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at 
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at 
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
        at 
org.openqa.selenium.remote.http.W3CHttpResponseCodec.createException(W3CHttpResponseCodec.java:187)
        at 
org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:122)
        at 
org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:49)
        at 
org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:158)
        at 
org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552)
        at 
org.openqa.selenium.remote.RemoteWebElement.execute(RemoteWebElement.java:285)
        at 
org.openqa.selenium.remote.RemoteWebElement.getText(RemoteWebElement.java:166)
        at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at 
org.openqa.selenium.support.events.EventFiringWebDriver$EventFiringWebElement.lambda$new$0(EventFiringWebDriver.java:404)
        at com.sun.proxy.$Proxy38.getText(Unknown Source)
        at 
org.openqa.selenium.support.events.EventFiringWebDriver$EventFiringWebElement.getText(EventFiringWebDriver.java:463)
        at 
org.jenkinsci.test.acceptance.po.CapybaraPortingLayerImpl.getPageContent(CapybaraPortingLayerImpl.java:490)
        at 
org.jenkinsci.test.acceptance.Matchers$1.matchesSafely(Matchers.java:47)
        at 
org.jenkinsci.test.acceptance.Matchers$1.matchesSafely(Matchers.java:41)
        at org.hamcrest.TypeSafeMatcher.matches(TypeSafeMatcher.java:65)
        at org.hamcrest.core.IsNot.matches(IsNot.java:25)
        at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:12)
        at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:8)
        at 
com.cloudbees.jenkins.test.acceptance.BaseSlackIntegrationTest.setupSecurity(BaseSlackIntegrationTest.java:79)
        at 
com.cloudbees.jenkins.test.acceptance.BaseSlackIntegrationTest.setUp(BaseSlackIntegrationTest.java:33)
        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.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
        at 
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
        at 
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
        at 
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
        at 
org.jenkinsci.test.acceptance.junit.WithPlugins$RuleImpl$1.evaluate(WithPlugins.java:164)
        at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)
        at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)
        at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)
        at 
org.jenkinsci.test.acceptance.junit.JenkinsAcceptanceTestRule$1$2$1.evaluate(JenkinsAcceptanceTestRule.java:168)
        at 
org.jenkinsci.test.acceptance.junit.FilterRule$1.evaluate(FilterRule.java:63)
        at 
com.cloudbees.jenkins.test.acceptance.IgnoreForProducts$RuleImpl$1.evaluate(IgnoreForProducts.java:59)
        at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)
        at 
org.jenkinsci.test.acceptance.junit.JenkinsAcceptanceTestRule$1.evaluate(JenkinsAcceptanceTestRule.java:58)
        at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
        at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
        at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
        at 
org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:365)
        at 
org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:273)
        at 
org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238)
        at 
org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:159)
        at 
org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:377)
        at 
org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:138)
        at 
org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:465)
        at 
org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:451)
{noformat}

which can point me to
1) its the setup code
2) its actually very deep in code that setup calls to do other things not even 
the test code...

the default behaviour is causing issues that you can not see why tests failed - 
and I would argue that is a major goal for surefire and alas unless you change 
the defaults it does not reliable perform that task.  so please change it.


> trimStackTrace should be false by default
> -----------------------------------------
>
>                 Key: SUREFIRE-1798
>                 URL: https://issues.apache.org/jira/browse/SUREFIRE-1798
>             Project: Maven Surefire
>          Issue Type: Task
>          Components: Maven Surefire Plugin
>            Reporter: Romain Manni-Bucau
>            Priority: Major
>
> True was intended to clean up the output but it always misses any useful data 
> so let's set an useful default



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to