When I run my unit tests, I would like to print and read how long it takes to run the function. I tried using Console.WriteLine () Trace.WriteLine (), but that did not work. Does anyone know the correct method I should use?
I have the following unit test
[TestMethod()]
public void ProductSerializationTest()
{
Stopwatch swSerialization = new Stopwatch();
swSerialization.Start();
SerializeProductsToXML(dummyProductList, XMLFolderPath);
swSerialization.Stop();
}
source
share