Open wilfglover opened 7 years ago
I don't think its a good approach to provide this option inside a constructor. I would rather do it via a property or a method, or directly use the intrinsic model to access this and other properties.
// approach 1
extentTest.StartTime = DateTime.Now;
// approach 2: use intrinsic model
extentTest.GetModel().StartTime = DateTime.Now;
This idea came from wanting to only create a test report if the test fails, so we would store the test details locally then flush them out at the end of the test. This would have the time stamp being inaccurate since datetime.now is always used. This override allows for the time stamp to be stored along side the test details and flushed with it at the end of a test.