{"action":"created","comment":{"url":"https://api.github.com/repos/SonarSource/sonar-dotnet-tests-library/pulls/comments/56305664","id":56305664,"diff_hunk":"@@ -84,13 +92,30 @@ private void handleCountersTag() {\n       int skipped = inconclusive;\n       int failures = timeout + failed + aborted;\n \n-      unitTestResults.add(tests, passed, skipped, failures, errors);\n+      unitTestResults.add(tests, passed, skipped, failures, errors, 0);\n+    }\n+\n+    private void handleTimesTag() {\n+      String start = xmlParserHelper.getAttribute(\"start\");\n+      String finish = xmlParserHelper.getAttribute(\"finish\");\n+      \n+      long duration = 0;\n+\n+      try {\n+        DateFormat fmt = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss.SSSSSSSXXX\");","path":"src/main/java/org/sonar/plugins/dotnet/tests/VisualStudioTestResultsFileParser.java","position":37,"original_position":37,"commit_id":"24c9ee65f4aeaed0fcf6891e4ee8c274a55f6dc4","original_commit_id":"24c9ee65f4aeaed0fcf6891e4ee8c274a55f6dc4","user":{"login":"dbolkensteyn","id":1132601,"avatar_url":"https://avatars.githubusercontent.com/u/1132601?v=3","gravatar_id":"","url":"https://api.github.com/users/dbolkensteyn","html_url":"https://github.com/dbolkensteyn","followers_url":"https://api.github.com/users/dbolkensteyn/followers","following_url":"https://api.github.com/users/dbolkensteyn/following{/other_user}","gists_url":"https://api.github.com/users/dbolkensteyn/gists{/gist_id}","starred_url":"https://api.github.com/users/dbolkensteyn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dbolkensteyn/subscriptions","organizations_url":"https://api.github.com/users/dbolkensteyn/orgs","repos_url":"https://api.github.com/users/dbolkensteyn/repos","events_url":"https://api.github.com/users/dbolkensteyn/events{/privacy}","received_events_url":"https://api.github.com/users/dbolkensteyn/received_events","type":"User","site_admin":false},"body":"this doesn't work as expected. the numbers of `S` symbols doesn't matter for parsing purposes - even with just one `S`, the whole number following the `.` will be interpreted in *miliseconds*, whereas it should be *microseconds*. See http://stackoverflow.com/questions/30135025/java-date-parsing-with-microsecond-or-nanosecond-accuracy","created_at":"2016-03-16T09:47:32Z","updated_at":"2016-03-16T09:47:32Z","html_url":"https://github.com/SonarSource/sonar-dotnet-tests-library/pull/20#discussion_r56305664","pull_request_url":"https://api.github.com/repos/SonarSource/sonar-dotnet-tests-library/pulls/20","_links":{"self":{"href":"https://api.github.com/repos/SonarSource/sonar-dotnet-tests-library/pulls/comments/56305664"},"html":{"href":"https://github.com/SonarSource/sonar-dotnet-tests-library/pull/20#discussion_r56305664"},"pull_request":{"href":"https://api.github.com/repos/SonarSource/sonar-dotnet-tests-library/pulls/20"}}},"pull_request":{"url":"https://api.github.com/repos/SonarSource/sonar-dotnet-tests-library/pulls/20","id":61442987,"html_url":"https://github.com/SonarSource/sonar-dotnet-tests-library/pull/20","diff_url":"https://github.com/SonarSource/sonar-dotnet-tests-library/pull/20.diff","patch_url":"https://github.com/SonarSource/sonar-dotnet-tests-library/pull/20.patch","issue_url":"https://api.github.com/repos/SonarSource/sonar-dotnet-tests-library/issues/20","number":20,"state":"open","locked":false,"title":"Read the execution time from test results","user":{"login":"sandermvanvliet","id":2393265,"avatar_url":"https://avatars.githubusercontent.com/u/2393265?v=3","gravatar_id":"","url":"https://api.github.com/users/sandermvanvliet","html_url":"https://github.com/sandermvanvliet","followers_url":"https://api.github.com/users/sandermvanvliet/followers","following_url":"https://api.github.com/users/sandermvanvliet/following{/other_user}","gists_url":"https://api.github.com/users/sandermvanvliet/gists{/gist_id}","starred_url":"https://api.github.com/users/sandermvanvliet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sandermvanvliet/subscriptions","organizations_url":"https://api.github.com/users/sandermvanvliet/orgs","repos_url":"https://api.github.com/users/sandermvanvliet/repos","events_url":"https://api.github.com/users/sandermvanvliet/events{/privacy}","received_events_url":"https://api.github.com/users/sandermvanvliet/received_events","type":"User","site_admin":false},"body":"While looking around the code for the issue mentioned here (http://stackoverflow.com/questions/29117785/no-drilldown-from-sonarqube-unit-test-success-widget) I got to the CoreMetrics and saw that there is an execution time metric that is currently not set via the unit test plugin.\r\nThis is an attempt at reading the value from a Visual Studio test result file.\r\n\r\nTests have been added for the VisualStudio result parser and the UnitTestResultsImportSensor classes however support for XUnit and NUnit is lacking right now, I could have a look at implementing that as well if that helps.\r\n\r\nI'm not really happy with the try/catch in the parser, it's currently there because I don't know what the default behaviour is for a plugin when it encounters something weird in the input data. Does it look ok or should I just get rid of it altogether?","created_at":"2016-03-02T18:17:23Z","updated_at":"2016-03-16T09:47:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"05cad9d1d91634d8eb5fdbd3b88eded12baa0ce0","assignee":{"login":"dbolkensteyn","id":1132601,"avatar_url":"https://avatars.githubusercontent.com/u/1132601?v=3","gravatar_id":"","url":"https://api.github.com/users/dbolkensteyn","html_url":"https://github.com/dbolkensteyn","followers_url":"https://api.github.com/users/dbolkensteyn/followers","following_url":"https://api.github.com/users/dbolkensteyn/following{/other_user}","gists_url":"https://api.github.com/users/dbolkensteyn/gists{/gist_id}","starred_url":"https://api.github.com/users/dbolkensteyn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dbolkensteyn/subscriptions","organizations_url":"https://api.github.com/users/dbolkensteyn/orgs","repos_url":"https://api.github.com/users/dbolkensteyn/repos","events_url":"https://api.github.com/users/dbolkensteyn/events{/privacy}","received_events_url":"https://api.github.com/users/dbolkensteyn/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/SonarSource/sonar-dotnet-tests-library/pulls/20/commits","review_comments_url":"https://api.github.com/repos/SonarSource/sonar-dotnet-tests-library/pulls/20/comments","review_comment_url":"https://api.github.com/repos/SonarSource/sonar-dotnet-tests-library/pulls/comments{/number}","comments_url":"https://api.github.com/repos/SonarSource/sonar-dotnet-tests-library/issues/20/comments","statuses_url":"https://api.github.com/repos/SonarSource/sonar-dotnet-tests-library/statuses/24c9ee65f4aeaed0fcf6891e4ee8c274a55f6dc4","head":{"label":"sandermvanvliet:master","ref":"master","sha":"24c9ee65f4aeaed0fcf6891e4ee8c274a55f6dc4","user":{"login":"sandermvanvliet","id":2393265,"avatar_url":"https://avatars.githubusercontent.com/u/2393265?v=3","gravatar_id":"","url":"https://api.github.com/users/sandermvanvliet","html_url":"https://github.com/sandermvanvliet","followers_url":"https://api.github.com/users/sandermvanvliet/followers","following_url":"https://api.github.com/users/sandermvanvliet/following{/other_user}","gists_url":"https://api.github.com/users/sandermvanvliet/gists{/gist_id}","starred_url":"https://api.github.com/users/sandermvanvliet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sandermvanvliet/subscriptions","organizations_url":"https://api.github.com/users/sandermvanvliet/orgs","repos_url":"https://api.github.com/users/sandermvanvliet/repos","events_url":"https://api.github.com/users/sandermvanvliet/events{/privacy}","received_events_url":"https://api.github.com/users/sandermvanvliet/received_events","type":"User","site_admin":false},"repo":{"id":52973122,"name":"sonar-dotnet-tests-library","full_name":"sandermvanvliet/sonar-dotnet-tests-library","owner":{"login":"sandermvanvliet","id":2393265,"avatar_url":"https://avatars.githubusercontent.com/u/2393265?v=3","gravatar_id":"","url":"https://api.github.com/users/sandermvanvliet","html_url":"https://github.com/sandermvanvliet","followers_url":"https://api.github.com/users/sandermvanvliet/followers","following_url":"https://api.github.com/users/sandermvanvliet/following{/other_user}","gists_url":"https://api.github.com/users/sandermvanvliet/gists{/gist_id}","starred_url":"https://api.github.com/users/sandermvanvliet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sandermvanvliet/subscriptions","organizations_url":"https://api.github.com/users/sandermvanvliet/orgs","repos_url":"https://api.github.com/users/sandermvanvliet/repos","events_url":"https://api.github.com/users/sandermvanvliet/events{/privacy}","received_events_url":"https://api.github.com/users/sandermvanvliet/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sandermvanvliet/sonar-dotnet-tests-library","description":"","fork":true,"url":"https://api.github.com/repos/sandermvanvliet/sonar-dotnet-tests-library","forks_url":"https://api.github.com/repos/sandermvanvliet/sonar-dotnet-tests-library/forks","keys_url":"https://api.github.com/repos/sandermvanvliet/sonar-dotnet-tests-library/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sandermvanvliet/sonar-dotnet-tests-library/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sandermvanvliet/sonar-dotnet-tests-library/teams","hooks_url":"https://api.github.com/repos/sandermvanvliet/sonar-dotnet-tests-library/hooks","issue_events_url":"https://api.github.com/repos/sandermvanvliet/sonar-dotnet-tests-library/issues/events{/number}","events_url":"https://api.github.com/repos/sandermvanvliet/sonar-dotnet-tests-library/events","assignees_url":"https://api.github.com/repos/sandermvanvliet/sonar-dotnet-tests-library/assignees{/user}","branches_url":"https://api.github.com/repos/sandermvanvliet/sonar-dotnet-tests-library/branches{/branch}","tags_url":"https://api.github.com/repos/sandermvanvliet/sonar-dotnet-tests-library/tags","blobs_url":"https://api.github.com/repos/sandermvanvliet/sonar-dotnet-tests-library/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sandermvanvliet/sonar-dotnet-tests-library/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sandermvanvliet/sonar-dotnet-tests-library/git/refs{/sha}","trees_url":"https://api.github.com/repos/sandermvanvliet/sonar-dotnet-tests-library/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sandermvanvliet/sonar-dotnet-tests-library/statuses/{sha}","languages_url":"https://api.github.com/repos/sandermvanvliet/sonar-dotnet-tests-library/languages","stargazers_url":"https://api.github.com/repos/sandermvanvliet/sonar-dotnet-tests-library/stargazers","contributors_url":"https://api.github.com/repos/sandermvanvliet/sonar-dotnet-tests-library/contributors","subscribers_url":"https://api.github.com/repos/sandermvanvliet/sonar-dotnet-tests-library/subscribers","subscription_url":"https://api.github.com/repos/sandermvanvliet/sonar-dotnet-tests-library/subscription","commits_url":"https://api.github.com/repos/sandermvanvliet/sonar-dotnet-tests-library/commits{/sha}","git_commits_url":"https://api.github.com/repos/sandermvanvliet/sonar-dotnet-tests-library/git/commits{/sha}","comments_url":"https://api.github.com/repos/sandermvanvliet/sonar-dotnet-tests-library/comments{/number}","issue_comment_url":"https://api.github.com/repos/sandermvanvliet/sonar-dotnet-tests-library/issues/comments{/number}","contents_url":"https://api.github.com/repos/sandermvanvliet/sonar-dotnet-tests-library/contents/{+path}","compare_url":"https://api.github.com/repos/sandermvanvliet/sonar-dotnet-tests-library/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sandermvanvliet/sonar-dotnet-tests-library/merges","archive_url":"https://api.github.com/repos/sandermvanvliet/sonar-dotnet-tests-library/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sandermvanvliet/sonar-dotnet-tests-library/downloads","issues_url":"https://api.github.com/repos/sandermvanvliet/sonar-dotnet-tests-library/issues{/number}","pulls_url":"https://api.github.com/repos/sandermvanvliet/sonar-dotnet-tests-library/pulls{/number}","milestones_url":"https://api.github.com/repos/sandermvanvliet/sonar-dotnet-tests-library/milestones{/number}","notifications_url":"https://api.github.com/repos/sandermvanvliet/sonar-dotnet-tests-library/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sandermvanvliet/sonar-dotnet-tests-library/labels{/name}","releases_url":"https://api.github.com/repos/sandermvanvliet/sonar-dotnet-tests-library/releases{/id}","deployments_url":"https://api.github.com/repos/sandermvanvliet/sonar-dotnet-tests-library/deployments","created_at":"2016-03-02T15:21:13Z","updated_at":"2016-03-02T15:21:14Z","pushed_at":"2016-03-03T15:37:56Z","git_url":"git://github.com/sandermvanvliet/sonar-dotnet-tests-library.git","ssh_url":"git@github.com:sandermvanvliet/sonar-dotnet-tests-library.git","clone_url":"https://github.com/sandermvanvliet/sonar-dotnet-tests-library.git","svn_url":"https://github.com/sandermvanvliet/sonar-dotnet-tests-library","homepage":null,"size":160,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"SonarSource:master","ref":"master","sha":"72ce9ba0bbfa97fc2cc5bff3dca4544d5c26cf8a","user":{"login":"SonarSource","id":545988,"avatar_url":"https://avatars.githubusercontent.com/u/545988?v=3","gravatar_id":"","url":"https://api.github.com/users/SonarSource","html_url":"https://github.com/SonarSource","followers_url":"https://api.github.com/users/SonarSource/followers","following_url":"https://api.github.com/users/SonarSource/following{/other_user}","gists_url":"https://api.github.com/users/SonarSource/gists{/gist_id}","starred_url":"https://api.github.com/users/SonarSource/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SonarSource/subscriptions","organizations_url":"https://api.github.com/users/SonarSource/orgs","repos_url":"https://api.github.com/users/SonarSource/repos","events_url":"https://api.github.com/users/SonarSource/events{/privacy}","received_events_url":"https://api.github.com/users/SonarSource/received_events","type":"Organization","site_admin":false},"repo":{"id":17217234,"name":"sonar-dotnet-tests-library","full_name":"SonarSource/sonar-dotnet-tests-library","owner":{"login":"SonarSource","id":545988,"avatar_url":"https://avatars.githubusercontent.com/u/545988?v=3","gravatar_id":"","url":"https://api.github.com/users/SonarSource","html_url":"https://github.com/SonarSource","followers_url":"https://api.github.com/users/SonarSource/followers","following_url":"https://api.github.com/users/SonarSource/following{/other_user}","gists_url":"https://api.github.com/users/SonarSource/gists{/gist_id}","starred_url":"https://api.github.com/users/SonarSource/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SonarSource/subscriptions","organizations_url":"https://api.github.com/users/SonarSource/orgs","repos_url":"https://api.github.com/users/SonarSource/repos","events_url":"https://api.github.com/users/SonarSource/events{/privacy}","received_events_url":"https://api.github.com/users/SonarSource/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/SonarSource/sonar-dotnet-tests-library","description":"","fork":false,"url":"https://api.github.com/repos/SonarSource/sonar-dotnet-tests-library","forks_url":"https://api.github.com/repos/SonarSource/sonar-dotnet-tests-library/forks","keys_url":"https://api.github.com/repos/SonarSource/sonar-dotnet-tests-library/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SonarSource/sonar-dotnet-tests-library/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SonarSource/sonar-dotnet-tests-library/teams","hooks_url":"https://api.github.com/repos/SonarSource/sonar-dotnet-tests-library/hooks","issue_events_url":"https://api.github.com/repos/SonarSource/sonar-dotnet-tests-library/issues/events{/number}","events_url":"https://api.github.com/repos/SonarSource/sonar-dotnet-tests-library/events","assignees_url":"https://api.github.com/repos/SonarSource/sonar-dotnet-tests-library/assignees{/user}","branches_url":"https://api.github.com/repos/SonarSource/sonar-dotnet-tests-library/branches{/branch}","tags_url":"https://api.github.com/repos/SonarSource/sonar-dotnet-tests-library/tags","blobs_url":"https://api.github.com/repos/SonarSource/sonar-dotnet-tests-library/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SonarSource/sonar-dotnet-tests-library/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SonarSource/sonar-dotnet-tests-library/git/refs{/sha}","trees_url":"https://api.github.com/repos/SonarSource/sonar-dotnet-tests-library/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SonarSource/sonar-dotnet-tests-library/statuses/{sha}","languages_url":"https://api.github.com/repos/SonarSource/sonar-dotnet-tests-library/languages","stargazers_url":"https://api.github.com/repos/SonarSource/sonar-dotnet-tests-library/stargazers","contributors_url":"https://api.github.com/repos/SonarSource/sonar-dotnet-tests-library/contributors","subscribers_url":"https://api.github.com/repos/SonarSource/sonar-dotnet-tests-library/subscribers","subscription_url":"https://api.github.com/repos/SonarSource/sonar-dotnet-tests-library/subscription","commits_url":"https://api.github.com/repos/SonarSource/sonar-dotnet-tests-library/commits{/sha}","git_commits_url":"https://api.github.com/repos/SonarSource/sonar-dotnet-tests-library/git/commits{/sha}","comments_url":"https://api.github.com/repos/SonarSource/sonar-dotnet-tests-library/comments{/number}","issue_comment_url":"https://api.github.com/repos/SonarSource/sonar-dotnet-tests-library/issues/comments{/number}","contents_url":"https://api.github.com/repos/SonarSource/sonar-dotnet-tests-library/contents/{+path}","compare_url":"https://api.github.com/repos/SonarSource/sonar-dotnet-tests-library/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SonarSource/sonar-dotnet-tests-library/merges","archive_url":"https://api.github.com/repos/SonarSource/sonar-dotnet-tests-library/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SonarSource/sonar-dotnet-tests-library/downloads","issues_url":"https://api.github.com/repos/SonarSource/sonar-dotnet-tests-library/issues{/number}","pulls_url":"https://api.github.com/repos/SonarSource/sonar-dotnet-tests-library/pulls{/number}","milestones_url":"https://api.github.com/repos/SonarSource/sonar-dotnet-tests-library/milestones{/number}","notifications_url":"https://api.github.com/repos/SonarSource/sonar-dotnet-tests-library/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SonarSource/sonar-dotnet-tests-library/labels{/name}","releases_url":"https://api.github.com/repos/SonarSource/sonar-dotnet-tests-library/releases{/id}","deployments_url":"https://api.github.com/repos/SonarSource/sonar-dotnet-tests-library/deployments","created_at":"2014-02-26T16:34:51Z","updated_at":"2016-01-27T14:11:25Z","pushed_at":"2016-03-16T06:37:03Z","git_url":"git://github.com/SonarSource/sonar-dotnet-tests-library.git","ssh_url":"git@github.com:SonarSource/sonar-dotnet-tests-library.git","clone_url":"https://github.com/SonarSource/sonar-dotnet-tests-library.git","svn_url":"https://github.com/SonarSource/sonar-dotnet-tests-library","homepage":null,"size":241,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":18,"mirror_url":null,"open_issues_count":5,"forks":18,"open_issues":5,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/SonarSource/sonar-dotnet-tests-library/pulls/20"},"html":{"href":"https://github.com/SonarSource/sonar-dotnet-tests-library/pull/20"},"issue":{"href":"https://api.github.com/repos/SonarSource/sonar-dotnet-tests-library/issues/20"},"comments":{"href":"https://api.github.com/repos/SonarSource/sonar-dotnet-tests-library/issues/20/comments"},"review_comments":{"href":"https://api.github.com/repos/SonarSource/sonar-dotnet-tests-library/pulls/20/comments"},"review_comment":{"href":"https://api.github.com/repos/SonarSource/sonar-dotnet-tests-library/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/SonarSource/sonar-dotnet-tests-library/pulls/20/commits"},"statuses":{"href":"https://api.github.com/repos/SonarSource/sonar-dotnet-tests-library/statuses/24c9ee65f4aeaed0fcf6891e4ee8c274a55f6dc4"}}}}