anshooarora / extentreports-csharp

Community version of Extent API for .NET has moved to https://github.com/extent-framework/
http://extentreports.com/
Other
47 stars 43 forks source link

Date issue when ExtentReport is decoupled #117

Open sudharsangk opened 6 years ago

sudharsangk commented 6 years ago

I decoupled the calling of ExtentReport from the main execution and passed xml as its input. But when the report is generated, it is not showing the actual test execution date time, instead it is showing the time when the api is called. I have given the StartTime and EndTime explicitly, but still it is not taking the end time given.

public void AddTestStepStatus(TestStepDTO testStepDTO) { if (testStepDTO.IsSuccess) { TestCase.Log(Status.Pass, testStepDTO.Description); } else { TestCase.Log(Status.Fail, testStepDTO.Description); } TestCase.GetModel().StartTime = testStepDTO.StartTime; TestCase.GetModel().EndTime = testStepDTO.EndTime; }