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

Don't suggest documenting exceptions in unit test code #12

Open
RSuter opened this Issue Dec 2, 2015 · 16 comments

Comments

Projects
None yet
5 participants
@RSuter
Member

RSuter commented Dec 2, 2015

I'd like to tell Exceptional to disable processing on any classes that have the [NUnit.Framework.TestFixture] attribute.

https://exceptional.codeplex.com/workitem/11006

@RSuter RSuter added the enhancement label Dec 3, 2015

@jongleur1983

This comment has been minimized.

Show comment
Hide comment
@jongleur1983

jongleur1983 Aug 18, 2016

Stumbled over the same problem with XUnit, so probably it would be good to ignore classes and/or methods configurable by e.g.

  • name pattern,
  • existing attributes (like [NUnit.Framework.TestFixture], [XUnit.FactAttribute] etc,)
  • project (to excluce test projects)

For test code the "ignore attributed methods" could be collected in presets ("ignore XUnit test code", "ignore NUnit test code", ...)

jongleur1983 commented Aug 18, 2016

Stumbled over the same problem with XUnit, so probably it would be good to ignore classes and/or methods configurable by e.g.

  • name pattern,
  • existing attributes (like [NUnit.Framework.TestFixture], [XUnit.FactAttribute] etc,)
  • project (to excluce test projects)

For test code the "ignore attributed methods" could be collected in presets ("ignore XUnit test code", "ignore NUnit test code", ...)

@Lechus

This comment has been minimized.

Show comment
Hide comment
@Lechus

Lechus Sep 1, 2016

2016-09 still issue not fixed?

Lechus commented Sep 1, 2016

2016-09 still issue not fixed?

@jongleur1983

This comment has been minimized.

Show comment
Hide comment
@jongleur1983

jongleur1983 Sep 4, 2016

@Lechus feel free to work on it, or try to contribute in useful way at least, instead of complaining about time others do not spend enough in your eyes.

jongleur1983 commented Sep 4, 2016

@Lechus feel free to work on it, or try to contribute in useful way at least, instead of complaining about time others do not spend enough in your eyes.

@RSuter

This comment has been minimized.

Show comment
Hide comment
@RSuter

RSuter Sep 4, 2016

Member

I will accept PRs but I currently do not have the time to work on this project directly...

Member

RSuter commented Sep 4, 2016

I will accept PRs but I currently do not have the time to work on this project directly...

@jongleur1983

This comment has been minimized.

Show comment
Hide comment
@jongleur1983

jongleur1983 Sep 5, 2016

@RSuter still struggling with project structure/debugging/different ReSharper versions, but quite interested in the project. Once I solve my issues with how to smoothly work on it, I think about getting a core contributor (if you like)

jongleur1983 commented Sep 5, 2016

@RSuter still struggling with project structure/debugging/different ReSharper versions, but quite interested in the project. Once I solve my issues with how to smoothly work on it, I think about getting a core contributor (if you like)

@RSuter

This comment has been minimized.

Show comment
Hide comment
@RSuter

RSuter Sep 5, 2016

Member

I don't know if there is a good debugging story with the latest ReSharper, maybe @citizenmatt knows more?

Member

RSuter commented Sep 5, 2016

I don't know if there is a good debugging story with the latest ReSharper, maybe @citizenmatt knows more?

@jongleur1983

This comment has been minimized.

Show comment
Hide comment
@jongleur1983

jongleur1983 Sep 5, 2016

I asked @citizenmatt about it on Twitter already, which solved my issues up to a certain point (trying to debug Exceptional with ReSharper 2016.2), now I get it started and installed in a test instance, but it doesn't show up anywhere yet.
Before I used the quite outdated ReSharper API documentation that still referred to a devenv command line switch to use the extension to debug.

jongleur1983 commented Sep 5, 2016

I asked @citizenmatt about it on Twitter already, which solved my issues up to a certain point (trying to debug Exceptional with ReSharper 2016.2), now I get it started and installed in a test instance, but it doesn't show up anywhere yet.
Before I used the quite outdated ReSharper API documentation that still referred to a devenv command line switch to use the extension to debug.

@citizenmatt

This comment has been minimized.

Show comment
Hide comment
@citizenmatt

citizenmatt Sep 6, 2016

This is the page, that explains how to get debugging working. It's up to date, and has links to other sections such as creating the test instance and installing ReSharper there.

Once you've got a test instance set up with ReSharper installed, you can just install your extension from a local folder, and you're set up to debug. Either attach the debugger, or launch VS directly in the debugger, passing in the name of the test instance. You can also simply copy your .dll to the installation folder, too, to make it a bit easier to build, test, edit.

If nothing is showing up, you'll want to check the troubleshooting page.

citizenmatt commented Sep 6, 2016

This is the page, that explains how to get debugging working. It's up to date, and has links to other sections such as creating the test instance and installing ReSharper there.

Once you've got a test instance set up with ReSharper installed, you can just install your extension from a local folder, and you're set up to debug. Either attach the debugger, or launch VS directly in the debugger, passing in the name of the test instance. You can also simply copy your .dll to the installation folder, too, to make it a bit easier to build, test, edit.

If nothing is showing up, you'll want to check the troubleshooting page.

@RSuter

This comment has been minimized.

Show comment
Hide comment
@RSuter

RSuter Sep 6, 2016

Member

