Getting current test case description from within the test function
- Dominant language
- Rust
- Stars
- 633
- Forks
- 42
- PR merge metrics
- No merged PRs in 30d
Description
Hey, great crate enabling to do table testing in Rust!
As part of most of the tests, I generate golden files after deserializing structs for instance or generated tree content. One way to identify them in a table testing environment is to generate based on the sub test name, and I feel the description will be really helpful for this.
Is there a way to get back the description within the test to achieve this? I would prefer not add an additional attribute and repeating the test description, but that’s a possible workaround.
Thanks!
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by inspecting the crate's procedural macro attribute and how it creates subtest names. Determine how the current case description could be exposed inside the test without requiring a duplicate attribute, then add coverage for retrieving it from a table-tested function.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- testing
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100