//a not working in 2.1

//a not working in 2.1

My FinalBuilder project failed when I went to 2.1 from 2.04. I tracked it down to that FB uses //a to list the tested projects

The first line below works on 2.1, the second fails, it use to work on 2.04
The only difference is the //a

Any Ideas?

ncover.console.exe "C:\Program Files\MbUnit\bin\MbUnit.Cons.exe" //w D:\NightlyBuilds\Bliss_9SVN_080426_Trunk\bin\Debug //x D:\NightlyBuilds\Bliss_9SVN_080426_Trunk\NCover\Co verage.XML //h D:\NightlyBuilds\Bliss_9SVN_080426_Trunk/NCover //l Coverage.log UnitTestBlissCore.dll UnitTestSignalProcessing.dll

C:\Program Files\NCover>ncover.console.exe "C:\Program Files\MbUnit\bin\MbUnit.Cons.exe" //w D:\NightlyBuilds\Bliss_9SVN_080426_Trunk\bin\Debug //x D:\NightlyBuilds\Bliss_9SVN_080426_Trunk\NCover\Co verage.XML //h D:\NightlyBuilds\Bliss_9SVN_080426_Trunk/NCover //l Coverage.log //a "UnitTestBlissCore;UnitTestSignalProcessing"


RE: //a not working in 2.1

mertus,

could you post the first dozen or so lines from the coverage log that NCover produces when it is run with the failing command line?

Thank you, Stephen Ward


RE: //a not working in 2.1

