Hi,

We are using MbUnit to run our unit tests as part of our CI build
process. Currently the tests are run from an MsBuild task, which
combines all the test reports into a single report file. I now need to
add code coverage to this process (using NCover). I have to pass the
unit test exe and parameters into NCover in order to run the coverage
and this is where I am having the problem with the report file name.

I specify a report name, the tests assemblies are run individually and
the same report name is used for all files, so I only get one report
file with the results of the last test assembly. If I use {0}{1} in
the report name [or just accept the default] then I get most of the
report files, except where the test assembly completes in less than a
minute. This is quite common in our solution and in keeping with the
idea that the tests should execute quickly for a CI build.

So my question is - Is there a way to guarantee a unique filename so I
can generate a report for all test assemblies?

I have downloaded the code and I notice that in ReportBase.cs,
GetFileName uses result.Date.ToShortTimeString() which only generates
hour and minute values for the filename. I am temporarily modifying
the code by exporting the contents of the Framework assembly using
Reflector, and using ToLongTimeString(). This gives me the unique
filenames I need, but I would rather not run with a non-standard
install as a permanent solution.

Unless I have overlooked a simpler solution (and I almost hope I
have!) could I suggest a change to the code to accomodate this extra
precision in the time/filename? Adding a {2} parameter would add the
functionality without impacting existing setups? I cannot currently
build a working version from the svn source because of the problem
mentioned in the message 'MbUnit Exception when running 2.4.197'.

Thanks
Andrew


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"MbUnit.User" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/MbUnitUser?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to