Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Class test items displayed in TestResults display no output #1148

Open
adam-fowler opened this issue Oct 17, 2024 · 1 comment
Open

Class test items displayed in TestResults display no output #1148

adam-fowler opened this issue Oct 17, 2024 · 1 comment
Labels
bug Something isn't working needs verification Issue has been fixed, but requires verification before closing swift-testing Issues related to testing integration with swift-testing

Comments

@adam-fowler
Copy link
Contributor

Describe the bug
When you select a test item associated with a class in the TestResults pane. It outputs

The test case did not report any output.

Expected behavior
It should either display the results for all the tests in that class, or the test item should not be displayed in the TestResults pane.

@adam-fowler adam-fowler added the bug Something isn't working label Oct 17, 2024
plemarquand added a commit to plemarquand/vscode-swift that referenced this issue Oct 21, 2024
Capture the XCTest output associated with suites and assocaite it with
the test item that appears in the test run history. This makes it easy
to see the start/end time output of a suite by clicking on it.

In order to capture the test target for a suite we need to wait for the
first test that executes within that suite in order to get the target.
For whatever reason, XCTest does not print a suites target, only a
test's when it starts. The approach is if a suite starts, queue output
up until the first test run, then associate the last line of queued
output with the test target found on the started test. Lines before the
last line are not assocaited with a test (these are typically the top
level suite like "Selected Tests" or the test target name.

Issue: swiftlang#1148
@plemarquand plemarquand self-assigned this Oct 21, 2024
@swiftlang swiftlang deleted a comment from grynspan Oct 21, 2024
@swiftlang swiftlang deleted a comment from grynspan Oct 21, 2024
@plemarquand
Copy link
Contributor

I accidentally replied to a comment on #1146 here. Moved discussion over to that issue.

@award999 award999 added the swift-testing Issues related to testing integration with swift-testing label Oct 22, 2024
plemarquand added a commit that referenced this issue Oct 22, 2024
Capture the XCTest output associated with suites and assocaite it with
the test item that appears in the test run history. This makes it easy
to see the start/end time output of a suite by clicking on it.

In order to capture the test target for a suite we need to wait for the
first test that executes within that suite in order to get the target.
For whatever reason, XCTest does not print a suites target, only a
test's when it starts. The approach is if a suite starts, queue output
up until the first test run, then associate the last line of queued
output with the test target found on the started test. Lines before the
last line are not assocaited with a test (these are typically the top
level suite like "Selected Tests" or the test target name.

Issue: #1148
@plemarquand plemarquand added the needs verification Issue has been fixed, but requires verification before closing label Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs verification Issue has been fixed, but requires verification before closing swift-testing Issues related to testing integration with swift-testing
Projects
Status: Needs Verification
Development

No branches or pull requests

3 participants