{"action":"created","comment":{"url":"https://api.github.com/repos/Microsoft/vstest/pulls/comments/200552362","pull_request_review_id":134890756,"id":200552362,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwMDU1MjM2Mg==","diff_hunk":"@@ -572,45 +572,46 @@ private static string GetOwner(ObjectModel.TestCase rockSteadyTestCase)\n             return owner ?? string.Empty;\n         }\n \n-        /// <summary>\n-        /// Gets TestMethod for given testCase name and its class name.\n-        /// </summary>\n-        /// <param name=\"testDisplayName\">test case display name</param>\n-        /// <param name=\"rockSteadyTestCase\">rockSteady Test Case</param>\n-        /// <returns>The <see cref=\"TestMethod\"/></returns>\n-        private static TestMethod GetTestMethod(string testDisplayName, string testCaseName, string source)\n+        private static string GetTestClassName(string testName, string fullyQualifiedName, string source)\n         {\n-            string className = \"DefaultClassName\";\n-            if (testCaseName.Contains(\".\"))\n+            var className = \"DefaultClassName\";\n+\n+            // In case, fullyQualifiedName ends with testName, className is checked within remaining value of fullyQualifiedName.\n+            // Example: In case, testName = TestMethod1(2, 3, 4.0d) and fullyQualifiedName = TestProject1.Class1.TestMethod1(2, 3, 4.0d), className will be checked within 'TestProject1.Class1.' only\n+            var nameToCheck = fullyQualifiedName.EndsWith(testName) ?\n+                fullyQualifiedName.Substring(0, fullyQualifiedName.Length - testName.Length) :\n+                fullyQualifiedName;\n+\n+            // C# test case scenario.\n+            if (nameToCheck.Contains(\".\"))\n             {\n-                className = testCaseName.Substring(0, testCaseName.LastIndexOf('.'));\n+                return nameToCheck.Substring(0, nameToCheck.LastIndexOf('.'));\n             }\n-            else if (testCaseName.Contains(\"::\"))\n+\n+            // C++ test case scenario (we would have a \"::\" instead of a '.')\n+            if (nameToCheck.Contains(\"::\"))\n             {\n-                // if this is a C++ test case then we would have a \"::\" instaed of a '.'\n-                className = testCaseName.Substring(0, testCaseName.LastIndexOf(\"::\"));\n+                className = nameToCheck.Substring(0, nameToCheck.LastIndexOf(\"::\"));\n \n                 // rename for a consistent behaviour for all tests.\n-                className = className.Replace(\"::\", \".\");\n+                return className.Replace(\"::\", \".\");\n             }\n-            else\n+\n+            // Ordered test, web test scenario (Setting class name as source name if FQDn doesnt have . or ::)\n+            try\n             {\n-                // Setting class name as source name if FQDn doesnt have . or :: [E.g. ordered test, web test]\n-                try\n+                string testCaseSource = Path.GetFileNameWithoutExtension(source);\n+                if (!String.IsNullOrEmpty(testCaseSource))\n                 {\n-                    string testCaseSource = Path.GetFileNameWithoutExtension(source);\n-                    if (!String.IsNullOrEmpty(testCaseSource))\n-                    {\n-                        className = testCaseSource;\n-                    }\n-                }\n-                catch (ArgumentException)\n-                {\n-                    // If source is not valid file path, then className will continue to point default value.\n+                    return testCaseSource;\n                 }\n             }\n+            catch (ArgumentException)\n+            {","path":"src/Microsoft.TestPlatform.Extensions.TrxLogger/Utility/Converter.cs","position":65,"original_position":65,"commit_id":"a859ed639d9467544c173d88890c622b0d2e2f20","original_commit_id":"a859ed639d9467544c173d88890c622b0d2e2f20","user":{"login":"smadala","id":4337332,"node_id":"MDQ6VXNlcjQzMzczMzI=","avatar_url":"https://avatars1.githubusercontent.com/u/4337332?v=4","gravatar_id":"","url":"https://api.github.com/users/smadala","html_url":"https://github.com/smadala","followers_url":"https://api.github.com/users/smadala/followers","following_url":"https://api.github.com/users/smadala/following{/other_user}","gists_url":"https://api.github.com/users/smadala/gists{/gist_id}","starred_url":"https://api.github.com/users/smadala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smadala/subscriptions","organizations_url":"https://api.github.com/users/smadala/orgs","repos_url":"https://api.github.com/users/smadala/repos","events_url":"https://api.github.com/users/smadala/events{/privacy}","received_events_url":"https://api.github.com/users/smadala/received_events","type":"User","site_admin":false},"body":"Add logging here.","created_at":"2018-07-06T05:29:26Z","updated_at":"2018-07-06T05:32:04Z","html_url":"https://github.com/Microsoft/vstest/pull/1677#discussion_r200552362","pull_request_url":"https://api.github.com/repos/Microsoft/vstest/pulls/1677","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/Microsoft/vstest/pulls/comments/200552362"},"html":{"href":"https://github.com/Microsoft/vstest/pull/1677#discussion_r200552362"},"pull_request":{"href":"https://api.github.com/repos/Microsoft/vstest/pulls/1677"}}},"pull_request":{"url":"https://api.github.com/repos/Microsoft/vstest/pulls/1677","id":199645544,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk5NjQ1NTQ0","html_url":"https://github.com/Microsoft/vstest/pull/1677","diff_url":"https://github.com/Microsoft/vstest/pull/1677.diff","patch_url":"https://github.com/Microsoft/vstest/pull/1677.patch","issue_url":"https://api.github.com/repos/Microsoft/vstest/issues/1677","number":1677,"state":"open","locked":false,"title":"Trx logger class name fix - NUnit data driven tests","user":{"login":"abhishkk","id":32157767,"node_id":"MDQ6VXNlcjMyMTU3NzY3","avatar_url":"https://avatars2.githubusercontent.com/u/32157767?v=4","gravatar_id":"","url":"https://api.github.com/users/abhishkk","html_url":"https://github.com/abhishkk","followers_url":"https://api.github.com/users/abhishkk/followers","following_url":"https://api.github.com/users/abhishkk/following{/other_user}","gists_url":"https://api.github.com/users/abhishkk/gists{/gist_id}","starred_url":"https://api.github.com/users/abhishkk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abhishkk/subscriptions","organizations_url":"https://api.github.com/users/abhishkk/orgs","repos_url":"https://api.github.com/users/abhishkk/repos","events_url":"https://api.github.com/users/abhishkk/events{/privacy}","received_events_url":"https://api.github.com/users/abhishkk/received_events","type":"User","site_admin":false},"body":"## Description\r\nExample:\r\n```\r\n        [TestCase(2, 2, 4.0)]\r\n        public void TestMethod1(int a, int b, double c)\r\n        {\r\n            Assert.IsTrue(a + b == c);\r\n        }\r\n```\r\nFor above example, trx file has `className` as `UnitTestProject1.UnitTest1.TestMethod1(2, 3, 4.`.\r\nIdeally className should be  `UnitTestProject1.UnitTest1`\r\n\r\n## Related issue\r\nhttps://github.com/Microsoft/vsts-tasks/issues/7620\r\n","created_at":"2018-07-06T05:00:12Z","updated_at":"2018-07-06T05:32:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f70f14014ad1af2b29f7b675a3459a05a7749598","assignee":null,"assignees":[],"requested_reviewers":[{"login":"cltshivash","id":18257951,"node_id":"MDQ6VXNlcjE4MjU3OTUx","avatar_url":"https://avatars1.githubusercontent.com/u/18257951?v=4","gravatar_id":"","url":"https://api.github.com/users/cltshivash","html_url":"https://github.com/cltshivash","followers_url":"https://api.github.com/users/cltshivash/followers","following_url":"https://api.github.com/users/cltshivash/following{/other_user}","gists_url":"https://api.github.com/users/cltshivash/gists{/gist_id}","starred_url":"https://api.github.com/users/cltshivash/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cltshivash/subscriptions","organizations_url":"https://api.github.com/users/cltshivash/orgs","repos_url":"https://api.github.com/users/cltshivash/repos","events_url":"https://api.github.com/users/cltshivash/events{/privacy}","received_events_url":"https://api.github.com/users/cltshivash/received_events","type":"User","site_admin":false},{"login":"singhsarab","id":18569990,"node_id":"MDQ6VXNlcjE4NTY5OTkw","avatar_url":"https://avatars0.githubusercontent.com/u/18569990?v=4","gravatar_id":"","url":"https://api.github.com/users/singhsarab","html_url":"https://github.com/singhsarab","followers_url":"https://api.github.com/users/singhsarab/followers","following_url":"https://api.github.com/users/singhsarab/following{/other_user}","gists_url":"https://api.github.com/users/singhsarab/gists{/gist_id}","starred_url":"https://api.github.com/users/singhsarab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/singhsarab/subscriptions","organizations_url":"https://api.github.com/users/singhsarab/orgs","repos_url":"https://api.github.com/users/singhsarab/repos","events_url":"https://api.github.com/users/singhsarab/events{/privacy}","received_events_url":"https://api.github.com/users/singhsarab/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Microsoft/vstest/pulls/1677/commits","review_comments_url":"https://api.github.com/repos/Microsoft/vstest/pulls/1677/comments","review_comment_url":"https://api.github.com/repos/Microsoft/vstest/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Microsoft/vstest/issues/1677/comments","statuses_url":"https://api.github.com/repos/Microsoft/vstest/statuses/a859ed639d9467544c173d88890c622b0d2e2f20","head":{"label":"abhishkk:trxLoggerClassNameFix","ref":"trxLoggerClassNameFix","sha":"a859ed639d9467544c173d88890c622b0d2e2f20","user":{"login":"abhishkk","id":32157767,"node_id":"MDQ6VXNlcjMyMTU3NzY3","avatar_url":"https://avatars2.githubusercontent.com/u/32157767?v=4","gravatar_id":"","url":"https://api.github.com/users/abhishkk","html_url":"https://github.com/abhishkk","followers_url":"https://api.github.com/users/abhishkk/followers","following_url":"https://api.github.com/users/abhishkk/following{/other_user}","gists_url":"https://api.github.com/users/abhishkk/gists{/gist_id}","starred_url":"https://api.github.com/users/abhishkk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abhishkk/subscriptions","organizations_url":"https://api.github.com/users/abhishkk/orgs","repos_url":"https://api.github.com/users/abhishkk/repos","events_url":"https://api.github.com/users/abhishkk/events{/privacy}","received_events_url":"https://api.github.com/users/abhishkk/received_events","type":"User","site_admin":false},"repo":{"id":122433470,"node_id":"MDEwOlJlcG9zaXRvcnkxMjI0MzM0NzA=","name":"vstest","full_name":"abhishkk/vstest","owner":{"login":"abhishkk","id":32157767,"node_id":"MDQ6VXNlcjMyMTU3NzY3","avatar_url":"https://avatars2.githubusercontent.com/u/32157767?v=4","gravatar_id":"","url":"https://api.github.com/users/abhishkk","html_url":"https://github.com/abhishkk","followers_url":"https://api.github.com/users/abhishkk/followers","following_url":"https://api.github.com/users/abhishkk/following{/other_user}","gists_url":"https://api.github.com/users/abhishkk/gists{/gist_id}","starred_url":"https://api.github.com/users/abhishkk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abhishkk/subscriptions","organizations_url":"https://api.github.com/users/abhishkk/orgs","repos_url":"https://api.github.com/users/abhishkk/repos","events_url":"https://api.github.com/users/abhishkk/events{/privacy}","received_events_url":"https://api.github.com/users/abhishkk/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/abhishkk/vstest","description":"Visual Studio Test Platform is the runner and engine that powers test explorer and vstest.console.","fork":true,"url":"https://api.github.com/repos/abhishkk/vstest","forks_url":"https://api.github.com/repos/abhishkk/vstest/forks","keys_url":"https://api.github.com/repos/abhishkk/vstest/keys{/key_id}","collaborators_url":"https://api.github.com/repos/abhishkk/vstest/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/abhishkk/vstest/teams","hooks_url":"https://api.github.com/repos/abhishkk/vstest/hooks","issue_events_url":"https://api.github.com/repos/abhishkk/vstest/issues/events{/number}","events_url":"https://api.github.com/repos/abhishkk/vstest/events","assignees_url":"https://api.github.com/repos/abhishkk/vstest/assignees{/user}","branches_url":"https://api.github.com/repos/abhishkk/vstest/branches{/branch}","tags_url":"https://api.github.com/repos/abhishkk/vstest/tags","blobs_url":"https://api.github.com/repos/abhishkk/vstest/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/abhishkk/vstest/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/abhishkk/vstest/git/refs{/sha}","trees_url":"https://api.github.com/repos/abhishkk/vstest/git/trees{/sha}","statuses_url":"https://api.github.com/repos/abhishkk/vstest/statuses/{sha}","languages_url":"https://api.github.com/repos/abhishkk/vstest/languages","stargazers_url":"https://api.github.com/repos/abhishkk/vstest/stargazers","contributors_url":"https://api.github.com/repos/abhishkk/vstest/contributors","subscribers_url":"https://api.github.com/repos/abhishkk/vstest/subscribers","subscription_url":"https://api.github.com/repos/abhishkk/vstest/subscription","commits_url":"https://api.github.com/repos/abhishkk/vstest/commits{/sha}","git_commits_url":"https://api.github.com/repos/abhishkk/vstest/git/commits{/sha}","comments_url":"https://api.github.com/repos/abhishkk/vstest/comments{/number}","issue_comment_url":"https://api.github.com/repos/abhishkk/vstest/issues/comments{/number}","contents_url":"https://api.github.com/repos/abhishkk/vstest/contents/{+path}","compare_url":"https://api.github.com/repos/abhishkk/vstest/compare/{base}...{head}","merges_url":"https://api.github.com/repos/abhishkk/vstest/merges","archive_url":"https://api.github.com/repos/abhishkk/vstest/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/abhishkk/vstest/downloads","issues_url":"https://api.github.com/repos/abhishkk/vstest/issues{/number}","pulls_url":"https://api.github.com/repos/abhishkk/vstest/pulls{/number}","milestones_url":"https://api.github.com/repos/abhishkk/vstest/milestones{/number}","notifications_url":"https://api.github.com/repos/abhishkk/vstest/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/abhishkk/vstest/labels{/name}","releases_url":"https://api.github.com/repos/abhishkk/vstest/releases{/id}","deployments_url":"https://api.github.com/repos/abhishkk/vstest/deployments","created_at":"2018-02-22T05:08:48Z","updated_at":"2018-07-06T05:02:34Z","pushed_at":"2018-07-06T05:02:32Z","git_url":"git://github.com/abhishkk/vstest.git","ssh_url":"git@github.com:abhishkk/vstest.git","clone_url":"https://github.com/abhishkk/vstest.git","svn_url":"https://github.com/abhishkk/vstest","homepage":"","size":10095,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Microsoft:master","ref":"master","sha":"64a4c978822a25e88c119c8da42b543fa9ac5a96","user":{"login":"Microsoft","id":6154722,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYxNTQ3MjI=","avatar_url":"https://avatars2.githubusercontent.com/u/6154722?v=4","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"repo":{"id":62774726,"node_id":"MDEwOlJlcG9zaXRvcnk2Mjc3NDcyNg==","name":"vstest","full_name":"Microsoft/vstest","owner":{"login":"Microsoft","id":6154722,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYxNTQ3MjI=","avatar_url":"https://avatars2.githubusercontent.com/u/6154722?v=4","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Microsoft/vstest","description":"Visual Studio Test Platform is the runner and engine that powers test explorer and vstest.console.","fork":false,"url":"https://api.github.com/repos/Microsoft/vstest","forks_url":"https://api.github.com/repos/Microsoft/vstest/forks","keys_url":"https://api.github.com/repos/Microsoft/vstest/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Microsoft/vstest/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Microsoft/vstest/teams","hooks_url":"https://api.github.com/repos/Microsoft/vstest/hooks","issue_events_url":"https://api.github.com/repos/Microsoft/vstest/issues/events{/number}","events_url":"https://api.github.com/repos/Microsoft/vstest/events","assignees_url":"https://api.github.com/repos/Microsoft/vstest/assignees{/user}","branches_url":"https://api.github.com/repos/Microsoft/vstest/branches{/branch}","tags_url":"https://api.github.com/repos/Microsoft/vstest/tags","blobs_url":"https://api.github.com/repos/Microsoft/vstest/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Microsoft/vstest/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Microsoft/vstest/git/refs{/sha}","trees_url":"https://api.github.com/repos/Microsoft/vstest/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Microsoft/vstest/statuses/{sha}","languages_url":"https://api.github.com/repos/Microsoft/vstest/languages","stargazers_url":"https://api.github.com/repos/Microsoft/vstest/stargazers","contributors_url":"https://api.github.com/repos/Microsoft/vstest/contributors","subscribers_url":"https://api.github.com/repos/Microsoft/vstest/subscribers","subscription_url":"https://api.github.com/repos/Microsoft/vstest/subscription","commits_url":"https://api.github.com/repos/Microsoft/vstest/commits{/sha}","git_commits_url":"https://api.github.com/repos/Microsoft/vstest/git/commits{/sha}","comments_url":"https://api.github.com/repos/Microsoft/vstest/comments{/number}","issue_comment_url":"https://api.github.com/repos/Microsoft/vstest/issues/comments{/number}","contents_url":"https://api.github.com/repos/Microsoft/vstest/contents/{+path}","compare_url":"https://api.github.com/repos/Microsoft/vstest/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Microsoft/vstest/merges","archive_url":"https://api.github.com/repos/Microsoft/vstest/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Microsoft/vstest/downloads","issues_url":"https://api.github.com/repos/Microsoft/vstest/issues{/number}","pulls_url":"https://api.github.com/repos/Microsoft/vstest/pulls{/number}","milestones_url":"https://api.github.com/repos/Microsoft/vstest/milestones{/number}","notifications_url":"https://api.github.com/repos/Microsoft/vstest/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Microsoft/vstest/labels{/name}","releases_url":"https://api.github.com/repos/Microsoft/vstest/releases{/id}","deployments_url":"https://api.github.com/repos/Microsoft/vstest/deployments","created_at":"2016-07-07T04:18:58Z","updated_at":"2018-07-06T05:19:23Z","pushed_at":"2018-07-06T05:19:48Z","git_url":"git://github.com/Microsoft/vstest.git","ssh_url":"git@github.com:Microsoft/vstest.git","clone_url":"https://github.com/Microsoft/vstest.git","svn_url":"https://github.com/Microsoft/vstest","homepage":"","size":10020,"stargazers_count":384,"watchers_count":384,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":104,"mirror_url":null,"archived":false,"open_issues_count":109,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":104,"open_issues":109,"watchers":384,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Microsoft/vstest/pulls/1677"},"html":{"href":"https://github.com/Microsoft/vstest/pull/1677"},"issue":{"href":"https://api.github.com/repos/Microsoft/vstest/issues/1677"},"comments":{"href":"https://api.github.com/repos/Microsoft/vstest/issues/1677/comments"},"review_comments":{"href":"https://api.github.com/repos/Microsoft/vstest/pulls/1677/comments"},"review_comment":{"href":"https://api.github.com/repos/Microsoft/vstest/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Microsoft/vstest/pulls/1677/commits"},"statuses":{"href":"https://api.github.com/repos/Microsoft/vstest/statuses/a859ed639d9467544c173d88890c622b0d2e2f20"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"smadala"}}