Here is the output of the command, it could be that MBUnit is not getting the args right (The log file doesn't contain any errors but if you need it I'll send it"

Registered to Customer #: 6634 NCover Enterprise Edition (1 User)

Command: C:\Program Files\MbUnit\bin\MbUnit.Cons.exe Command Args: Working Directory: D:\NightlyBuilds\Bliss_9SVN_080426_Trunk\bin\Debug Assemblies: UnitTestBlissCore;UnitTestSignalProcessing

Program Output MbUnit 2.4.2.130 Console Application (running on .Net 2.0.0.0) Author: Jonathan de Halleux

Get the latest at http://www.mbunit.com

/assembly-path:<string>             short form /ap  Path where assembly can be loaded
/report-folder:<string>             short form /rf  Target output folder for the reports
/report-name-format:<string>        short form /rnf Format string for the report name. {0} is replaced by the date, {1} by the time.Default = mbunit-{0}{1}
/report-type:{Xml|Html|Text|Dox}    short form /rt  Report types supported: Xml, Html, Text
/show-reports[+|-]                  short form /sr  Show generated reports in a window
/transform:<string>                 short form /tr  Transform to use when generating reports
/filter-category:<string>           short form /fc  Name of the filtered category
/exclude-category:<string>          short form /ec  Name of categories to exclude
/filter-author:<string>             short form /fa  Name of the filtered author name
/filter-type:<string>               short form /ft  Name of the filtered type
/filter-namespace:<string>          short form /fn  Name of the filtered namespace
/verbose[+|-]                       short form /v   Return a lot of information or not...
/shadow-copy-files[+|-]             short form /sc  Enabled/disable shadow copying of the assemblies
@<file>                             Read response file for more options
<Files>

End Program Output

Execution Time: 00:00:01.0781250s

Coverage Html: D:\NightlyBuilds\Bliss_9SVN_080426_Trunk\NCover Coverage Xml: D:\NightlyBuilds\Bliss_9SVN_080426_Trunk\NCover\Coverage.XML Coverage Log: C:\Program Files\NCover\Coverage.log


RE: //a not working in 2.1

mertus,

The console output says that NCover is reading in the //a flag correctly. At this point, looking at the log file would be very helpful. Only the first dozen or so lines are needed, and you can post them here.

Stephen


RE: //a not working in 2.1

You had asked for the log file and I should have posted it. I assume you mean the coverage.log file Here it is.

((0x00001230) MESSAGE: Profiler Starting (0x00001230) MESSAGE: NCover Profiler 2.1.0.0 (0x00001230) EVENT: Communications link established. (0x00001230) MESSAGE: Ready for command input. (0x00001230) EVENT: Verbose Logging Disabled (0x00001230) EVENT: Logging Enabled (0x00001230) EVENT: AutoExclusion Enabled (0x00001230) MESSAGE: Monitoring Assemblies: UnitTestBlissCore;UnitTestSignalProcessing; (0x00001230) MESSAGE: Skipping System Assemblies: [SNIPPED BY ME TO AVOID 5000 charac limit]
(0x00001230) MESSAGE: Excluding Types and Methods with these Attributes: (No Exclusions Specified) (0x00001230) MESSAGE: Excluding Methods matching these patterns: (No Exclusions Specified) (0x00001230) MESSAGE: Excluding Types matching these patterns: (No Exclusions Specified) (0x00001230) MESSAGE: Excluding Files matching these patterns: (No Exclusions Specified) (0x00001230) MESSAGE: Received driver ready event. (0x00001230) MESSAGE: v2.0.50727 (0x00001230) MESSAGE: AssemblyLoadStarted ---- Assembly: 0x00163ee0; 0x00000001 (0x00001230) MESSAGE: ModuleLoadStarted ---- Module: 0x790c2000; 0x00000001 (0x00001230) MESSAGE: Failed to load symbols for module [C:\WINDOWS\assembly\GAC_32\mscorlib\2.0.0.0b77a5c561934e089\mscorlib.dll] in [C:\WINDOWS\assembly\GAC_32\mscorlib\2.0.0.0b77a5c561934e089]. (0x00001230) MESSAGE: ModuleLoadFinished ---- Module[C:\WINDOWS\assembly\GAC_32\mscorlib\2.0.0.0b77a5c561934e089\mscorlib.dll]: 0x790c2000; 0x00000001 (0x00001230) MESSAGE: ModuleAttachedToAssembly ---- Module[C:\WINDOWS\assembly\GAC_32\mscorlib\2.0.0.0b77a5c561934e089\mscorlib.dll]: 0x790c2000; 0x00000001 attached To Assembly[]: 0x00163ee0; 0x00000001 (0x00001230) MESSAGE: Assembly Identity [mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=x86]. (0x00001230) EVENT: Loaded Unmonitored Assembly [mscorlib][0x00163ee0] (0x00001230) MESSAGE: AssemblyLoadFinished ---- Assembly[mscorlib]: 0x00163ee0; 0x00000001 (0x00001230) MESSAGE: AppDomainCreationStarted ---- AppDomain: 0x7a3bc8b8; 0x00000001 (0x00001230) MESSAGE: AppDomainCreationFinished ---- AppDomain[mscorlib.dll]: 0x7a3bc8b8; 0x00000001 (0x00001230) MESSAGE: AppDomainCreationStarted ---- AppDomain: 0x00147020; 0x00000002 (0x00001230) MESSAGE: AppDomainCreationFinished ---- AppDomain[DefaultDomain]: 0x00147020; 0x00000002 (0x00001230) MESSAGE: AppDomainCreationStarted ---- AppDomain: 0x7a3bc560; 0x00000003 (0x00001230) MESSAGE: AppDomainCreationFinished ---- AppDomain[EE Shared Assembly Repository]: 0x7a3bc560; 0x00000003 (0x00001230) MESSAGE: AssemblyLoadStarted ---- Assembly: 0x00170e60; 0x00000002 (0x00001230) MESSAGE: ModuleLoadStarted ---- Module: 0x008f2c3c; 0x00000002 (0x00001230) MESSAGE: Failed to load symbols for module [C:\Program Files\MbUnit\bin\MbUnit.Cons.exe] in [C:\Program Files\MbUnit\bin]. (0x00001230) MESSAGE: ModuleLoadFinished ---- Module[C:\Program Files\MbUnit\bin\MbUnit.Cons.exe]: 0x008f2c3c; 0x00000002 (0x00001230) MESSAGE: ModuleAttachedToAssembly ---- Module[C:\Program Files\MbUnit\bin\MbUnit.Cons.exe]: 0x008f2c3c; 0x00000002 attached To Assembly[]: 0x00170e60; 0x00000002 (0x00001230) MESSAGE: Assembly Identity [MbUnit.Cons, Version=2.4.2.130, Culture=neutral, PublicKeyToken=null]. (0x00001230) EVENT: Loaded Unmonitored Assembly [MbUnit.Cons][0x00170e60] (0x00001230) MESSAGE: AssemblyLoadFinished ---- Assembly[MbUnit.Cons]: 0x00170e60; 0x00000002 (0x00001230) MESSAGE: AssemblyLoadStarted ---- Assembly: 0x00179468; 0x00000003 (0x00001230) MESSAGE: ModuleLoadStarted ---- Module: 0x008f30ec; 0x00000003 (0x00001230) MESSAGE: Failed to load symbols for module [C:\Program Files\MbUnit\bin\MbUnit.Framework.dll] in [C:\Program Files\MbUnit\bin]. (0x00001230) MESSAGE: ModuleLoadFinished ---- Module[C:\Program Files\MbUnit\bin\MbUnit.Framework.dll]: 0x008f30ec; 0x00000003 (0x00001230) MESSAGE: ModuleAttachedToAssembly ---- Module[C:\Program Files\MbUnit\bin\MbUnit.Framework.dll]: 0x008f30ec; 0x00000003 attached To Assembly[]: 0x00179468; 0x00000003 (0x00001230) MESSAGE: Assembly Identity [MbUnit.Framework, Version=2.4.2.130, Culture=neutral, PublicKeyToken=5e72ecd30bc408d5]. (0x00001230) EVENT: Loaded Unmonitored Assembly [MbUnit.Framework][0x00179468] (0x00001230) MESSAGE: AssemblyLoadFinished ---- Assembly[MbUnit.Framework]: 0x00179468; 0x00000003 (0x00001230) MESSAGE: AssemblyLoadStarted ---- Assembly: 0x00186900; 0x00000004 (0x00001230) MESSAGE: ModuleLoadStarted ---- Module: 0x7b454000; 0x00000004 (0x00001230) MESSAGE: AssemblyLoadStarted ---- Assembly: 0x00186f78; 0x00000005 (0x00001230) MESSAGE: ModuleLoadStarted ---- Module: 0x7a726000; 0x00000005


RE: //a not working in 2.1

mertus,

the //a command is being processed correctly and passed in the correct form to the profiler, and assemblies that are not included in the //a list are being excluded, so at this point it looks like there's a problem loading PDBs. Look through the coverage.log file for lines matching "Loaded symbols for module"; those lines should appear for both of the assemblies you specified. If you don't find them, look for "Failed to load symbols for module" and "Monitoring Assembly" messages related to the assemblies you specified. Or you can email the log file to support at gnoso dot com, mention this thread, and I can look for the messages.

Also, let me back up and ask what you meat when you initially said that your FinalBuilder task failed. Did it give an exception? Did it run fine but not produce coverage data?

Stephen


RE: //a not working in 2.1

I'd also like to ask whether the following portion of the first line is correct:

//l Coverage.log UnitTestBlissCore.dll UnitTestSignalProcessing.dll

initially, I assumed that you forgot the //a, but I'd like to ask if you did, and also if you forgot the semicolon that's supposed to separate the *.dll files

Stephen


RE: //a not working in 2.1

I am beginning to believe MbUnit 2.4.2.130 is broken

initially, I assumed that you forgot the //a, but I'd like to ask if you did, and also if you forgot the semicolon that's supposed to separate the *.dll files

This is an example of a command line that works. when MbUnit 2.4.2.130 is called by NCover, it comes back with

Command: C:\Program Files\MbUnit\bin\MbUnit.Cons.exe Command Args: "/verbose" "UnitTestBlissCore.dll" "UnitTestSignalProcessing.dll" Working Directory: D:\NightlyBuilds\Bliss_9SVN_080426_Trunk\bin\Debug Assemblies:

THIS WORKS even if there are no assemblies listed

Second, I passed the /verbose command line to NCover when I used the //a command line, MbUnit came back with

Command: C:\Program Files\MbUnit\bin\MbUnit.Cons.exe Command Args: "/verbose" Working Directory: D:\NightlyBuilds\Bliss_9SVN_080426_Trunk\bin\Debug Assemblies: UnitTestBlissCore;UnitTestSignalProcessing

Program Output Parsed arguments: -- Parsed Arguments Files: Assembly paths: Report folder: Report Name Format: mbunit-{0}{1} Report types: Show reports: False Filter Category: Exclude Category: Filter Author: Filter Namespace: Filter Type: Verbose: True ShadowCopyFiles: False

Start time: 4:32 PM [warning] No test assemblies to execute [info] MbUnit execution finished in 0.015625s.

So it looks as if you passed on the assemblies but MBUnit failed to read them.


RE: //a not working in 2.1

mertus,

I think you meant the two dlls - "UnitTestBlissCore" and "UnitTestSignalProcessing" to be used by MbUnit b/c they contain the tests? In that case, you probably don't want to use the //a option with them, because the //a option is NCover specific. Using the //a option tells NCover that of all the assemblies the profiled program loads, you only want coverage results on the ones you specify.

If those dlls contain your tests and you want coverage results on them only, you'll have to include them in the command line twice; once in the list after //a, and once in whatever form MbUnit expects.

Stephen


RE: //a not working in 2.1

Thanks for your effort.

Alas, this means that I cannot use Finalbuilder's built in NCover to generate coverage and I have to have it run NCover directly.

I am a little confused as who should be delivering what to whom. What exactly is the command line NCover is sending MbUint (or can you tell me how to find out). Then I can talk to the MbUnit people and FinalBuilder

Testdriven.Net produces the correct call to NCover so that it works with these DLLs (Execpt that the Branch Coverage is not reported)

Thanks

-jam


RE: //a not working in 2.1

mertus,

If you include those two dlls in the "Command Arguments" box on the "Options" tab of the NCover configuration dialog that FinalBuilder uses, and also place them in the "List of assemblies to profile" box on the "Assemblies and Attributes" tab in the same dialog, I think you'll get back the results you want.

Unfortunantly, I can't figure out how to get FinalBuilder to tell me what command line it's sending to NCover. FinalBuilder can run NCover from an NCover settings file, so you may want to try making NCover generate a settings file from the command line, and then use that settings file in your finalbuilder project.

Stephen


RE: //a not working in 2.1

Thanks, the settings is a GREAT idea because I can check in the settings files and make changes at any time without changing Finalbuilder.

I'll check it tomorrow to see if it works.