Quantcast
Channel: Node.js Tools for Visual Studio
Viewing all articles
Browse latest Browse all 4630

Commented Issue: TestAdapter probablly fails when /InIsolation is used [1374]

$
0
0
Node.js Tools for VS appears to have the same problem as PTVS:
https://pytools.codeplex.com/workitem/2643

Copy pasted from there:
If vstest.console.exe is passed /InIsolation or /EnableCodeCoverage the PTVS Test Adater fails in TestExecutor.cs:RunTests from these sequence of events:
◾Due to Isolation being used the Test Adapter is running inside vstest.executionengine*.exe.
◾The execution engine gets passed a /parentProcessId argument, but that PID isn't Visual Studio.
◾VisualStudioApp.FromCommandLineArgs() returns a non-NULL instance of VisualStudioApp.
◾InterpreterOptionsServiceProvider.GetService() receives the non-NULL instance.
◾InterpreterOptionsServiceProvider.GetService calls app.DTE which returns NULL due to the parent process not being VisualStudio.
◾InterpreterOptionsServiceProvider.GetService passes in NULL to "new ServiceProvider" which throws an ArgumentNullException and the PTVS Test Adapter ends up crashing as a result.

If we avoid trying to create the "new ServiceProvider" then the Test Adapter successfully runs the Python test cases.

This is with VS2013 and PVTS 2.1 RC. The core of the problem seems to stem from FromCommandLineArgs() returning a non-null VisualStudioApp when the .DTE property will return NULL when asked.

Fyi,
Bill


Comments: I could submit a pull request for the workaround I did for the PTVS but I was informed that the simple workaround I suggested wouldn't be appropriate for them due to the Python environment information not being accessible outside of Visual Studio in isolation mode at present. (and it happens to work through sheer mocked object luck for me) I don't know if there is a similar detail I'd be missing for the Node.js variant of this bit of common looking code between these two projects. Thoughts? Bill

Viewing all articles
Browse latest Browse all 4630

Trending Articles