Include location of failure in XCTest test failure message
- Dominant language
- No language data
- Stars
- 94
- Forks
- 7
- PR merge metrics
- No merged PRs in 30d
Description
We events are enabled, we currently produce output like this:
```
> Task :xcTest FAILED
LinkedListTests.testAdd STARTED
LinkedListTests.testAdd FAILED
java.lang.Throwable: XCTAssertEqual failed: ("one") is not equal to ("two") -
LinkedListTests.testConstructor STARTED
LinkedListTests.testConstructor PASSED
2 tests completed, 1 failed
```
This tells the user that `LinkedListTests.testAdd` failed, but not where. Looking at the HTML report, I see the same message. It's only when I look at the standard error of the HTML report that I see that the assertion failed on `LinkedListTests.swift:24`. I think including this information would make things a little better without a lot of work.
Contributor guide
Research direction
Start with the events-enabled XCTest output and compare the failure message with the HTML report and its standard error, using LinkedListTests.swift:24 as the source-location example. Done means failed assertions include the source location in the displayed test failure message and the HTML report.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- testing
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100