Suite Panics have incorrect trace
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Start by reading suite.go, especially the panic trace handling around line 61, and reproduce the report with a suite inheriting through an intermediary suite and with multiple panics. Determine how the hard-coded skip values select the reported frame. Done means panic traces identify the actual project location or provide the requested configurable/full-trace behavior.
Written by the indexing model from the issue text.
Description
When a panic occurs I'm seeing the following error:
suite.go:61: test panicked: runtime error: invalid memory address or nil pointer dereference
suite.go does not exist anywhere in my project, I'm not sure where it's coming from. If I have multiple panics they all show this file and line number.
My test suite struct itself inherits from an intermediary test suite which in turn inherits from the testify test suite, I suspect this might be related.
I think the problem here is that testify uses hard coded skip values for generating its trace.
I think there are 2 things that could (should) be done to address this:
- Allow us to specify a custom skip count
- Allow us to set a preference that would produce a full trace (not just the last frame)
- Dominant language
- Go
- Stars
- 26.2k
- Forks
- 1.9k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 2
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from stretchr/testify
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 88/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
internal/cleanup
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
All issues in stretchr/testify
Similar issues
-
optimization optimization:agents-md-curator
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
githubnext/gh-aw-cao#13143 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
blinklabs-io/bursa#904 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
yanet-platform/ipfw-go#129 ·
-
bug confmap/provider/googlesecretmanagerprovider needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
open-telemetry/opentelemetry-collector-contrib#51273 · 2 comments ·
-
bug: AI Gateway client filter lists "Unknown" twice when NULL and literal Unknown clients coexist Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 90/100