Skip to content
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

Cannot run navigation tests under the console runner #138

Closed
CharliePoole opened this issue Mar 22, 2016 · 9 comments
Closed

Cannot run navigation tests under the console runner #138

CharliePoole opened this issue Mar 22, 2016 · 9 comments

Comments

@CharliePoole
Copy link
Contributor

The way that the adapter gets navigation info is to create a Diasession object. This is part of the VS object model and requires loading other assemblies that are not present when we are running the tests under the console runner, either locally or on AppVeyor. As a workaround, we can exclude the "Navigation" category.

Ideally, we would figure out where the tests are located in the adapter or the test engine. As is now the case, the info will only be available if debug information is provided in a .pdb file.

@MSK61
Copy link
Contributor

MSK61 commented May 31, 2016

This's in response to @CharliePoole's comment here #171 (comment). You're already hard referencing VS test object model in the adapter project, and you're providing its assembly Microsoft.VisualStudio.TestPlatform.ObjectModel through a package from NUnit MyGet Feed. The package however contains the assembly from VS2012 without the other needed helper assemblies. Running navigation tests inside a different(newer) version of visual studio will still not be possible if visual studio 2012 isn't installed on the same machine.

As you can see in the now obsolete #163 I could confirm that msdia110typelib_clr0200(also coming from VS2012), one of the missing assemblies, is needed. So as a first step you can either include msdia110typelib_clr0200 in the Microsoft.VisualStudio.TestPlatform.ObjectModel package in NUnit MyGet Feed, or create a separate package for it. After all I still see the idea of budnling the needed assemblies in a package a viable idea, just if all relevant assemblies are appropriately included in the package.

@CharliePoole
Copy link
Contributor Author

@rprouse You created the ObjectModel package - what do you think of @MSK61 's idea?

@rprouse
Copy link
Member

rprouse commented May 31, 2016

As far as I remember, the ObjectModel package is only for building and testing without VS 2012 installed. As long as we are not including the extra packages (or ObjectModel) in the VSIX or NuGet, then I don't see a problem with the idea. A quick test would be to try it out with a new ObjectModel nuget package with a preview prefix and test it. If it works, we switch, if not, we don't merge the PR that uses it.

@MSK61 are you interested in doing the leg work?

@MSK61
Copy link
Contributor

MSK61 commented May 31, 2016

Yes, I'm ready to help with testing the new package. After all this work will save other people from the hassle of getting these tests to run under different visual studio versions. Just notify me here when there's a new package and I'll begin testing it.

@CharliePoole
Copy link
Contributor Author

Another way around this is to replace use of DiaSession with Mono.Cecil.

The engine is already using Mono.Cecil, and the dll is already present in the adapter package.

I got this idea from here: fixie/fixie#85 and have been talking to the guy who posted the code.

I think I will spike this.

@MSK61
Copy link
Contributor

MSK61 commented Jun 2, 2016

@CharliePoole Feel free to notify me if you craft something and want to test it; I can give a hand with assessing its fitness as a substitute.

@CharliePoole
Copy link
Contributor Author

@MSK61 Thanks... I will do that.

@CharliePoole CharliePoole modified the milestones: 3.4, Backlog Jun 4, 2016
@CharliePoole
Copy link
Contributor Author

Fixed as a result of #183

@jnm2
Copy link
Contributor

jnm2 commented Mar 13, 2018

Update: see #450 (comment) for new rationale.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants