← Back to team overview

nunit-core team mailing list archive

[Bug 1072379] Re: Report test execution time at a higher resolution

 

** Changed in: nunitlite
       Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of NUnit
Developers, which is subscribed to NUnit V2.
https://bugs.launchpad.net/bugs/1072379

Title:
  Report test execution time at a higher resolution

Status in NUnit Test Framework:
  Fix Committed
Status in NUnitLite Testing Framework:
  Fix Released
Status in NUnit V2 Test Framework:
  Fix Committed

Bug description:
  Currently, we measure test execution time using DateTime.Now, which
  depends on the System Timer. Per the docs, that gives us a resolution
  of 10ms, although it seems higher in practice, probably due to context
  switching time.

  Really, if we want a good measure of how long it took to run a test,
  we should probably be using the Stopwatch class.

  While we are at it, we should probably use a TimeSpan rather than a double to represent elapsed time in the TestResult class,
  at least in NUnit 3.0, and possibly in the other projects as well. The NUnit 2.6 XML should continue to report time in seconds, while the NUnit 3.0 XML can use a string representation of the TimeSpan.

To manage notifications about this bug go to:
https://bugs.launchpad.net/nunit-3.0/+bug/1072379/+subscriptions


References