Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

NCrunch doesn't recognise new tests
Rea Valley Software
#1 Posted : Wednesday, January 28, 2015 4:42:33 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 1/8/2015(UTC)
Posts: 2

Every time I add a new class with NUnit tests in it NCrunch doesn't detect the new tests and the only thing I can do is restart visual studio to get the tests recognised.

I have tried:

1. clearing the .cache file
2. Reload and rebuild selected component.

I am also having issues with NCrunch failing to build when visual studio builds fine and only the same solution works, restart visual studio.
Remco
#2 Posted : Wednesday, January 28, 2015 10:04:26 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,976

Thanks: 931 times
Was thanked: 1257 time(s) in 1170 post(s)
Hi, thanks for sharing this issue.

If you create a new solution with a single test project and a dummy test, do you experience the same issue?

What is the nature of the build failure you experience under NCrunch?
Rea Valley Software
#3 Posted : Thursday, January 29, 2015 4:47:05 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 1/8/2015(UTC)
Posts: 2

Thanks for you response.

Works fine in a brand new project. It seems to be happening in more than one of my projects and it happens when I add a new test class I am not sure at what point it started happening in these projects however.

With regard to the build issues I add a new class to a class library and make it a dependency of an existing class - at this point my solution builds but NCrunch reports that it is not building and the only way I can get it to build is to restart.

I have tried creating a new project and everything seems fine , I am using Castle Windsor in the projects where it fails so perhaps there is an issue there?

I can post the code form the offending projects so I will try to replicate the issue in a new project and then I can post it?
Remco
#4 Posted : Thursday, January 29, 2015 9:24:19 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,976

Thanks: 931 times
Was thanked: 1257 time(s) in 1170 post(s)
Rea Valley Software;6888 wrote:

With regard to the build issues I add a new class to a class library and make it a dependency of an existing class - at this point my solution builds but NCrunch reports that it is not building and the only way I can get it to build is to restart.


What sort of errors does NCrunch give you when it falsely fails to build? Is it complaining about missing classes?

Rea Valley Software;6888 wrote:

I have tried creating a new project and everything seems fine , I am using Castle Windsor in the projects where it fails so perhaps there is an issue there?


Castle Windsor is widely used by NCrunch users - which makes this unlikely .. though until we know the cause of this issue, it's hard to rule it out entirely.

Rea Valley Software;6888 wrote:

I can post the code form the offending projects so I will try to replicate the issue in a new project and then I can post it?


If you're able to narrow this down to a code sample that can reproduce the issue and submit it through the contact form, there is a very high chance that I'll be able to provide you with a prompt fix for this issue.

Keep an eye out for absolute file path references in your codebase. Based on your description of the problem, I have a feeling there may be some absolute paths in there somewhere as these tend to cause some crazy issues.

Also - can you confirm which version of NCrunch/VS you're running?
Saikes
#5 Posted : Wednesday, February 11, 2015 7:49:37 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 2/11/2015(UTC)
Posts: 5
Location: Germany

Our Team experiences the same problems. New Tests are not recognized and we need to clean our solution rebuild it. Sometimes we need to do this more than once.

Our Setup: VS2013, ReSharper, WebEssentials, CodeContracts.

PS: Sometimes even restarting Visual Studio does not solve this problem. Some of us are experiencing this problem since version 2.11
Remco
#6 Posted : Wednesday, February 11, 2015 8:09:35 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,976

Thanks: 931 times
Was thanked: 1257 time(s) in 1170 post(s)
Hi Saikes,

Can you provide any more information that might help to narrow this down? Do you experience this consistently? Does it seem to be solution specific? Does an engine reset allow it to find the tests?
Saikes
#7 Posted : Wednesday, February 11, 2015 9:02:22 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 2/11/2015(UTC)
Posts: 5
Location: Germany

We experience this consistently, seems to be every test we use. After the update to 2.13 it seemed fixed, but it worked half a day and then everything was like it used to be.
Engine reset does not help.
Remco
#8 Posted : Wednesday, February 11, 2015 9:27:21 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,976

Thanks: 931 times
Was thanked: 1257 time(s) in 1170 post(s)
I strongly suspect that this is related to the structure of your solution. I'm sorry but I'll need to bombard you with some questions to try and better narrow down where and why this is happening. Please answer as best as you can as this will help to identify the issue quickly:

