question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

3 proposals to solve the pending "tooling language must be english" problem / requirement

See original GitHub issue
  1. Check the known issues -> https://github.com/formulahendry/vscode-dotnet-test-explorer#known-issues
  2. Check for other opened or closed issue matching yours?

see #77 , #96 , #107 and maybe others.

Deleting the relevant language folder solves this issue, but it seems to be a rather blunt measure.

a comment in #310 pointed me in the right direction. Obviously the problem stems from the regex in the function “extractAssemblyPaths” in the module / file testDiscoveries.ts. This is usually the first line after the call of the command: dotnet test -t -v=q <foldername>

One solution often mentioned is using the environment variable DOTNET_CLI_UI_LANGUAGE set to “en”. This works only on all following lines, but the first line still stays in the current language of the system / powershell instance.

I also tried [System.Threading.Thread]::CurrentThread.CurrentCulture = "en" but this is ignored completely, obviously language settings are not inherited from the calling shell.

So I went with the regex. I changed the line from: const testRunLineRegex = /^Test run for (.+\.dll)/gm; to const testRunLineRegex = /^.*\"(.+\.dll)\"/gm;

and it worked as far as I can check on my german set system. I build a test solution with all kind of tests (MSTest, NUnit, xUnit) and all are found succesfully.

If this regex is used elsewhere and needs to capture the part “Test run for” for other reasons, this change will probably break something else later on.

  • So proposal 1 is to change this line, usually I would create a pull request, but I’m not familiar with TypeScript nor this project, so I’d rather not imposing something I cannot keep up with.

  • In case this is needed as it is, proposal 2: create a list of strings, in the given languages. This might expand over time, but you could adapt the regex depending on the detected language of the environment.

  • and no. 3: make a setting, where the user can enter this part “Test run for” from his language. This might be tricky as I was unable to get it to work in German, where it is called “Testlauf für” and I did not find the correct codepage to represent the “ä” umlaut.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:11 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
nohwndcommented, Sep 2, 2021

I agree that the message should be fixed, but (and please correct me if I am wrong), is this project relying on parsing the output? If so, you’d have much easier time either registering your own logger via the logging extension point, which would post the data back to VSCode via net pipes. Or using our interfacing layer to get the data programatically and posting that to your vscode via pipe.

For the pipe stuff, (and also integrating with the new test UI in vscode) you can check out this repo, where Justin does this from a powershell instance for powershell tests (powershell is also .net so the communication code is similar except for few extra [] and :😃.

https://github.com/pester/vscode-adapter

https://github.com/pester/vscode-adapter/blob/4287a281f5d8d5830ec865af06f6f7aec9a69005/Scripts/PesterInterface.ps1

For programatic integration with vstest console you can use IVSTestConsoleWrapper, see for example how stryker integrates with it to run tests on the code it mutates: https://github.com/stryker-mutator/stryker-net/blob/fff096f54c3cb469221b282b888a39d57a7e4bb5/src/Stryker.Core/Stryker.Core/TestRunners/VsTest/VsTestRunner.cs#L95

1reaction
nohwndcommented, Sep 6, 2021

Let’s just say that the number of people suggesting how we should do it is greater than working implementations in pull requests 😅

I know that feeling. Feel free to remind me in January to have another look at this. From a brief look, you would be able to benefit from the custom logger, without having a huge impact on the project architecture. The logger dll can be built against netstandard and added as an additional parameter to the test run.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Software Engineering Project Proposal - Rutgers ECE
Your proposal must be written in lay language, plain English, and you should avoid any engineering terminology (unless your problem domain ...
Read more >
DRL Proposal Submission Instructions (PSI) for Applications ...
If an original document within the application is in another language, an English translation must be provided. If any document is provided in...
Read more >
PAPPG Chapter II - National Science Foundation
The proposal must conform to the following requirements: ... refinement of research tools; computation methodologies and algorithms for problem-solving; ...
Read more >
"Just Check My Grammar" – The Writing Center • University of ...
“Checking the grammar” can feel uncomfortably close to proofreading and editing students' papers for them—which writing coaches know is strictly out of bounds....
Read more >
Strategic Plan for Language Access in the California Courts
The numbers tell the story of the access challenges facing Californians: approx- imately 40 percent of us speak a non-English language at home;...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found