-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Timestamp cannot be configured in ExtentSparkReporter #206
Comments
did you loader json config?
check please. |
@namilkimfree I want to change the timestamp format for each step of a test, underlined in my screenshot in my original post. We are not getting valuable data to see how many seconds it took to get to the next step, etc. Modifying the timeStampFormat in spark-config.json does not change the format anywhere at all on the report. |
The timeStamp property was not serialized and was not used anywhere in the extent report library, and I think it should be removed from the documentation. There is a possibility of datetime conflict issues with the multicultural provider. For example, if my local instance culture is set to en-US, if I pass "dd/MM/yyyy hh:mm:ss" (31/1/2024), it won't work. This could be a reason it is not implemented, I guess. |
@sudheshg The seconds do display in other areas in that screenshot above. Perhaps, if not configurable, the steps could use that same format as is already used in those other places? |
Then need to pass the expected TimeZone info in the config file to match the timeStampformat. |
I do not know what this means. There is no timezone option in the config file. |
As we are using the same report in different time zones the report shows different time formats according to the user system time format . |
For workaround the issue, I did this solution : I set my date in the details log with a separator (for example : TIME )
in config of ExtentSparkReporter, I set a json script like this :
at the end, my timestamp has seconds :) |
You can use DateTime.UtcNow |
@dcdraper ExtentReports/Views/Spark/Partials/Log.cshtml at line19 |
@namilkimfree Thanks for responding again, but I do not have any idea how I can read or format it. There is no config option for Timestamp. Have you done this? Do you have an example or sample code? |
Sorry for the delay, currently looking into this. |
The fix in this branch fixes the issue. There are several fixes made to the template due to which, I will need to do further testing + write tests as necessary. |
@anshooarora I did notice a couple things I did not quite expect...
|
Thanks, this is also fixed. I will prepare for release next. PS. this fix should also improve performance slightly. (Sorry for the delay in this, I did not have a Windows machine (until now) and doing all this on a mac was quite painful) |
* Initial: allows setting timestamp format via config #206 * Fix timestamp format * bump version -beta2 * Update SparkTestSPA.cshtml
@smestvirishvili - it should change the event timestamp, please see the original post for context. |
I want to show seconds in the ExtentReport, but there is no "TimeStampFormat" option to configure that, even though the documentation and codebase (spark-config.json) indicates that it is possible:
Code running in Visual Studio
[extentreports-csharp]/[config]/spark-config.json in GitHub
ExtentReport
The text was updated successfully, but these errors were encountered: