Build/Test Issues

Icons are showing black

Started by nikosbaxevanis on 20,870 views

Hi,

First off all, this product is really awesome. (I was about to choose between this and a similar one and I think I'm sticking with NCrunch!) :)

However, yesterday I tried to use it, so here are the steps:

- Installed NCrunch (unfortunately I don't remember which version, but I downloaded before 9 days max).
- Opened AutoFixture project in Visual Studio 2010 (this project has high test coverage with xUnit.net)

The problem was that all the icons were black everywhere in the code, like the solution didn't have any tests at all.

I chose 2 threads in the configuration (running on Dual-Core at the moment).


Hope that helps,
Hi,

Thanks for posting! Right now xUnit isn't in the list of supported test runners ... although this is set to change very soon :)

The good news is that it looks like everything else is working well for you .. if you're seeing the black markers, this means the project is building fine. So as soon as the xUnit support is there, you should be good to go on this project.

I'd probably recommend that you stick with using just one core for the background processing (if you're on a dual-core machine). This is because you'll need to keep one of your cores dedicated to keeping Visual Studio responsive - though your results here will probably depend largely on your tests/setup.


Cheers,

Remco
Thank you! Keep up the good work. You are awesome!
For anyone interested, xUnit support was introduced in the build of NCrunch released this morning (1.33b).
Hi,

I have a similar problem to nikosbaxevanis. I'm running NCrunch 1.33b and Visual Studio 2010 on an Intel Core2 Duo processor, with NUnit 2.5.10. I also have ReSharper 6 installed.

I have two different Visual Studio solutions. NCrunch works fine for the smaller one, building, showing the test results and showing the correct colour markers for the code coverage tool. NCrunch is not working for the larger solution, however. The NCrunch tests all build and run okay, showing the correct test results and picking up ignored tests. The code coverage tool is showing every line in the solution with a black marker though. This applies both for production code and test code. I've checked the NCrunch configuration settings and they're exactly the same for the two solutions. I've tried increasing the maximum number of processing threads and allowing parallel test execution, but this hasn't resolved the problem.

Thanks,

Daley
Hi Daley,

The first thing that comes to mind when I see a situation like this is that there is something about your larger solution that's causing NCrunch to throw an exception.

Would you be able to submit a bug report using the NCrunch menu after this happens to you? This can help me to figure out what is happening under the hood.

You can also try turning on the 'LogToOutputWindow' option and check the output window for logged exceptions. If the test runners are failing, there should be something getting kicked up that we can use to figure it out.


Cheers,

Remco

Edited

Hi Remco,

I've submitted a bug report detailing the problem.

Thanks for your help and your quick response,

Daley
Thanks - I just saw the report come through. Nice amount of detail :)

Can you give me a bit more information about the workings of your MakeAssertions() method? Does it use any features that are specific to NUnit 2.5? As this method doesn't use a [Test] attribute, how are you currently exposing it to the test runner?
Hi Remco,

We're using three levels of inheritance for the database test classes. The child class has a [TestFixture] attribute, the MakeAssertions() method, but no test methods marked with [Test]. The parent and grandparent classes are both abstract classes and do not have either the [TestFixture] or [Test] attributes. The abstract great-grandparent class then has a Run() method with a [Test] attribute but no [TestFixture] attribute for the class. The Run() method is therefore being called on the child class through being inherited from its great-grandparent. Through the use of delegates, this Run() method calls MakeAssertions() on the child class using different connection strings for different database providers.

The standard NUnit GUI picks up that the database test classes have a single inherited test method called Run(), but the ReSharper test runner does not. It thinks that the database test classes are empty test classes with no test methods. I've just done a test with a simple new project, where I've copied across the classes needed from the custom database testing framework. I've then added one test class using the standard NUnit format of [TestFixture] and [Test], then a second test class using the database testing framework. NCrunch picks up that the first class has test methods and updates the code coverage line markers with green. It does not think that the database test class has any tests within it though, and leaves the line markers as black.

This does not correspond with our large solution though, where NCrunch is showing every line marker as black, even those covered with standard NUnit tests. Could this be an issue with the solution size and quantity of tests, i.e. NCrunch isn't able to update the line markers quick enough in real time, so is leaving them as black?

Thanks,

Daley

Is the parent or grand-parent test class for your database framework residing in a different project/assembly to the derived class holding the [TestFixture] attribute? I've done some tinkering here and this does seem to cause NCrunch to not find the inherited test.
Yes. The parent and grandparent classes are in the same project as the child class with the [TextFixture] attribute, but the great-grandparent class with the [Test] attribute and Run() method is in a different project not within the same solution.

Thanks,

Daley
Ok - I think we've nailed this one down then. 1.33b seems to have an issue with analysing tests that inherit cross-assembly. I've implemented a fix that will be out in the next revision. Thanks for your help :)
This should now be fixed in 1.34b (released today).

Post a reply

Log in to reply.