When i run my unit tests, i would like to print out and read how long it takes to run a function. I tried using Console.WriteLine() Trace.WriteLine() but that didn't work. Anyone know the proper method i should be using?
I have the following unit test
[TestMethod()]
public void ProductSerializationTest()
{
Stopwatch swSerialization = new Stopwatch();
swSerialization.Start();
SerializeProductsToXML(dummyProductList, XMLFolderPath);
swSerialization.Stop();
//Print out swSerialization.Elapsed value
}