Thanks @citizenmatt, I really miss the /ReSharper.Plugin flag which made debugging extremely simple... Now you always have to build, install, attach debugger, etc... its too time consuming to develop a R# extension.

Member

RSuter commented Sep 6, 2016

Thanks @citizenmatt, I really miss the /ReSharper.Plugin flag which made debugging extremely simple... Now you always have to build, install, attach debugger, etc... its too time consuming to develop a R# extension.

@jongleur1983

This comment has been minimized.

Show comment
Hide comment
@jongleur1983

jongleur1983 Sep 6, 2016

still no success for me unfortunately. (sorry for hijacking this thread for now).
Resharper install log contains this exception:

--- EXCEPTION #1/1 [LoggerException] Message = “The Master Assembly Binder does not know this assembly, and neither does the GAC. Reference from assembly ReSharper.Exceptional.2016.1 to assembly JetBrains.ReSharper.Feature.Services could not be resolved.” ExceptionPath = Root ClassName = JetBrains.Util.LoggerException HResult = COR_E_APPLICATION=80131600

All I could find about that sounds unreasonable as Exceptional should have worked before, so it shouldn't be necessary to add or remove some dependencies.

jongleur1983 commented Sep 6, 2016

still no success for me unfortunately. (sorry for hijacking this thread for now).
Resharper install log contains this exception:

--- EXCEPTION #1/1 [LoggerException] Message = “The Master Assembly Binder does not know this assembly, and neither does the GAC. Reference from assembly ReSharper.Exceptional.2016.1 to assembly JetBrains.ReSharper.Feature.Services could not be resolved.” ExceptionPath = Root ClassName = JetBrains.Util.LoggerException HResult = COR_E_APPLICATION=80131600

All I could find about that sounds unreasonable as Exceptional should have worked before, so it shouldn't be necessary to add or remove some dependencies.

@RSuter

This comment has been minimized.

Show comment
Hide comment
@RSuter

RSuter Sep 6, 2016

Member

did you install it via nuget?
i think you have to define your own nuget source (i.e. directory path) and install the locally compiled nuget (see .bat scripts)...

Member

RSuter commented Sep 6, 2016

did you install it via nuget?
i think you have to define your own nuget source (i.e. directory path) and install the locally compiled nuget (see .bat scripts)...

@jongleur1983

This comment has been minimized.

Show comment
Hide comment
@jongleur1983

jongleur1983 Sep 6, 2016

I didn't use a Nuget source, but a resharper plugin source (may be what you're talking about).
I may have done anything wrong when trying to create the 2016.2 package though. Starting from scratch again now stashing all changes Exceptional is not available in the plugin list (even though the Exceptional 2016.1 package is in the local package source I configured).

So I tried the following changes (and nothing else):

  • in packages.config I upgraded the package Wave from 5.0.0.0 to 6.0.0.0

  • in the nuspec file I changed the wave dependency to version="[6.0, 7.0)"

    Doing that, Exceptional occurs in the plugin list of the experimental VS instance and I can (try to) install it, but get the Exception posted earlier. What's missing?

jongleur1983 commented Sep 6, 2016

I didn't use a Nuget source, but a resharper plugin source (may be what you're talking about).
I may have done anything wrong when trying to create the 2016.2 package though. Starting from scratch again now stashing all changes Exceptional is not available in the plugin list (even though the Exceptional 2016.1 package is in the local package source I configured).

So I tried the following changes (and nothing else):

  • in packages.config I upgraded the package Wave from 5.0.0.0 to 6.0.0.0

  • in the nuspec file I changed the wave dependency to version="[6.0, 7.0)"

    Doing that, Exceptional occurs in the plugin list of the experimental VS instance and I can (try to) install it, but get the Exception posted earlier. What's missing?

@RSuter

This comment has been minimized.

Show comment
Hide comment
@RSuter

RSuter Sep 6, 2016

Member

You have to upgrade the wave version with nuget, only changing it in packages.config is not enough...

Member

RSuter commented Sep 6, 2016

You have to upgrade the wave version with nuget, only changing it in packages.config is not enough...

@RSuter

This comment has been minimized.

Show comment
Hide comment
@RSuter

RSuter Sep 6, 2016

Member

@lotosbin has a working fork with v2016.2 you can merge it from there...

Member

RSuter commented Sep 6, 2016

@lotosbin has a working fork with v2016.2 you can merge it from there...

@citizenmatt

This comment has been minimized.

Show comment
Hide comment
@citizenmatt

citizenmatt Sep 7, 2016

Yeah, update the JetBrains.ReSharper.SDK package via nuget (just changing packages.config won't work). It'll upgrade everything else, including the Wave package. Then yes, update the Wave dependency to "[6.0]" in your .nuspec.

citizenmatt commented Sep 7, 2016

Yeah, update the JetBrains.ReSharper.SDK package via nuget (just changing packages.config won't work). It'll upgrade everything else, including the Wave package. Then yes, update the Wave dependency to "[6.0]" in your .nuspec.

@Aratirn

This comment has been minimized.

Show comment
Hide comment
@Aratirn

Aratirn Mar 3, 2018

The possibility of turning the plugin off for certain projects (i.e. test assemblies) would be really interesting. Specially when testing for exceptions.

Aratirn commented Mar 3, 2018

The possibility of turning the plugin off for certain projects (i.e. test assemblies) would be really interesting. Specially when testing for exceptions.

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