mmanela / chutzpah

Chutzpah is an open source JavaScript test runner which enables you to run unit tests using QUnit, Jasmine, Mocha and TypeScript.
http://mmanela.github.io/chutzpah/
Apache License 2.0
550 stars 142 forks source link

Test Context Menu 2022 gives error 0x8000000A #830

Open Joentje71 opened 1 year ago

Joentje71 commented 1 year ago

When trying to "Run JS Tests" or "Open in browser" or "Run Chutzpah with" (both options) we get the following error: The data necessary to complete this operation is not yet available. (Exception from HRESULT: 0x8000000A)

Running tests with the test explorer extension works. Running tests with the context menu extension does NOT work.

Visual Studio 2022: version 17.7.3 (or 17.7.2 or...) Chutzpah Test Explorer Context Menu 2022: version 4.4.12 (there's no newer version available in vs2022)

What could be the problem?

We DO get error messages in the Tests Output window, but I think we've had those errors since a long time. Besides, discovery just works. And it's not the test explorer that is the problem.

========== Starting test discovery ========== Test project xx does not reference any .NET NuGet adapter. Test discovery or execution might not work for this project. It's recommended to reference NuGet test adapters in each test project in the solution.

Error: System.InvalidOperationException: Process must exit before requested information can be determined. at System.Diagnostics.Process.EnsureState(State state) at System.Diagnostics.Process.get_ExitCode() at Chutzpah.ProcessHelper.RunExecutableAndProcessOutput(String exePath, String arguments, Func2 streamProcessor, Int32 streamTimeout, IDictionary2 environmentVars) at Chutzpah.NodeTestExecutionProvider.Execute(TestOptions testOptions, TestContext testContext, TestExecutionMode testExecutionMode, ITestMethodRunnerCallback callback) at Chutzpah.TestRunner.InvokeTestRunner(TestOptions options, TestContext testContext, TestExecutionMode testExecutionMode, ITestMethodRunnerCallback callback) at Chutzpah.TestRunner.<>c__DisplayClass39_0.b__0(TestContext testContext) While Running:d:\xx\xx.spec.js

supremedictator commented 1 year ago

I am also see this same problem with the Context Menu.

adamwinski commented 1 year ago

Same issue

trusjoa commented 1 year ago

The same issue

jmwolfe commented 1 year ago

Me too. Good to know I can shift to use the Test Explorer for awhile. I also tried v 4.4.13 (available in GitHub but not VS Marketplace) and it has the same issue. Until it's fixed (I really don't want to go back and install VS2019) I provided my team with a quick batch script that lets them run chutzpah at the command line by just providing the path to the file.

adamwinski commented 1 year ago

I found a workaround by installing chutzpah nuget package. After installation, it's working again.

jmwolfe commented 1 year ago

Thank you - @adamwinski! I reinstalled 4.4.13 and now the extension is working. I tried it with many versions from 4.0 up and they all worked. Seems best solution is to install the extension first, and then install the nuget package, not the other way around.