hbenl / vscode-jasmine-test-adapter

Jasmine Test Adapter for the VS Code Test Explorer
MIT License
20 stars 20 forks source link

command 'test-explorer.run-all' not found #4

Closed bremner closed 6 years ago

bremner commented 6 years ago

Perhaps I'm missing a mandatory configuration step, but:

1) I have installed Test Explorer 0.4.1 and Jasmine Test Explorer 0.5.1 2) The icon shows up, and the test view starts, but when I click, e.g. "play", I get the error message in the subject.

hbenl commented 6 years ago

That is very weird. The error message indicates that the Test Explorer extension hasn't been initialized (otherwise the command would be found), but the "play" icon wouldn't be there if the extension wasn't initialized... in other words: no matter how you configured it, this should not happen. I can't reproduce this (and can't think of how this is even possible), so I can only advise to experiment some more, possibly with a fresh install of VS Code with no other extensions.

bremner commented 6 years ago

Holger Benl notifications@github.com writes:

That is very weird. The error message indicates that the Test Explorer extension hasn't been initialized (otherwise the command would be found), but the "play" icon wouldn't be there if the extension wasn't initialized... in other words: no matter how you configured it, this should not happen. I can't reproduce this (and can't think of how this is even possible), so I can only advise to experiment some more, possibly with a fresh install of VS Code with no other extensions.

I did try re-installing vscode (via .deb on Debian stable) and blowing away all of my vscode configuration.

There seems to be a (small?) difference between running the official build "code" and my own build of "code-oss". In "code", I don't get the notification for the missing command, but I also don't get any output from e.g. a failing jasmine test.

In both cases I'm running 1.24.1 of vscode (git commit 24f626).

In "code" it didn't seem to make a difference whether I install the extensions from the marketplace or from my own self built .vsix files.

hbenl commented 6 years ago

[...] but I also don't get any output from e.g. a failing jasmine test.

So does that mean that the Test Explorer stays empty (i.e. the extension doesn't show the list of tests)?

Anyway I'll be adding a logging facility to this extension soon, that may help tracking down this issue.

bremner commented 6 years ago

Holger Benl notifications@github.com writes:

[...] but I also don't get any output from e.g. a failing jasmine test.

So does that mean that the Test Explorer stays empty (i.e. the extension doesn't show the list of tests)?

Correct.

Anyway I'll be adding a logging facility to this extension soon, that may help tracking down this issue.

Sounds good.

alimbada commented 6 years ago

I think I have a similar issue. I have installed the extension and restarted VSCode, but my tests are not detected, i.e. the Test Explorer view is empty. However, I do not have any errors when clicking the play button.

I'm using the official VSCode build on Windows.

hbenl commented 6 years ago

The extension now forwards the jasmine console output to a VS Code output channel (this feature isn't documented yet): Have a look at the Output panel at the bottom of VS Code. After trying to load the tests, the dropdown should offer a channel "Jasmine Tests", which may help understanding why the tests aren't loaded.

alimbada commented 6 years ago

@hbenl I've updated the extension, but I'm not seeing the a "Jasmine Tests" output channel.

hbenl commented 6 years ago

@alimbada The output channel only shows up after you have switched to the Test view. screenshot_2018-07-09_18-19-23

hbenl commented 6 years ago

If it doesn't show up even after switching to the Test view, it could mean that the adapter

If you can run your tests by calling "jasmine" on the command line in your project folder, then that should rule out the first 3 possibilities. In that case, try setting jasmineExplorer.nodePath to null and see if that makes any difference.

alimbada commented 6 years ago

Currently I am using karma to run the tests outside of VS so I don't have a jasmine.config file. I only have karma config files. I'm guessing that's the issue.

hbenl commented 6 years ago

I don't have a jasmine.config file. I only have karma config files. I'm guessing that's the issue.

Yes, that explains it.

bremner commented 6 years ago

Holger Benl notifications@github.com writes:

Closed #4.

I do have a jasmine config and jasmine works fine from the command line.

hbenl commented 6 years ago

@bremner I've just published a new version that contains options for diagnostic logging (described in the Troubleshooting section), please try again with that version and attach the logs.

bremner commented 6 years ago

Holger Benl notifications@github.com writes:

@bremner I've just published a new version that contains options for diagnostic logging (described in the Troubleshooting section), please try again with that version and attach the logs.

Apologies for the long delay.

I feel like I must be missing something fundamental. I set the config for the log file (which autocompleted in the config editor, so I guess were known) but I don't see an output file. Similarly, I don't see a "Jasmine Explorer Log" if I set that config to true.

hbenl commented 6 years ago

That sounds like the extensions are still not getting activated. Have a look at the output channel "Log (Extension Host)", after opening the Test View it should show something like this: screenshot_2018-07-22_13-22-52

bremner commented 6 years ago

Holger Benl notifications@github.com writes:

That sounds like the extensions are still not getting activated. Have a look at the output channel "Log (Extension Host)", after opening the Test View it should show something like this: screenshot_2018-07-22_13-22-52

It looks like you are correct. I have attached the extension host log

hbenl commented 6 years ago

I have attached the extension host log

I can't find it, I guess Github doesn't support Email attachments.

bremner commented 6 years ago

A pity about email attachements. Here it is.

exthost1.log

hbenl commented 6 years ago

That's what I expected: the extensions don't get started, something seems to be wrong with your installation of VS Code (although I have no idea what that could be).