Skip to content
This repository was archived by the owner on Jan 8, 2019. It is now read-only.

Added an override that allows for a time stamp to be set whilst logging#44

Open
wilfglover wants to merge 1 commit into
anshooarora:masterfrom
wilfglover:master
Open

Added an override that allows for a time stamp to be set whilst logging#44
wilfglover wants to merge 1 commit into
anshooarora:masterfrom
wilfglover:master

Conversation

@wilfglover

Copy link
Copy Markdown

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.

…g, rather than always using the DateTime.Now
@anshooarora

Copy link
Copy Markdown
Owner

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;

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants