NUnit crashes when NCover is ran with the verbose output swi
NUnit crashes when NCover is ran with the verbose output swi
When I run NCover with NUnit as its test environment then NUnit crashes when Verbose output it specified. I've tried the NUnit /Noshadow switch that I read about in another post but that didn't matter. I do not have a reason to use verbose output because NCover works as it should.
<?xml version="1.0" encoding="utf-8"?>
<ProfilerSettings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<CommandLineExe>d:\dev\Tools\NUnit\nunit-console.exe</CommandLineExe>
<CommandLineArgs>Output\bin\Exyll.dll /xml=Output\nunit-result.xml</CommandLineArgs>
<Assemblies>Exyll</Assemblies>
<LogFile>Output\Coverage.Log</LogFile>
<CoverageXml>Output\Coverage.Xml</CoverageXml>
<VerboseLog>true</VerboseLog>
<ProfileIIS>false</ProfileIIS>
<DumpOnErrorNormal>false</DumpOnErrorNormal>
<DumpOnErrorFull>false</DumpOnErrorFull>
<NoLog>false</NoLog>
</ProfilerSettings>
Re: TD mistakenly shows full coverage - NCover/NCoverExplorer do
This is a due to a difference in behaviour between the NCover versions. As of NCover 1.5.5 Peter introduced some logic to automatically exclude some unreachable code points. That is why you see the different results. TD.Net will be using NCover 1.5.6, whereas from the command line you are using 1.5.4.
Re: TD mistakenly shows full coverage - NCover/NCoverExplorer do
I did actually test using the 1.5.4 command line and the 1.5.6 (included w/ TD) command line and those showed the expected line in red.
When I ran TD from VS the expected line was not in red.
Re: TD mistakenly shows full coverage - NCover/NCoverExplorer do
When you ran NCover 1.5.6 from the command line, did you manually register coverlib.dll in the 1.5.6 folder? Otherwise it would have used the profiler registered from your 1.5.4 folder. TD.Net "temporarily" registers the 1.5.6 version on the fly using a registry trick.
Re: TD mistakenly shows full coverage - NCover/NCoverExplorer do
Ahh, I did not. Now that I do that I do get consistent results from TD and directly from the 1.5.6 command line.
So, that closing brace is then considered 'unreachable'? It's not really hit, but I can see that if there is no code after the call to foo() throws an exception, there's really not much to report. And, I did put an actual line of code after the foo() call and it was correctly marked as red, so it is reporting any real code points correctly.
It still kinda seems like we're losing a useful piece of information, the fact that we did not exit that block of code successfully. Though since it is a blank line I can see it doesn't really matter.
Thanks for clearing this up.
Re: TD mistakenly shows full coverage - NCover/NCoverExplorer do
Hi Grant,
you wrote TD is using NCover 1.5.6. Is there already a
1.5.6. available? Is it still for public use? Where can I download it?
Ciao
Thomas
Re: TD mistakenly shows full coverage - NCover/NCoverExplorer do
Hi Thomas,
Peter supplied Jamie and myself with a very early alpha version to test of NCover 1.5.6, and that is what Jamie is shipping with TestDriven.Net. The big fix it made over 1.5.5 was fixing the profiling of .Net 1.1 assemblies.
It does however still have a number of bugs and issues and hence why it was not made publicly available. Unfortunately Peter just hasn't had the time to work on NCover to address those and push an official release out.
As of Friday, Peter has kindly given me access to the source code to start working on the issues myself. To date I appear to have fixed or worked around some of the big showstoppers, such as:
- Sequence point count mismatches resulting in duplicate entries appearing in NCoverExplorer
- Blank assembly names in the output from modules that had no types loaded in them
- Types not loaded not being displayed in the coverage output for the first AppDomain loaded
- NCover locking up when it throws an exception in it's own code processing the result stream
There are two more issues I know of which I want to take a look at (but perhaps cannot fix at this point):
- If a method has >20 exception catch block statements (<=20 works fine!), NCover throws an unhandled exception
- If the application being profiled throws an unhandled exception, NCover freezes
Other changes that were made by Peter since the release given to Jamie:
- A //reg option to allow on the fly registering of coverlib.dll temporarily for the coverage run
- Merging of modules loaded in multiple AppDomains before writing out the coverage.xml.
There were a few problems with the merging which I have sorted out - the benefit now however is much smaller coverage.xml files for multiple AppDomain codebases like running under TestDriven.Net. I have also put a lot of work into the FAQ document to get it up to date for the command line options and mention using NCover with various other tools like NCoverExplorer, TestDriven.Net, CruiseControl.Net etc.
I have a "1.5.7" build which I keep updating as I address each issue. At some point very soon I will contact a few people (will include yourself if you like) to try out my beta builds and make sure I am not introducing new problems and have indeed properly resolved those issues.
I need to discuss a plan with Peter for officially releasing this provided he is happy with my changes. Personally I think it is such a dramatic improvement over it's current state that I would want to see it released very shortly even with a few known "gotchas" provided they are not showstoppers.
Re: TD mistakenly shows full coverage - NCover/NCoverExplorer do
Hi Grant,
sounds great. Forward the alpha 1.5.7. if you think its ready to take a look to it.
I've got an another issue (reported in a separate thread). NCover does
not always get the shutdown event from the profiler api and therefore
don't generate coverage results. A simple workaround for this might be
to send the coverage results to NCover when the Main method has been
completed. I've got some quite old sources and would figure out if this
may solve our problems.
Ciao
Thomas
Re: TD mistakenly shows full coverage - NCover/NCoverExplorer do
Hi Thomas,
I have found a couple of scenarios where the profiler does not get sent the coverage. They involve either unhandled exceptions being thrown by the application being profiled, or NCover itself. In your scenarios where this happens, is there any unhandled exception message output before the profiler hangs? Do you have a repro at all for the issues you experience?
I will send you a build shortly for feedback, thanks. I am still working on the two exception issues mentioned above. I believe I have found "why" the 21 exception catch block thing is failing (to do with a switch from "small" to "fat" header exception blocks in the IL which do not appear to be handled correctly). It is all new stuff to me though and very low level so it may take me a little while to nut that one through!
Re: TestDriven.net, NUnit, & NCover - Great Combo. R U getting E
What is the exception you are getting? I haven't had reports from any other NCoverExplorer users of such a problem. Email it through to me - the email address should appear on the exception dialog.
Regards,
Grant.
RE: NUnit crashes when NCover is ran with the verbose output swi
Cisco Certified Network Associate (CCNA®) validates the ability to install, configure, operate, and troubleshoot mediu rhce dumps m-size route and switched networks, including implementation and verification of connections to remote sites in a WAN. CCNA curriculum includes basic mitigation of security threscjp dumps ats, introduction to wireless networking concepts and terminology, and performance-based skills. This new curriculum also includes (but is not limited to) the u mcse braindumps se of these protocols: IP, Enhanced Interior Gateway Routing Protocol (EIGRP), Serial Line Interface Protocol Frame Relay, R ccna braindumps outing Information Protocol Version 2 (RIPv2),VLANs, Ethernet, access control lists (ACLs).
CCNA syllabus