{"action":"created","comment":{"url":"https://api.github.com/repos/TEAMMATES/repo/pulls/comments/39040804","id":39040804,"diff_hunk":"@@ -0,0 +1,80 @@\n+package teammates.test.cases.testdriver;\n+\n+import static org.testng.AssertJUnit.assertTrue;\n+\n+import java.io.File;\n+import java.io.FileNotFoundException;\n+import java.util.HashMap;\n+import java.util.Map;\n+\n+import org.testng.annotations.Test;\n+\n+import teammates.common.util.FileHelper;\n+import teammates.test.cases.BaseTestCase;\n+\n+public class TestngTest extends BaseTestCase {\n+\n+    HashMap<String, String> tests = new HashMap<String, String>(); // <class name, package name>\n+    String testngXmlAsString;\n+\n+    @Test\n+    public void checkTestsInTestng() throws FileNotFoundException {\n+        assertTrue(FileHelper.isFileExists(\"./src/test/testng.xml\"));\n+        testngXmlAsString = FileHelper.readFile(\"./src/test/testng.xml\");\n+        \n+        addFilesToTestsRecursively();\n+        excludeFilesNotInTestng();","path":"src/test/java/teammates/test/cases/testdriver/TestngTest.java","position":26,"original_position":26,"commit_id":"b82cdaf7c46fa81d2c870b1a557f8685bd1bf07d","original_commit_id":"b82cdaf7c46fa81d2c870b1a557f8685bd1bf07d","user":{"login":"damithc","id":1673303,"avatar_url":"https://avatars.githubusercontent.com/u/1673303?v=3","gravatar_id":"","url":"https://api.github.com/users/damithc","html_url":"https://github.com/damithc","followers_url":"https://api.github.com/users/damithc/followers","following_url":"https://api.github.com/users/damithc/following{/other_user}","gists_url":"https://api.github.com/users/damithc/gists{/gist_id}","starred_url":"https://api.github.com/users/damithc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/damithc/subscriptions","organizations_url":"https://api.github.com/users/damithc/orgs","repos_url":"https://api.github.com/users/damithc/repos","events_url":"https://api.github.com/users/damithc/events{/privacy}","received_events_url":"https://api.github.com/users/damithc/received_events","type":"User","site_admin":false},"body":"Similar case here. Pass whatever it needs as parameters and get the result as a return value. That way the method becomes self-explanatory, less coupled with the rest of the code, and more testable.","created_at":"2015-09-09T13:24:24Z","updated_at":"2015-09-09T13:24:24Z","html_url":"https://github.com/TEAMMATES/repo/pull/4245#discussion_r39040804","pull_request_url":"https://api.github.com/repos/TEAMMATES/repo/pulls/4245","_links":{"self":{"href":"https://api.github.com/repos/TEAMMATES/repo/pulls/comments/39040804"},"html":{"href":"https://github.com/TEAMMATES/repo/pull/4245#discussion_r39040804"},"pull_request":{"href":"https://api.github.com/repos/TEAMMATES/repo/pulls/4245"}}},"pull_request":{"url":"https://api.github.com/repos/TEAMMATES/repo/pulls/4245","id":44319082,"html_url":"https://github.com/TEAMMATES/repo/pull/4245","diff_url":"https://github.com/TEAMMATES/repo/pull/4245.diff","patch_url":"https://github.com/TEAMMATES/repo/pull/4245.patch","issue_url":"https://api.github.com/repos/TEAMMATES/repo/issues/4245","number":4245,"state":"open","locked":false,"title":"Write a test case to confirm that all test cases are included in the testng.xml #4183","user":{"login":"taniach","id":7547452,"avatar_url":"https://avatars.githubusercontent.com/u/7547452?v=3","gravatar_id":"","url":"https://api.github.com/users/taniach","html_url":"https://github.com/taniach","followers_url":"https://api.github.com/users/taniach/followers","following_url":"https://api.github.com/users/taniach/following{/other_user}","gists_url":"https://api.github.com/users/taniach/gists{/gist_id}","starred_url":"https://api.github.com/users/taniach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taniach/subscriptions","organizations_url":"https://api.github.com/users/taniach/orgs","repos_url":"https://api.github.com/users/taniach/repos","events_url":"https://api.github.com/users/taniach/events{/privacy}","received_events_url":"https://api.github.com/users/taniach/received_events","type":"User","site_admin":false},"body":"The following directories are tested in `testng.xml`:\r\n* `teammates.test.cases`\r\n* `teammates.test.cases.testdriver`\r\n* `teammates.test.cases.ui.browsertests`\r\n\r\nThe following tests are excluded:\r\n* `BaseComponentTestCase`\r\n* `BaseTestCase`\r\n* `BaseUiTestCase`\r\n* `FeedbackQuestionUiTest`\r\n* `GodModeTest`\r\n\r\n@wkurniawan07 Are these tests supposed to be excluded?","created_at":"2015-09-07T04:20:28Z","updated_at":"2015-09-09T13:24:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9a8b1a5ddc1dbe35581e627e50dba5c8c1a3f5d7","assignee":{"login":"damithc","id":1673303,"avatar_url":"https://avatars.githubusercontent.com/u/1673303?v=3","gravatar_id":"","url":"https://api.github.com/users/damithc","html_url":"https://github.com/damithc","followers_url":"https://api.github.com/users/damithc/followers","following_url":"https://api.github.com/users/damithc/following{/other_user}","gists_url":"https://api.github.com/users/damithc/gists{/gist_id}","starred_url":"https://api.github.com/users/damithc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/damithc/subscriptions","organizations_url":"https://api.github.com/users/damithc/orgs","repos_url":"https://api.github.com/users/damithc/repos","events_url":"https://api.github.com/users/damithc/events{/privacy}","received_events_url":"https://api.github.com/users/damithc/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/TEAMMATES/repo/pulls/4245/commits","review_comments_url":"https://api.github.com/repos/TEAMMATES/repo/pulls/4245/comments","review_comment_url":"https://api.github.com/repos/TEAMMATES/repo/pulls/comments{/number}","comments_url":"https://api.github.com/repos/TEAMMATES/repo/issues/4245/comments","statuses_url":"https://api.github.com/repos/TEAMMATES/repo/statuses/b82cdaf7c46fa81d2c870b1a557f8685bd1bf07d","head":{"label":"TEAMMATES:4183-test-all-tests-in-testng-xml","ref":"4183-test-all-tests-in-testng-xml","sha":"b82cdaf7c46fa81d2c870b1a557f8685bd1bf07d","user":{"login":"TEAMMATES","id":7374810,"avatar_url":"https://avatars.githubusercontent.com/u/7374810?v=3","gravatar_id":"","url":"https://api.github.com/users/TEAMMATES","html_url":"https://github.com/TEAMMATES","followers_url":"https://api.github.com/users/TEAMMATES/followers","following_url":"https://api.github.com/users/TEAMMATES/following{/other_user}","gists_url":"https://api.github.com/users/TEAMMATES/gists{/gist_id}","starred_url":"https://api.github.com/users/TEAMMATES/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TEAMMATES/subscriptions","organizations_url":"https://api.github.com/users/TEAMMATES/orgs","repos_url":"https://api.github.com/users/TEAMMATES/repos","events_url":"https://api.github.com/users/TEAMMATES/events{/privacy}","received_events_url":"https://api.github.com/users/TEAMMATES/received_events","type":"Organization","site_admin":false},"repo":{"id":19369035,"name":"repo","full_name":"TEAMMATES/repo","owner":{"login":"TEAMMATES","id":7374810,"avatar_url":"https://avatars.githubusercontent.com/u/7374810?v=3","gravatar_id":"","url":"https://api.github.com/users/TEAMMATES","html_url":"https://github.com/TEAMMATES","followers_url":"https://api.github.com/users/TEAMMATES/followers","following_url":"https://api.github.com/users/TEAMMATES/following{/other_user}","gists_url":"https://api.github.com/users/TEAMMATES/gists{/gist_id}","starred_url":"https://api.github.com/users/TEAMMATES/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TEAMMATES/subscriptions","organizations_url":"https://api.github.com/users/TEAMMATES/orgs","repos_url":"https://api.github.com/users/TEAMMATES/repos","events_url":"https://api.github.com/users/TEAMMATES/events{/privacy}","received_events_url":"https://api.github.com/users/TEAMMATES/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/TEAMMATES/repo","description":"This is the project website for the TEAMMATES feedback management tool for education","fork":false,"url":"https://api.github.com/repos/TEAMMATES/repo","forks_url":"https://api.github.com/repos/TEAMMATES/repo/forks","keys_url":"https://api.github.com/repos/TEAMMATES/repo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TEAMMATES/repo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TEAMMATES/repo/teams","hooks_url":"https://api.github.com/repos/TEAMMATES/repo/hooks","issue_events_url":"https://api.github.com/repos/TEAMMATES/repo/issues/events{/number}","events_url":"https://api.github.com/repos/TEAMMATES/repo/events","assignees_url":"https://api.github.com/repos/TEAMMATES/repo/assignees{/user}","branches_url":"https://api.github.com/repos/TEAMMATES/repo/branches{/branch}","tags_url":"https://api.github.com/repos/TEAMMATES/repo/tags","blobs_url":"https://api.github.com/repos/TEAMMATES/repo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TEAMMATES/repo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TEAMMATES/repo/git/refs{/sha}","trees_url":"https://api.github.com/repos/TEAMMATES/repo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TEAMMATES/repo/statuses/{sha}","languages_url":"https://api.github.com/repos/TEAMMATES/repo/languages","stargazers_url":"https://api.github.com/repos/TEAMMATES/repo/stargazers","contributors_url":"https://api.github.com/repos/TEAMMATES/repo/contributors","subscribers_url":"https://api.github.com/repos/TEAMMATES/repo/subscribers","subscription_url":"https://api.github.com/repos/TEAMMATES/repo/subscription","commits_url":"https://api.github.com/repos/TEAMMATES/repo/commits{/sha}","git_commits_url":"https://api.github.com/repos/TEAMMATES/repo/git/commits{/sha}","comments_url":"https://api.github.com/repos/TEAMMATES/repo/comments{/number}","issue_comment_url":"https://api.github.com/repos/TEAMMATES/repo/issues/comments{/number}","contents_url":"https://api.github.com/repos/TEAMMATES/repo/contents/{+path}","compare_url":"https://api.github.com/repos/TEAMMATES/repo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TEAMMATES/repo/merges","archive_url":"https://api.github.com/repos/TEAMMATES/repo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TEAMMATES/repo/downloads","issues_url":"https://api.github.com/repos/TEAMMATES/repo/issues{/number}","pulls_url":"https://api.github.com/repos/TEAMMATES/repo/pulls{/number}","milestones_url":"https://api.github.com/repos/TEAMMATES/repo/milestones{/number}","notifications_url":"https://api.github.com/repos/TEAMMATES/repo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TEAMMATES/repo/labels{/name}","releases_url":"https://api.github.com/repos/TEAMMATES/repo/releases{/id}","created_at":"2014-05-02T07:43:00Z","updated_at":"2015-09-07T22:10:42Z","pushed_at":"2015-09-09T12:57:26Z","git_url":"git://github.com/TEAMMATES/repo.git","ssh_url":"git@github.com:TEAMMATES/repo.git","clone_url":"https://github.com/TEAMMATES/repo.git","svn_url":"https://github.com/TEAMMATES/repo","homepage":"http://teammatesv4.appspot.com/","size":159741,"stargazers_count":50,"watchers_count":50,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":128,"mirror_url":null,"open_issues_count":492,"forks":128,"open_issues":492,"watchers":50,"default_branch":"master"}},"base":{"label":"TEAMMATES:master","ref":"master","sha":"2ddc5c80a6e94891a87c0e132cc8f2d215563803","user":{"login":"TEAMMATES","id":7374810,"avatar_url":"https://avatars.githubusercontent.com/u/7374810?v=3","gravatar_id":"","url":"https://api.github.com/users/TEAMMATES","html_url":"https://github.com/TEAMMATES","followers_url":"https://api.github.com/users/TEAMMATES/followers","following_url":"https://api.github.com/users/TEAMMATES/following{/other_user}","gists_url":"https://api.github.com/users/TEAMMATES/gists{/gist_id}","starred_url":"https://api.github.com/users/TEAMMATES/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TEAMMATES/subscriptions","organizations_url":"https://api.github.com/users/TEAMMATES/orgs","repos_url":"https://api.github.com/users/TEAMMATES/repos","events_url":"https://api.github.com/users/TEAMMATES/events{/privacy}","received_events_url":"https://api.github.com/users/TEAMMATES/received_events","type":"Organization","site_admin":false},"repo":{"id":19369035,"name":"repo","full_name":"TEAMMATES/repo","owner":{"login":"TEAMMATES","id":7374810,"avatar_url":"https://avatars.githubusercontent.com/u/7374810?v=3","gravatar_id":"","url":"https://api.github.com/users/TEAMMATES","html_url":"https://github.com/TEAMMATES","followers_url":"https://api.github.com/users/TEAMMATES/followers","following_url":"https://api.github.com/users/TEAMMATES/following{/other_user}","gists_url":"https://api.github.com/users/TEAMMATES/gists{/gist_id}","starred_url":"https://api.github.com/users/TEAMMATES/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TEAMMATES/subscriptions","organizations_url":"https://api.github.com/users/TEAMMATES/orgs","repos_url":"https://api.github.com/users/TEAMMATES/repos","events_url":"https://api.github.com/users/TEAMMATES/events{/privacy}","received_events_url":"https://api.github.com/users/TEAMMATES/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/TEAMMATES/repo","description":"This is the project website for the TEAMMATES feedback management tool for education","fork":false,"url":"https://api.github.com/repos/TEAMMATES/repo","forks_url":"https://api.github.com/repos/TEAMMATES/repo/forks","keys_url":"https://api.github.com/repos/TEAMMATES/repo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TEAMMATES/repo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TEAMMATES/repo/teams","hooks_url":"https://api.github.com/repos/TEAMMATES/repo/hooks","issue_events_url":"https://api.github.com/repos/TEAMMATES/repo/issues/events{/number}","events_url":"https://api.github.com/repos/TEAMMATES/repo/events","assignees_url":"https://api.github.com/repos/TEAMMATES/repo/assignees{/user}","branches_url":"https://api.github.com/repos/TEAMMATES/repo/branches{/branch}","tags_url":"https://api.github.com/repos/TEAMMATES/repo/tags","blobs_url":"https://api.github.com/repos/TEAMMATES/repo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TEAMMATES/repo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TEAMMATES/repo/git/refs{/sha}","trees_url":"https://api.github.com/repos/TEAMMATES/repo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TEAMMATES/repo/statuses/{sha}","languages_url":"https://api.github.com/repos/TEAMMATES/repo/languages","stargazers_url":"https://api.github.com/repos/TEAMMATES/repo/stargazers","contributors_url":"https://api.github.com/repos/TEAMMATES/repo/contributors","subscribers_url":"https://api.github.com/repos/TEAMMATES/repo/subscribers","subscription_url":"https://api.github.com/repos/TEAMMATES/repo/subscription","commits_url":"https://api.github.com/repos/TEAMMATES/repo/commits{/sha}","git_commits_url":"https://api.github.com/repos/TEAMMATES/repo/git/commits{/sha}","comments_url":"https://api.github.com/repos/TEAMMATES/repo/comments{/number}","issue_comment_url":"https://api.github.com/repos/TEAMMATES/repo/issues/comments{/number}","contents_url":"https://api.github.com/repos/TEAMMATES/repo/contents/{+path}","compare_url":"https://api.github.com/repos/TEAMMATES/repo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TEAMMATES/repo/merges","archive_url":"https://api.github.com/repos/TEAMMATES/repo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TEAMMATES/repo/downloads","issues_url":"https://api.github.com/repos/TEAMMATES/repo/issues{/number}","pulls_url":"https://api.github.com/repos/TEAMMATES/repo/pulls{/number}","milestones_url":"https://api.github.com/repos/TEAMMATES/repo/milestones{/number}","notifications_url":"https://api.github.com/repos/TEAMMATES/repo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TEAMMATES/repo/labels{/name}","releases_url":"https://api.github.com/repos/TEAMMATES/repo/releases{/id}","created_at":"2014-05-02T07:43:00Z","updated_at":"2015-09-07T22:10:42Z","pushed_at":"2015-09-09T12:57:26Z","git_url":"git://github.com/TEAMMATES/repo.git","ssh_url":"git@github.com:TEAMMATES/repo.git","clone_url":"https://github.com/TEAMMATES/repo.git","svn_url":"https://github.com/TEAMMATES/repo","homepage":"http://teammatesv4.appspot.com/","size":159741,"stargazers_count":50,"watchers_count":50,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":128,"mirror_url":null,"open_issues_count":492,"forks":128,"open_issues":492,"watchers":50,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/TEAMMATES/repo/pulls/4245"},"html":{"href":"https://github.com/TEAMMATES/repo/pull/4245"},"issue":{"href":"https://api.github.com/repos/TEAMMATES/repo/issues/4245"},"comments":{"href":"https://api.github.com/repos/TEAMMATES/repo/issues/4245/comments"},"review_comments":{"href":"https://api.github.com/repos/TEAMMATES/repo/pulls/4245/comments"},"review_comment":{"href":"https://api.github.com/repos/TEAMMATES/repo/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/TEAMMATES/repo/pulls/4245/commits"},"statuses":{"href":"https://api.github.com/repos/TEAMMATES/repo/statuses/b82cdaf7c46fa81d2c870b1a557f8685bd1bf07d"}}}}