- Which test framework are you using?
- Are you using distributed processing?
- What happens if you change the 'framework utilisation type' (solution level configuration setting) for the framework you are using? Does this consistently affect the problem in any way?
- Do you experience this problem on a fresh new solution/project?
- What happens if you change the 'Engine hosting strategy' global configuration setting to 'HostInsideIDE'?
- If you click the 'Show all warnings' option on the NCrunch tests window with your normal solution open, do you receive any warnings from the engine?
- When the problem happens, what are the steps that usually make it go away? Does rebuilding and cleaning your solution inside VS have any affect (without restarting the IDE)?
- Have you noticed any other abnormalities in the data NCrunch is reporting? For example, missing or incorrect code coverage data, inconsistent/intermittent test results and build errors, etc.
Saikes
#9 Posted : Friday, February 27, 2015 12:43:54 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 2/11/2015(UTC)
Posts: 5
Location: Germany

Sorry for this late answer, I was ill last week.

- Which test framework are you using? MSTest
- Are you using distributed processing? No
- What happens if you change the 'framework utilisation type' (solution level configuration setting) for the framework you are using? Does this consistently affect the problem in any way? It does nothing.
- Do you experience this problem on a fresh new solution/project? Yes
- What happens if you change the 'Engine hosting strategy' global configuration setting to 'HostInsideIDE'? Where do I find this option.
- If you click the 'Show all warnings' option on the NCrunch tests window with your normal solution open, do you receive any warnings from the engine? I do not receive any warnings
- When the problem happens, what are the steps that usually make it go away? Does rebuilding and cleaning your solution inside VS have any affect (without restarting the IDE)? Cleaning and Rebuilding sometimes solves the Problem. But only till the next change in our code
- Have you noticed any other abnormalities in the data NCrunch is reporting? For example, missing or incorrect code coverage data, inconsistent/intermittent test results and build errors, etc.
Missing Coverage data, incorrect code coverage data, fixed tests are shown as broken
Remco
#10 Posted : Friday, February 27, 2015 9:58:47 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,976

Thanks: 931 times
Was thanked: 1257 time(s) in 1170 post(s)
Thanks for sharing these extra details. This problem fits the description of a synchronisation issue between the code in the IDE and NCrunch's in-memory model.

Are you running any other 3rd party packages? Can you confirm which source files you are working in when you see these problems? (i.e. .cs files?)

The 'Engine hosting strategy' configuration option is inside your NCrunch configuration, in the Global Settings area. Try changing this to see if it makes any difference.

Can you submit a bug report after you've noticed strange things starting to happen?
Saikes
#11 Posted : Wednesday, March 11, 2015 1:36:55 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 2/11/2015(UTC)
Posts: 5
Location: Germany

I'll run several 3rd Party packages:
- Resharper 9
- WebEssentials
- Chutzpah
- CodeContracts
- JSLint

We only test our .cs files, so it obviously happens there.
Engine Hosting strategy changes nothing.

Should I reference this thread for the bug Report? Because I believe, that those Information could be helpful.
Remco
#12 Posted : Wednesday, March 11, 2015 9:30:56 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,976

Thanks: 931 times
Was thanked: 1257 time(s) in 1170 post(s)
Thanks for the bug report and the extra details.

I'm wondering if you could confirm something for me. Do any of the projects in your solution have their output assemblies installed in the GAC? For example, for sharepoint integration testing?
Saikes
#13 Posted : Monday, March 16, 2015 1:43:15 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 2/11/2015(UTC)
Posts: 5
Location: Germany

There are no files in GAC for tests.
Remco
#14 Posted : Monday, March 16, 2015 9:53:30 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,976

Thanks: 931 times
Was thanked: 1257 time(s) in 1170 post(s)
Thanks. The next time this starts desynchronising for you, I'm wondering if you would be able to check the following:

- Can you right click on the project that is desynchronised (in the NCrunch Tests Window), then go to Advanced->Browse to workspace. This will allow you to inspect the workspace NCrunch has created for the project. Look for the source files inside this workspace and open them up in a text editor. Is the source code here correctly synchronised with what you are seeing inside VS?

- Can you submit a bug report after the desync starts to happen? The bug report you sent earlier was very useful, though it looked like the engine was working correctly at this point in time.

- After doing the above, can you try closing and re-opening the editor window containing the code that is desynced? Does this temporarily make the problem go away?
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.088 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download