-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for running without VSIX #21
Comments
This might be related to issue #5.... Anyway, thanks for offering help! What kind of guidance do you need? |
I'm a bit shy when it comes to C#, so I'm not sure how to capture the point where vtest.console is querying supported interfaces, to catch what is is missing. I'll find someone proficient in my team, and then maybe I'll have some questions about specific VSTEST interfaces. I will try to see if the Nunit Guys can point at what they do to achieve VSIX independence, since it's promoted as a feature. |
Sounds good to me! @jgefele has already briefly looked into #5 - he will add his knowledge to this bug later today. As a side note (and in case you haven't seen): The project Wiki contains a couple of links to sources of information - there's no official VS test framework documentation, but a couple of blog entries, the most important of which we have linked there. |
Hi, this has been on my list for the next release, but it seems that issue #5 has magically been fixed :-) This does work now:
And I just found that there seems to be just a tiny bit missing. The following works...
... if and only if I rename @sirotnikov: Could you please try if this file rename makes your .runsettings approach work, too? If that's the case, all that is left would be a nice nuget package to simplify deployment. Fingers crossed, |
Hi! It seems that the issue is a different bug which makes GoogleTestAdapter not find any tests to run when run under a When I run it from VisualStudio, it somehow works with So technically bug closed, but should investigate a new bug. Also, could you enlighten me as to why file name magic works? I assume it has to do with assumptions dotnet does about filenames and assemblies and such? |
Hi @sirotnikov, I reorganized the project structure so that the relevant .dll is named *.TestAdapter.dll Please give this build a try and let me know if it works for you. I suggest to use this issue for the whole use-case: "Use GoogleTestAdapter from vstest.console.exe" instead of opening and closing new issues all the time. Regarding "file name magic": I don't think this is dotnet-related but rather specific to vstest.console.exe. Visual Studio knows in which DLL to look from the UnitTestExtension Asset in the source.extension.vsixmanifest. Unfortunately, all this is not documented at all. Luckily, I noticed that other test adapters have their DLLs named in that format and just gave it a try... Cheers, |
Hi, Sadly, still no dice with the x64 flag. No tests are found, in VS or vstest.console.exe It does work with GoogleTestRunner though, after I renamed their dll as you suggested. |
Hmmm. Maybe it was just some strange coincidence that it worked for me yesterday. I didn't test it in a clean environment. And as I said, I didn't even intend to fix it (yet). It just seemed to work suddenly. But let's make sure we're trying the same things: can you try it with a 64-debug build of the "SampleTests" project? Could you also send me your exact command line, the .runsettings, and if you're using VS 2013 or 2015? Thanks, |
I'm using VS 2015 sp1, latest SDK and WDK. I don't get any tests when running against a 64 debug build of *=SampleTests either. I decided stepping through the code of GoogleTestAdapter, as it is configured in the debug settings of the TestAdapter project.
Apparently it's actually ran by a child process, so after getting "debug child processes" to work, I successfully stepped through when it was However when ran with This does not happen to GoogleTestRunner |
Could you try it yourself on the x64 Tests build?
Maybe it's an issue with my machine? |
I can confirm your observation. Probably it worked for me only once due to cosmic rays. I'm in exactly the same situation for I don't know what's different with GoogleTestRunner. They don't seem to do anything special for 64-bit. |
I tried running I did manage to see messages in the debug window showing that GoogleTestAdapter was acccessed several times by CLR to load and construct its classes. Then somewhere an exception in Sadly, I don't know enough about CLR implementation to properly capture more information, and don't have symbols for vstest Is there anyone from the VS team who could help? It's conceivable that the issue is not with GTA but rather we're exposing a specific bug in |
In fact, Jonas might have an idea on what's going on... Stay tuned! |
It's not what I thought it was yesterday. It's assembly version hell again. Similar to the DIA issues we had before. We reference the Microsoft.VisualStudio.Test* assemblies of Visual Studio 2013 to build one binary for Visual Studio 2013 and 2015. We thought they are the common ground for later versions, but it seems that no upward compatibility is guaranteed. This has worked well for Visual Studio 2015 without SP (so no cosmic rays - I just had a non-updated VS at home and an updated VS at work). For some reasons this also works for VS 2015 SP1 with 32-bit tests, but not for 64-bit. Long story short: in branch This intensifies the already existing need for a solution to dynamically reference the correct assemblies depending on the VS version we're running in (or have separate builds for each version - a solution I would like to avoid). |
Oh wow, that's crappy. This has made me realize I should probably save a couple of versions of the plugin to see which one works on the build controller. It'll take me a couple of days to test. Thanks for the build. |
Forgot to update that the alternate binaries worked fine with VS2015 sp1, Current known ways to run without installing VSIX:
It should also work when the binaries are placed in a subfolder in the packages directory in the solution directory. However I couldn't get this to work when I tested on TFS - I'm guessing either because I didn't have a meaningful name ("GoogleTestAdapter") or perhaps this is only searched if the project has a pacakage reference. I'm on leave from work, for exams, so I won't be able to thoroughly test |
So is there any solution to the issue of referenced assemblies? |
As far as I'm concerned this can be closed as solved, and the assemblies issue should have its own feature. |
Version 0.9.0 should (finally) work fine with x64 executables. Note that since V0.8.0 we also provide a NuGet package. |
Nunit Test Adapter can be called by vstest.console.exe either via the
/TestAdapterPath
switch or by pointing to their dll's in the .runsetttings file :This allows running NUnit tests like regular MSTests without customizing the TFS server configuration and uploading the test adapter to the TFS controller.
GoogleTestAdapter is for some reason not correctly recognized as an adapter when supplied like that, and thus can't be called from TFS without writing custom scripts, to call it correctly, and then publish the test results (as well as coverage info).
I'd be willing to help research and patch it, if you're willing to spare some time for guidance.
The text was updated successfully, but these errors were encountered: