Skip to content
This repository has been archived by the owner on Dec 6, 2021. It is now read-only.

Test is not loaded in VScode Version 1.37.0 #47

Closed
adnanebrahimi opened this issue Aug 10, 2019 · 12 comments
Closed

Test is not loaded in VScode Version 1.37.0 #47

adnanebrahimi opened this issue Aug 10, 2019 · 12 comments
Assignees
Labels
bug Something isn't working

Comments

@adnanebrahimi
Copy link

The Test Explorer could not load Angular tests

  1. Install the latest version of VSCode: 1.37.0
  2. Open Angular project and wait for tests to show up in Test Explorer.

System:
Version: 1.37.0 (user setup)
Commit: 036a6b1d3ac84e5ca96a17a44e63a87971f8fcc8
Date: 2019-08-08T02:33:50.993Z
Electron: 4.2.7
Chrome: 69.0.3497.128
Node.js: 10.11.0
V8: 6.9.427.31-electron.0
OS: Windows_NT x64 10.0.18362

Console:
workbench.main.js:sourcemap:242 [Extension Host] [10:36:53 AM] ERROR: error from ng child process: Error: spawn ng ENOENT workbench.main.js:sourcemap:242 [Extension Host] [10:36:53 AM] INFO: AngularReporter closed connection with event: transport close workbench.main.js:sourcemap:242 [Extension Host] [10:36:53 AM] INFO: Angular exited succesfully workbench.main.js:sourcemap:242 [Extension Host] [10:36:53 AM] INFO: Starting Angular test enviroment for project: ui-cloud-lab workbench.main.js:sourcemap:242 [Extension Host] [10:36:53 AM] INFO: Listening to AngularReporter events on port 9999 workbench.main.js:sourcemap:242 [Extension Host] [10:37:31 AM] INFO: Test loading completed - No tests found

Thanks.

@Raagh
Copy link
Owner

Raagh commented Aug 10, 2019

Hi, thank you for downloading the extension. Unfortunately electron is not really supported. I mean it could work or it could not, I have no idea how an electron project looks like and this has never been tested in electron.

If you need me to help you with this you will have to provide for me a test project that reproduces the issue as mentioned in the bug report template.

The test explorer seems to be launching correctly so it seems very possible to make it work with electron..probably just a configuration issue or something different about electron directories that will need some extra changes to make the tests discoverable.

@Raagh Raagh changed the title Test is not loaded in VScode Version 1.37.0 Test is not loaded in VScode Version 1.37.0 in electron environment Aug 10, 2019
@Raagh Raagh added the bug Something isn't working label Aug 10, 2019
@Raagh Raagh self-assigned this Aug 10, 2019
@adnanebrahimi
Copy link
Author

Just for clarification, the VSCode made by electron, not my project. my project is based on Angular.

@Raagh
Copy link
Owner

Raagh commented Aug 10, 2019

ah okey completely misunderstood the situation. Okey lets see then there is no reason why it should not work. Do you wanna join https://gitter.im/Angular-Karma-Test-Explorer/Bugs ?
I am currently online and its gonna be a lot easier to solve the issue there. I will post the findings here afterwards

@Raagh Raagh changed the title Test is not loaded in VScode Version 1.37.0 in electron environment Test is not loaded in VScode Version 1.37.0 Aug 10, 2019
@adnanebrahimi
Copy link
Author

Ok, I will join. thanks!

@Raagh
Copy link
Owner

Raagh commented Aug 11, 2019

Since it seems we cannot match a time were we re both online at the same time I am gonna post everything here.

Is it Angular CLI project or Angular project? if Angular CLI do you have the AngularCLI installed globally?
Are you opening the folder where this project is located or are you opening one folder above it( let's say if you have a root folder with the api and the app)
What do you mean by this Version: 1.37.0 (user setup)? re you using a release version or insiders?

@adnanebrahimi
Copy link
Author

Is it Angular CLI project or Angular project? It's Angular CLI Project

if Angular CLI do you have the AngularCLI installed globally? Yes.

Are you opening the folder where this project is located or are you opening one folder above it( let's say if you have a root folder with the API and the app)? I opened the folder where this project is located

What do you mean by this Version: 1.37.0 (user setup)? This is the version of VSCode (User Installer). Vscode has two versions for installer System and User(Recommended By Vscode)

re you using a release version or insiders? Stable Released Version

@Raagh
Copy link
Owner

Raagh commented Aug 11, 2019

okey since you re here now let's go to the chat, cause really your case is the most common scenario, the one I use everyday at work. I can't see why its not working

@arthurspa
Copy link

I have the same problem.

Running VS Code 1.37.0. The tests won't list. In the "Test Explorer logs" I've got:

[14:25:16] INFO: Starting Angular test enviroment for project: app-commissioning-guide
[14:25:17] INFO: Listening to AngularReporter events on port 9999
[14:26:42] INFO: Test loading completed - No tests found
[14:29:07] INFO: Running [ suite: root ]

For me, the answers are:

Is it Angular CLI project or Angular project?
It's Angular CLI Project

If Angular CLI do you have the AngularCLI installed globally?
Globally and locally.
Locally - Angular CLI: 6.1.4
Global - Angular CLI: 6.0.8

Are you opening the folder where this project is located or are you opening one folder above it( let's say if you have a root folder with the API and the app)?
I opened the folder many levels above the angular cli project. However I set:
"angularKarmaTestExplorer.projectRootPath": "pt\\filesystems\\web_files\\lighttpd\\app\\"

What do you mean by this Version: 1.37.0 (user setup)?
This is the version of VSCode (User Installer).

Are you using a release version or insiders?
Stable Released Version

@Raagh
Copy link
Owner

Raagh commented Aug 13, 2019

Hi @arthurspa sorry that its not working from you. could you provide me with a test project were I can reproduce this bug? unfortunately I could not reproduce it neither on windows or mac, so it's very hard for me to fix something that I don't have.

The configuration seems to be correct cause the test explorer is picking the name of the project correctly. My supposition is that for some reason the completed event is returning before the tests finished loading but did not managed to reproduce this.

@arthurspa
Copy link

Hi @Raagh, now it's working. Maybe after I rebooted the PC. I remember that I had restarted VS Code many times to check if the extension would recognise my tests and it didn't.
However not the problem doesn't reproduce anymore and I have the same config as in my previous comment. The only difference is that I turned off and on the PC.

Thanks for the extension and your time, anyway.

@Raagh
Copy link
Owner

Raagh commented Aug 16, 2019

Hey @arthurspa that is good to know though very strange. If it happens again please let me know and provide me with a test project and I will make sure to reproduce it and fix it.

@arthurspa
Copy link

@Raagh , sure. Thanks!

@Raagh Raagh closed this as completed Aug 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants