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

src/goTestExplorer: implement a test provider for the new test api #1590

Closed
wants to merge 34 commits into from

Conversation

firelizzard18
Copy link
Contributor

@firelizzard18 firelizzard18 commented Jun 25, 2021

What this does:

  • Implements a test provider using the new API
  • Populates the test explorer with a list of modules and/or workspaces
  • Populates each module/workspace/package/file as it is expanded
  • Creates test entries for the current file, and package/module parents
  • Runs tests!

What this does not:

  • Debug tests
  • Handle stretchr suites

Issues:

  • Handling of benchmarks isn't great. But I'm not sure it can get much
    better without changes to go test.
  • If a test has subtests, I add those subtests. This can get annoying if
    you have a bunch of subtests. Should this be configurable? Disabling
    testing.followRunningTest can improve this UX.

Fixes #1579

@google-cla
Copy link

google-cla bot commented Jun 25, 2021

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@google-cla google-cla bot added the cla: no Used by googlebot to label PRs as having an invalid CLA. The text of this label should not change. label Jun 25, 2021
@firelizzard18
Copy link
Contributor Author

@googlebot I signed it!

@google-cla google-cla bot added cla: yes Used by googlebot to label PRs as having a valid CLA. The text of this label should not change. and removed cla: no Used by googlebot to label PRs as having an invalid CLA. The text of this label should not change. labels Jun 25, 2021
@gopherbot
Copy link
Collaborator

This PR (HEAD: ccb25a9) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/vscode-go/+/330809 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link
Collaborator

Message from Go Bot:

Patch Set 1:

Congratulations on opening your first change. Thank you for your contribution!

Next steps:
A maintainer will review your change and provide feedback. See
https://golang.org/doc/contribute.html#review for more info and tips to get your
patch through code review.

Most changes in the Go project go through a few rounds of revision. This can be
surprising to people new to the project. The careful, iterative review process
is our way of helping mentor contributors and ensuring that their contributions
have a lasting impact.


Please don’t reply on this GitHub thread. Visit golang.org/cl/330809.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Collaborator

This PR (HEAD: 6cf3c3d) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/vscode-go/+/330809 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link
Collaborator

This PR (HEAD: 73f15b3) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/vscode-go/+/330809 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link
Collaborator

Message from Suzy Mueller:

Patch Set 5:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/330809.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Collaborator

Message from Ethan Reesor:

Patch Set 5:

(2 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/330809.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Collaborator

This PR (HEAD: ef064dc) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/vscode-go/+/330809 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link
Collaborator

Message from Suzy Mueller:

Patch Set 8: Run-TryBot+1


Please don’t reply on this GitHub thread. Visit golang.org/cl/330809.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Collaborator

Message from kokoro:

Patch Set 8:

Kokoro presubmit build starting for golang/vscode-go/gcp_ubuntu/presubmit
Logs at:
https://source.cloud.google.com/results/invocations/103091b8-b5ab-48a9-8a78-8c771603c6a0


Please don’t reply on this GitHub thread. Visit golang.org/cl/330809.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Collaborator

Message from kokoro:

Patch Set 8: TryBot-Result-1

Kokoro presubmit build finished with status: FAILURE
Logs at: https://source.cloud.google.com/results/invocations/103091b8-b5ab-48a9-8a78-8c771603c6a0


Please don’t reply on this GitHub thread. Visit golang.org/cl/330809.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Collaborator

This PR (HEAD: 1ee5851) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/vscode-go/+/330809 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link
Collaborator

Message from Suzy Mueller:

Patch Set 9: Run-TryBot+1


Please don’t reply on this GitHub thread. Visit golang.org/cl/330809.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Collaborator

Message from kokoro:

Patch Set 9:

Kokoro presubmit build starting for golang/vscode-go/gcp_ubuntu/presubmit
Logs at:
https://source.cloud.google.com/results/invocations/4e37bc7d-ed07-4f14-ac67-e61c38d61de4


Please don’t reply on this GitHub thread. Visit golang.org/cl/330809.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Collaborator

Message from kokoro:

Patch Set 9: TryBot-Result-1

Kokoro presubmit build finished with status: FAILURE
Logs at: https://source.cloud.google.com/results/invocations/4e37bc7d-ed07-4f14-ac67-e61c38d61de4


Please don’t reply on this GitHub thread. Visit golang.org/cl/330809.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Collaborator

Message from Ethan Reesor:

Patch Set 9:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/330809.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Collaborator

Message from Suzy Mueller:

Patch Set 9:

(7 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/330809.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Collaborator

This PR (HEAD: 77f3623) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/vscode-go/+/330809 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link
Collaborator

Message from Ethan Reesor:

Patch Set 10:

(6 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/330809.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Collaborator

This PR (HEAD: 24faa6b) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/vscode-go/+/330809 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link
Collaborator

Message from Ethan Reesor:

Patch Set 10:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/330809.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Collaborator

This PR (HEAD: ee4a140) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/vscode-go/+/330809 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link
Collaborator

Message from Ethan Reesor:

Patch Set 11:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/330809.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Collaborator

This PR (HEAD: 305f2c3) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/vscode-go/+/330809 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

gopherbot pushed a commit that referenced this pull request Aug 17, 2021
What this does:
- Implements a test provider using the new API
- Populates the test explorer with a list of modules and/or workspaces
- Populates each module/workspace/package/file as it is expanded
- Creates test entries for the current file, and package/module parents
- Runs tests!

What this does not:
- Debug tests
- Handle stretchr suites

Issues:
- Handling of benchmarks isn't great. But I'm not sure it can get much
  better without changes to `go test`.
- If a test has subtests, I add those subtests. This can get annoying if
  you have a bunch of subtests. Should this be configurable? Disabling
  `testing.followRunningTest` can improve this UX.

Fixes #1579

Change-Id: I027c7c3b615eda4c528da9739520e6bfd1aa6911
GitHub-Last-Rev: 59af29b
GitHub-Pull-Request: #1590
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/330809
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
Trust: Hyang-Ah Hana Kim <hyangah@gmail.com>
Trust: Suzy Mueller <suzmue@golang.org>
@gopherbot gopherbot closed this Aug 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Used by googlebot to label PRs as having a valid CLA. The text of this label should not change.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Testing API
3 participants