Propagate mbunit failures

Propagate mbunit failures

It would be nice if NCover could propagate the mbunit failures so that the build would fail. Right now, you have to run mbunit twice - once for unit test failures and once for coverage.


Re: 1.5.3 exclusion bug

Can you send me a sample code file?

In my tests, the full name of the class is required to get coverage.  So the excluded name would be "TestNamespace.TestAttribute."  All of my tests worked properly with a single attribute.


Re: 1.5.3 exclusion bug

Not sure if it makes a difference, but we're having the same issues here.  Via Nant, using C#/.Net 2.0, NUnit 2.2.6.0 and NCover 1.5.3, we are unable to exclude any classes via attributes.

Via a Nant task, this doesn't seem to work:
<exec
            program="/tools/NCover/NCover.Console.exe"
            workingdir="."
            commandline="/tools/Nunit/nunit-console.exe /Tests/Tests.UnitTests/bin/Debug/UnitTests.dll /nologo //ea NUnit.Framework.TestFixtureAttribute"
        />   

we have also tried the following after the "//ea " agrument:
NUnit.Framework.TestFixture
TestFixtureAttribute
TestFixture

Further, we created an attribute named NCoverIgnoreAttribute and added that at the class level to see if the "two attribute fix" made a difference. It did not.


Re: 1.5.3 exclusion bug

I can't give you the code I have, but I'll see if I can get together a simple test case that behaves the same way.


Re: 1.5.3 exclusion bug

Why are you trying to exclude Tests with exlusion attribute feature? Why you don't use //a attribute to specify assemblies that you need to profile?

PS for me exlusion attribute works fine =)


Re: 1.5.3 exclusion bug

I am still seeing all of the excluded classes in the output XML in 1.5.3.

The coverage log indicates that it IS finding the attribute for the classes in question.

Am I misunderstanding how this is supposed to work?


Re: 1.5.3 exclusion bug

Eugene Jenihov wrote:

Why are you trying to exclude Tests with exlusion attribute feature? Why you don't use //a attribute to specify assemblies that you need to profile?

PS for me exlusion attribute works fine =)



Can't use the //a option, because the tests are in the same asembly as the code being tested.

I'm still narrowing down the case where this bug happens, as my absurdly-simple test-case works as-advertised, but the class extracted from my project and compiled on its own exhibits the bug.  As soon as I finish getting it into something I can publish, I will.


Re: 1.5.3 exclusion bug

I've got the test case now, but it's a 1.5 MB zip file, with copies of nunit and ncover included.  I can email it to someone, or see if I can put it up somewhere for download.  What would be best?


Re: 1.5.3 exclusion bug

Great.  Thanks for putting forward the effort to pull that together.  You can email it to me: peter at waldschmidt dot com.


Re: 1.5.3 exclusion bug

I can't seem to get this to work either in the same scenario. None of the below things actually excluded the tests in the assembly. (I know we should split tests out into a different assembly, and we are doing that an assembly at a time.)

ncover.console //ea Test;TestFixture //a Base nunit-console Base.dll

ncover.console //ea NUnit.Framework.TestAttribute;NUnit.Framework.TestFixtureAttribute //a Base nunit-console Base.dll

ncover.console //ea NUnit.Framework.Test;NUnit.Framework.TestFixture //a Base nunit-console Base.dll


Re: 1.5.3 exclusion bug

Have you tried 1.5.4?  It should fix your problem.


Re: How to filter the internal or private methods and properties

Currently NCover does not filter on private/protected/public/internal.  I've put this down as a feature request.


Re: NCover Explorer bug

The error is from it trying to automatically display the report after generation. To not see the error just uncheck the checkbox that says to display after generation.

As for why it occurs, the line of code being executed is just shelling the filename of the report to let whatever default application you have registered for that filetype display it. So for instance you can replicate this by doing in a test app:

Process.Start("C:\SomeXmlDocument.xml")

or

Process.Start("C:\SomeHtmlDocument.html")

I would assume you have screwed up file associations in the registry for whatever report type you are generating (xml or html).


Re: NCover Explorer bug

Thanks Grant for your reply.

I added NCover and NUnit settings in the PATH variable and the problem seems to be gone.

May be.. I have Maxthon browser as well IE because of which that error was getting generated.

 

Cheers!

Srinu

 

 


Re: HTML reports to view source

Hi Greg,

It's on the list for a future release, not possible currently. It's a non-trivial amount of work with all the html/stylesheet development...