apache / apache/maven-surefire
[SUREFIRE-2131] Trim exception stack traces in test frameworks
- Dominant language
- Java
- Stars
- 461
- Forks
- 588
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 19
Description
**[Elliotte Rusty Harold](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=elharo)** opened **[SUREFIRE-2131](https://issues.apache.org/jira/browse/SUREFIRE-2131?redirect=false)** and commented
At most four lines of this real world error is relevant. The rest simply hides the problem. E.g. I do not need to know that assertEquals calls a different assertEquals which calls assertEqualsImpl which calls failNotEquals which calls fail in order to debug the error. Only the user's own code and its dependencies should be shown in the stack trace. The test framework method's should not be included.
```
[ERROR] com.facebook.presto.server.remotetask.TestHttpRemoteTask.testRejectedExecution[false](4) Time elapsed: 4.037 s <<< FAILURE!
java.lang.AssertionError: expected [REMOTE_TASK_ERROR:65542] but found [GENERIC_INTERNAL_ERROR:65536]
at org.testng.Assert.fail(Assert.java:110)
at org.testng.Assert.failNotEquals(Assert.java:1413)
at org.testng.Assert.assertEqualsImpl(Assert.java:149)
at org.testng.Assert.assertEquals(Assert.java:131)
at org.testng.Assert.assertEquals(Assert.java:643)
at com.facebook.presto.server.remotetask.TestHttpRemoteTask.runTest(TestHttpRemoteTask.java:250)
at com.facebook.presto.server.remotetask.TestHttpRemoteTask.testRejectedExecution(TestHttpRemoteTask.java:169)
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.invokers.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:135)
at org.testng.internal.invokers.InvokeMethodRunnable.runOne(InvokeMethodRunnable.java:44)
at org.testng.internal.invokers.InvokeMethodRunnable.call(InvokeMethodRunnable.java:72)
at org.testng.internal.invokers.InvokeMethodRunnable.run(InvokeMethodRunnable.java:32)
at org.testng.internal.invokers.MethodInvocationHelper.invokeWithTimeoutWithNoExecutor(MethodInvocationHelper.java:331)
at org.testng.internal.invokers.MethodInvocationHelper.invokeWithTimeout(MethodInvocationHelper.java:294)
at org.testng.internal.invokers.TestInvoker.invokeMethod(TestInvoker.java:679)
at org.testng.internal.invokers.TestInvoker.invokeTestMethod(TestInvoker.java:220)
at org.testng.internal.invokers.MethodRunner.runInSequence(MethodRunner.java:50)
at org.testng.internal.invokers.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:945)
at org.testng.internal.invokers.TestInvoker.invokeTestMethods(TestInvoker.java:193)
at org.testng.internal.invokers.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
at org.testng.internal.invokers.TestMethodWorker.run(TestMethodWorker.java:128)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
```
---
No further details from [SUREFIRE-2131](https://issues.apache.org/jira/browse/SUREFIRE-2131?redirect=false)
Contributor guide
Research direction
The issue names no repository files, tests, or entry points. Start by locating the Surefire handling of TestNG failure stack traces, then define and test how framework frames are identified; done means user code and its dependencies remain while test-framework frames are omitted.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- testing-qa
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100