really annoying...right click on the test in the output window and select 'Go to Selected test' in VS 2012 and it simply does not do anything or sometimes it just goes to the completely unrelated and wrong test.
I end up doing a global search for the name of the test
using Moq, also have resharper installed
besides that it works fine and is a useful product but can anyone help with this..?
The issue is caused by NCrunch being unable to resolve the method or property representing the test. Do you find this happens consistently for certain tests? Or is it an intermittent problem?
If you can narrow it down to a single test that causes it consistently, is there any chance you can post the declaration of the test? (content shouldn't be important unless it's dynamically generated using TestCaseSource).
If you can submit a bug report after it's happened to you, this may also help in case the issue is being caused by something going wrong inside the engine.
Hi,
this happens all the time. It is not an intermittent problem. The tests are not dynamically generated.
I have submitted a bug report just now after I went into VS and made it happen again.
I double clicked on a test in the NCrunch output window and it navigated to a completely different test, although the test was in the same file. I went to a different test in the output window and double clicked and nothing happened.
I noticed that you're still running on v1.46, which is getting quite old now. There's been many fixes in this area since 1.46 was released, so I strongly suspect you may be dealing with a resolved bug.
Would you like to try one of the later builds to see if this solves the issue? The most recent is 2.4, which just hit RTM last week.
V2.4 is a free download, and it comes with a 30 day evaluation license. I'd recommend giving it a try, as it is much more stable than any of the V1 releases and may include a fix for this problem.
I'd also recommend trying to use your existing V1 license with V2.4. If the license was bought after 2013-01-31, it should work with V2.4.
Thanks for submitting the bug report. Sadly the report didn't include anything that points directly to the problem, but it does help with the process of elimination. Let me know how you get on with V2.4, and if the problem persists, I'll try to help you from there.
Can you share any more details about the crash? Is there a specific time at which it happens? How does the crash behave? Does it throw up a big exception dialog asking if you want to debug? Do you have any other VS extensions installed or are you running on a system with limited memory?
installed update 4 to VS2012. 3.5gb download...reinstalled Ncrunch 2.4 and now it works. Original issue seems to be resolved as well
8gb memory, PowerTools, NuGet and AttachTo are the other extension I have installed
My original issue was 'inconvenient' only. Had I know I need to install new framework or need to update VS with a > 3gb download I probably would not have installed it or atleast planned the download better. As it turned out I blew most of the morning waiting for the download. Maybe if that was made clearer on the downloads page that I needed 4.5.1 or VS2012 Update 4 that would be helpful
Installing 2.4 without these installed first is not pretty
Thanks for your quick responses and help
EDIT: I looked thru the download section and as far as I can see it does not mention .NET 4.5.1 anywhere and the 'list of supported tools and frameworks.' seems to suggest the no updates are required.
Anyway, I am glad I have it installed again as it is a very useful tool
Great to hear that you got it working. I'm sorry to hear that it put you through the blender without warning.
NCrunch shouldn't normally require v4.5.1 in order to work correctly, but I am aware that there is an unintended dependency on executing code in v4.5 requiring v4.5.1, because of the task runner involved. This wasn't deliberate and will be fixed in the next minor release.
I wasn't aware of any dependency on VS2012 Update 4. As far as I know, NCrunch should work correctly without this update and was available in VS2012 well before the update was released. Most likely this was a related component or package that was failing, perhaps in response to the "devenv.exe /setup" action that the NCrunch installer performs to load itself into VS. VS stability can be a bit of a nightmare as it is a process shared by many different packages usually from many different vendors. All it takes is one package to do something a bit strange, and some very crazy things can happen. I guess we'll never know why your system was crashing, but I'm still glad the update fixed it.
FYI, I have Resharper installed as well and use the 'Unit Test Sessions' window often to run/debug tests. This has stopped working and now does not go beyond 'Pending' when attempting to run. This however may not have anything to do with NCrunch - could be todo with Update to VS but thought you might like to know
Thanks for letting me know. I'm not aware of any compatibility issue here with NCrunch. NCrunch gets tested extensively in IDEs with ReSharper loaded and there is no integration between the products. You may be able to confirm by uninstalling NCrunch to see if this makes any difference.
UPDATE: now it is doing it again. When dbl clicking on test in 'NCrunch Tests' window it goes to a different test method in the same test class.
Is there something wrong with the indexing? I am assuming it indexes the test files/methods and attempt to go to a location where the index points (made assumption on how it works).
If this is correct can I update/refresh the index?
The index is stored inside the .cache file under the _NCrunch_Solution directory.
You can try deleting this file to see if it makes any difference - although I would really like to know how it's getting messed up.
Can you share any details on how these tests are structured? Are they making use of inheritance or interesting arrangements?
I can probably reproduce+fix this problem very quickly if you're able to supply a code sample that demonstrates the problem. This could be as simple as just taking your test project, removing its references and all the code except for the test declarations causing problems, and packaging this with the .cache information intact. You're welcome to submit any code through the contact form.
sorry to reactivate this one. I have a new machine. Win7/VS2012, ncrunch 2.5.0.12 - same issue.
Still does not go to the test double click or right click and use menu. I have to manually load a seach box and type in the name of the test and let VS find the test. This really is 'annoying'....I really like what else ncrunch does but this is really fundamental to navigating to the test and is really slowing me down...is there anything else I could try?
Sorry but I'm still not sure why this issue is appearing for you. Is there any code you can share with me including a .cache file with the problem? I'm afraid it's hard to analyse the issue without being able to observe it in action.