Fix for wrong start time
The performance testing extension seems to output the Date field in seconds, rather than milliseconds. I also added a call to ToLocalTime to get correct results for different time zones.
Before:
After:
resolves #4
I read the contributing guidelines but I don't see a CHANGELOG.MD file in this repository. Let me know if I need to do any modifications or extra steps.
EDIT Hold off on this until I can update the failing unit tests.
The problem is that the xml result files that the unit tests use have a different format than what the latest Performance testing API exports (e.g. millisecond vs second timestamps). So maybe the xml result files in this repo are out of date? The tests pass when I use newly exported result files.
Yes, that result file in the unit tests is out of date. Thanks for putting this fix in. Does it still pass on the xml result file from the xrautomated tests repo, the baseline file? If you could check that, I would be good merging this.
Actually, the XRAutomated repo also uses the older xml format just like the result files for unit tests here, so those don't work.
Older format: ##performancetestruninfo includes the timestamp like StartTime":1586641593946.3528
Newer format: ##performancetestruninfo2 includes the timestamp like "Date":1589467385
But now that I think about it, a better fix than changing AddMilliseconds to AddSeconds is doing
StartTime = TimeSpan.FromSeconds(result.Date).TotalMilliseconds,
in TestResultXmlParser.cs in the DeserializeMetadataV2 method. Then v2 format will be in milliseconds by the time it gets to result processor.
Just tried it out and works for both formats! It's after midnight where I'm at, so I'll wait until tomorrow to make that modification, along with a few additional unit tests. Does the new proposed fix sound okay?
Since @gintautasss modified the performance testing package to output Date in milliseconds, my fix here is no longer needed (so I got rid of that commit), except for the ToLocalTime part. In addition to that small change, I went ahead and added a few of the newer xml format result files, along with tests. Let me know if there's anything else I need to do.