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

Sub-tests do not show source of error in Test explorer view #1837

Closed
jurisbu opened this issue Oct 13, 2021 · 3 comments
Closed

Sub-tests do not show source of error in Test explorer view #1837

jurisbu opened this issue Oct 13, 2021 · 3 comments
Assignees
Labels
FrozenDueToAge HelpWanted Issues that are not prioritized by the maintainers. Help is requested from community contributors. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.

Comments

@jurisbu
Copy link

jurisbu commented Oct 13, 2021

What version of Go, VS Code & VS Code Go extension are you using?

Version Information
  • Run go version to get version of Go from the VS Code integrated terminal.
    • go version go1.17.1 linux/amd6
  • Run gopls -v version to get version of Gopls from the VS Code integrated terminal.
    • golang.org/x/tools/gopls v0.7.2
  • Run code -v or code-insiders -v to get version of VS Code or VS Code Insiders.
    • 1.61.0 (VS Codium)
  • Check your installed extensions to get the version of the VS Code Go extension
    • v0.28.1

Share the Go related settings you have added/edited

Describe the bug

VS Code/Codium has a Test Explorer View. Usually test failures (source code line) are highlighted and there is a peek for any given failure.

In case one uses sub-tests e.g. t.Run(...) scope - this functionality of highlighting source code line responsible of failure is gone.

Steps to reproduce the behaviour:

Example code to demonstrate the issue:

package main

import "testing"

func Test_FailurePeeksInTestExplorer(t *testing.T) {
	t.Error("A test failure")
}

func Test_NoPeekInTestExplorer(t *testing.T) {
	t.Run("Should have peek to failure in test explorer", func(t *testing.T) {
		t.Error("A test failure")
	})
}

func Test_AnotherFailurePeeksInTestExplorer(t *testing.T) {
	t.Error("Another test failure")
}

Screenshots or recordings

image

@gopherbot gopherbot added this to the Untriaged milestone Oct 13, 2021
@stamblerre stamblerre modified the milestones: Untriaged, On Deck Oct 14, 2021
@stamblerre stamblerre added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. HelpWanted Issues that are not prioritized by the maintainers. Help is requested from community contributors. labels Oct 15, 2021
@stamblerre
Copy link
Contributor

/cc @firelizzard18

@firelizzard18
Copy link
Contributor

I'll look into it

@gopherbot
Copy link
Collaborator

Change https://golang.org/cl/373274 mentions this issue: src/goTest: fix output for subtests

@golang golang locked and limited conversation to collaborators Dec 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge HelpWanted Issues that are not prioritized by the maintainers. Help is requested from community contributors. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

4 participants