-
Notifications
You must be signed in to change notification settings - Fork 758
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
Refactor testing support #1702
Comments
Both @suzmue and I agree that is a good change. Making the behavior consistent and consolidating them is the direction to go. What properties in TestConfig would be left? Thanks! |
I think the biggest functional change would be output handling. Instead of sending the output to a OutputChannel, I would send it to the testing console and report any errors to the TestRun if a test fails. Of course, the question of 'what is an error message' is not straight forward for I would add a I'm not sure about the rest. I'll have to look at the current code and figure out how and when they're used. I think the first step will be creating a |
Change https://golang.org/cl/343878 mentions this issue: |
@hyangah I've spent some time thinking about this. The test explorer is the only method of running tests that potentially involves invoking
1 TestRunRequest has |
CL 343878 has an initial implementation of |
Thanks for updating the issue with the details. Will take a look at the cl over the weekend. |
That's a good point. I don't know, and I hadn't thought about how that should affect refactoring. Steps 1-3 should be backwards compatible, since they only touch the test explorer, which is gated behind a check. Step 4 will be an issue if the API is not available. |
@hyangah Given Microsoft's response to microsoft/vscode#130796 (comment), it's clear that the only simple way to maintain backwards compatibility will be to limit utilization of new features. Since we can work around missing APIs, the breaking issue is declarations in I can find no evidence that Theia has any support for the testing API, nor any issues that mention it. To allow us to continue refactoring while maintaining support for Theia, one option would be creating a polyfill that emulates a subset of the testing API. I think I could get by with mostly just |
It appears that Theia will not be supporting the testing API for some time (eclipse-theia/theia#10140). In order to allow refactoring to continue, I propose we add a mock testing API/polyfill that can be loaded if the testing API is not present. That would allow us to use On the other hand, does v0.28 work with Theia, now that it requires VSCode 1.59.0 in |
This is not the first time Theia IDE is always lagging sadly. If it's possible to polyfill & mock & refactor without too much maintenance pain or bloat, that will be great. |
I think this would be feasible, since the polyfill doesn't need to do much other than create TestItems.
If you claimed the But... then you do have two different versions, and users of VSCodium and Gitpod.io may be upset that their version is missing features, even though their IDE is capable of using them. And, if we keep |
We decided not to publish in open-vsx.org ourselves yet because it involves work more than just implementing the workflow (e.g. internal process for a new product launch). I got ok'd from google cloud shell ide project (currently based on theia ide) about moving independent of theia ide's support status. I don't know how many users use this extension through other theia based editors at this moment. Sadly I see diminishing returns for developing workarounds for it. Correct me otherwise. |
Yeah, I expect the workarounds would only get more cumbersome as time goes on. |
#3523 currently includes the first item (reworking/merging |
VSCode already has commands for run/debug the test at the cursor so all that remains (after #3523) is |
This will be OBE when Go Companion's testing code is merged so I'm going to close it. |
I mentioned this in #1641. I am opening a separate issue for discussing a specific change.
I would like to refactor
goTest
,testUtil
, andgoTestExplorer
to all work together:goTest(tc: TestConfig)
intorunTests(rq: vscode.TestRunRequest, tc: TestConfig)
and remove the properties ofTestConfig
that can easily be determined from theTestRunRequest
.{test,runTest,subTest}AtCursor
andtest{CurrentFile,CurrentPackage,Workspace}
to work in terms of the test API/controller. For example,testAtCursor
would become "Find the TestItem corresponding to the cursor location" andrunTests(new vscode.TestRunRequest([testItemAtCursor]), testConfig)
.The text was updated successfully, but these errors were encountered: