{"action":"created","comment":{"url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/pulls/comments/110841231","pull_request_review_id":32040741,"id":110841231,"diff_hunk":"@@ -0,0 +1,76 @@\n+package io.jenkins.blueocean.service.embedded;\n+\n+import com.google.common.collect.ImmutableSet;\n+import com.google.common.collect.Iterables;\n+import hudson.model.Run;\n+import io.jenkins.blueocean.rest.Reachable;\n+import io.jenkins.blueocean.rest.model.BlueTestResult;\n+import io.jenkins.blueocean.rest.model.BlueTestResult.State;\n+import io.jenkins.blueocean.rest.model.BlueTestResult.Status;\n+import io.jenkins.blueocean.service.embedded.rest.BlueTestResultFactory;\n+import io.jenkins.blueocean.service.embedded.rest.BlueTestResultFactory.Result;\n+import org.junit.Test;\n+import org.jvnet.hudson.test.TestExtension;\n+\n+import static junit.framework.TestCase.assertEquals;\n+import static junit.framework.TestCase.assertNotNull;\n+import static junit.framework.TestCase.assertNull;\n+import static org.mockito.Mockito.mock;\n+import static org.mockito.Mockito.when;\n+\n+public class BlueTestResultFactoryTest extends BaseTest {","path":"blueocean-rest-impl/src/test/java/io/jenkins/blueocean/service/embedded/BlueTestResultFactoryTest.java","position":21,"original_position":21,"commit_id":"556eb81d2d8ac610963d3e7eb6e1d6a3ce545eb9","original_commit_id":"556eb81d2d8ac610963d3e7eb6e1d6a3ce545eb9","user":{"login":"i386","id":50156,"avatar_url":"https://avatars1.githubusercontent.com/u/50156?v=3","gravatar_id":"","url":"https://api.github.com/users/i386","html_url":"https://github.com/i386","followers_url":"https://api.github.com/users/i386/followers","following_url":"https://api.github.com/users/i386/following{/other_user}","gists_url":"https://api.github.com/users/i386/gists{/gist_id}","starred_url":"https://api.github.com/users/i386/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/i386/subscriptions","organizations_url":"https://api.github.com/users/i386/orgs","repos_url":"https://api.github.com/users/i386/repos","events_url":"https://api.github.com/users/i386/events{/privacy}","received_events_url":"https://api.github.com/users/i386/received_events","type":"User","site_admin":false},"body":"@vivek tests for the `BlueTestResultFactory`","created_at":"2017-04-11T08:27:38Z","updated_at":"2017-04-11T08:27:38Z","html_url":"https://github.com/jenkinsci/blueocean-plugin/pull/950#discussion_r110841231","pull_request_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/pulls/950","_links":{"self":{"href":"https://api.github.com/repos/jenkinsci/blueocean-plugin/pulls/comments/110841231"},"html":{"href":"https://github.com/jenkinsci/blueocean-plugin/pull/950#discussion_r110841231"},"pull_request":{"href":"https://api.github.com/repos/jenkinsci/blueocean-plugin/pulls/950"}}},"pull_request":{"url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/pulls/950","id":114717601,"html_url":"https://github.com/jenkinsci/blueocean-plugin/pull/950","diff_url":"https://github.com/jenkinsci/blueocean-plugin/pull/950.diff","patch_url":"https://github.com/jenkinsci/blueocean-plugin/pull/950.patch","issue_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/issues/950","number":950,"state":"open","locked":false,"title":"Implement new REST API for test results","user":{"login":"i386","id":50156,"avatar_url":"https://avatars1.githubusercontent.com/u/50156?v=3","gravatar_id":"","url":"https://api.github.com/users/i386","html_url":"https://github.com/i386","followers_url":"https://api.github.com/users/i386/followers","following_url":"https://api.github.com/users/i386/following{/other_user}","gists_url":"https://api.github.com/users/i386/gists{/gist_id}","starred_url":"https://api.github.com/users/i386/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/i386/subscriptions","organizations_url":"https://api.github.com/users/i386/orgs","repos_url":"https://api.github.com/users/i386/repos","events_url":"https://api.github.com/users/i386/events{/privacy}","received_events_url":"https://api.github.com/users/i386/received_events","type":"User","site_admin":false},"body":"# Description\r\n* Support any test plugin using the generic test API [JENKINS-41281](https://issues.jenkins-ci.org/browse/JENKINS-41281)\r\n* Does not send back stdout/stderr logs in the response [JENKINS-41585](https://issues.jenkins-ci.org/browse/JENKINS-41585)\r\n* Allow tests to be paginated - this was not possible with the test action [JENKINS-38054](https://issues.jenkins-ci.org/browse/JENKINS-38054)\r\n* Add test summary on Blue Run to avoid secondary fetches (optimization)\r\n\r\n# To do\r\n- [x] Outline new pluggable REST API\r\n- [x] Add test summary object to BlueRun\r\n- [x] Update UI so that only `FAILED` or `SKIPPED` tests are returned in JSON response \r\n- [ ] Write tests for proposed REST API\r\n- [x] Test this works with top 5 test reporting plugins\r\n- [x] Update UI code to use new endpoint\r\n\r\n# Moved to another ticket\r\n- [ ] Update UI code to use REST API pagination \r\n\r\n# Submitter checklist\r\n- [ ] Link to JIRA ticket in description, if appropriate.\r\n- [ ] Change is code complete and matches issue description\r\n- [ ] Appropriate unit or acceptance tests or explanation to why this change has no tests\r\n- [ ] Reviewer's manual test instructions provided in PR description. See Reviewer's first task below.\r\n- [ ] Ran Acceptance Test Harness against PR changes.\r\n\r\n# Reviewer checklist\r\n- [ ] Run the changes and verified the change matches the issue description\r\n- [ ] Reviewed the code\r\n- [ ] Verified that the appropriate tests have been written or valid explanation given\r\n\r\n","created_at":"2017-04-06T23:39:00Z","updated_at":"2017-04-11T08:27:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3b77f1a04057067f62f56f77789e35aca83d39bd","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/pulls/950/commits","review_comments_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/pulls/950/comments","review_comment_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/issues/950/comments","statuses_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/statuses/556eb81d2d8ac610963d3e7eb6e1d6a3ce545eb9","head":{"label":"jenkinsci:topic/test-rest-api","ref":"topic/test-rest-api","sha":"556eb81d2d8ac610963d3e7eb6e1d6a3ce545eb9","user":{"login":"jenkinsci","id":107424,"avatar_url":"https://avatars3.githubusercontent.com/u/107424?v=3","gravatar_id":"","url":"https://api.github.com/users/jenkinsci","html_url":"https://github.com/jenkinsci","followers_url":"https://api.github.com/users/jenkinsci/followers","following_url":"https://api.github.com/users/jenkinsci/following{/other_user}","gists_url":"https://api.github.com/users/jenkinsci/gists{/gist_id}","starred_url":"https://api.github.com/users/jenkinsci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jenkinsci/subscriptions","organizations_url":"https://api.github.com/users/jenkinsci/orgs","repos_url":"https://api.github.com/users/jenkinsci/repos","events_url":"https://api.github.com/users/jenkinsci/events{/privacy}","received_events_url":"https://api.github.com/users/jenkinsci/received_events","type":"Organization","site_admin":false},"repo":{"id":50250915,"name":"blueocean-plugin","full_name":"jenkinsci/blueocean-plugin","owner":{"login":"jenkinsci","id":107424,"avatar_url":"https://avatars3.githubusercontent.com/u/107424?v=3","gravatar_id":"","url":"https://api.github.com/users/jenkinsci","html_url":"https://github.com/jenkinsci","followers_url":"https://api.github.com/users/jenkinsci/followers","following_url":"https://api.github.com/users/jenkinsci/following{/other_user}","gists_url":"https://api.github.com/users/jenkinsci/gists{/gist_id}","starred_url":"https://api.github.com/users/jenkinsci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jenkinsci/subscriptions","organizations_url":"https://api.github.com/users/jenkinsci/orgs","repos_url":"https://api.github.com/users/jenkinsci/repos","events_url":"https://api.github.com/users/jenkinsci/events{/privacy}","received_events_url":"https://api.github.com/users/jenkinsci/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/jenkinsci/blueocean-plugin","description":"Blue Ocean is a reboot of the Jenkins CI/CD User Experience","fork":false,"url":"https://api.github.com/repos/jenkinsci/blueocean-plugin","forks_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/forks","keys_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/teams","hooks_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/hooks","issue_events_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/issues/events{/number}","events_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/events","assignees_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/assignees{/user}","branches_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/branches{/branch}","tags_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/tags","blobs_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/statuses/{sha}","languages_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/languages","stargazers_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/stargazers","contributors_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/contributors","subscribers_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/subscribers","subscription_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/subscription","commits_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/contents/{+path}","compare_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/merges","archive_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/downloads","issues_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/issues{/number}","pulls_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/pulls{/number}","milestones_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/milestones{/number}","notifications_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/labels{/name}","releases_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/releases{/id}","deployments_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/deployments","created_at":"2016-01-23T18:02:45Z","updated_at":"2017-04-11T07:04:14Z","pushed_at":"2017-04-11T08:27:05Z","git_url":"git://github.com/jenkinsci/blueocean-plugin.git","ssh_url":"git@github.com:jenkinsci/blueocean-plugin.git","clone_url":"https://github.com/jenkinsci/blueocean-plugin.git","svn_url":"https://github.com/jenkinsci/blueocean-plugin","homepage":"https://jenkins.io/projects/blueocean/","size":12572,"stargazers_count":1795,"watchers_count":1795,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":187,"mirror_url":null,"open_issues_count":11,"forks":187,"open_issues":11,"watchers":1795,"default_branch":"master"}},"base":{"label":"jenkinsci:master","ref":"master","sha":"00e74a8795da80a315d467ccb0b6a6598319599c","user":{"login":"jenkinsci","id":107424,"avatar_url":"https://avatars3.githubusercontent.com/u/107424?v=3","gravatar_id":"","url":"https://api.github.com/users/jenkinsci","html_url":"https://github.com/jenkinsci","followers_url":"https://api.github.com/users/jenkinsci/followers","following_url":"https://api.github.com/users/jenkinsci/following{/other_user}","gists_url":"https://api.github.com/users/jenkinsci/gists{/gist_id}","starred_url":"https://api.github.com/users/jenkinsci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jenkinsci/subscriptions","organizations_url":"https://api.github.com/users/jenkinsci/orgs","repos_url":"https://api.github.com/users/jenkinsci/repos","events_url":"https://api.github.com/users/jenkinsci/events{/privacy}","received_events_url":"https://api.github.com/users/jenkinsci/received_events","type":"Organization","site_admin":false},"repo":{"id":50250915,"name":"blueocean-plugin","full_name":"jenkinsci/blueocean-plugin","owner":{"login":"jenkinsci","id":107424,"avatar_url":"https://avatars3.githubusercontent.com/u/107424?v=3","gravatar_id":"","url":"https://api.github.com/users/jenkinsci","html_url":"https://github.com/jenkinsci","followers_url":"https://api.github.com/users/jenkinsci/followers","following_url":"https://api.github.com/users/jenkinsci/following{/other_user}","gists_url":"https://api.github.com/users/jenkinsci/gists{/gist_id}","starred_url":"https://api.github.com/users/jenkinsci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jenkinsci/subscriptions","organizations_url":"https://api.github.com/users/jenkinsci/orgs","repos_url":"https://api.github.com/users/jenkinsci/repos","events_url":"https://api.github.com/users/jenkinsci/events{/privacy}","received_events_url":"https://api.github.com/users/jenkinsci/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/jenkinsci/blueocean-plugin","description":"Blue Ocean is a reboot of the Jenkins CI/CD User Experience","fork":false,"url":"https://api.github.com/repos/jenkinsci/blueocean-plugin","forks_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/forks","keys_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/teams","hooks_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/hooks","issue_events_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/issues/events{/number}","events_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/events","assignees_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/assignees{/user}","branches_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/branches{/branch}","tags_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/tags","blobs_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/statuses/{sha}","languages_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/languages","stargazers_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/stargazers","contributors_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/contributors","subscribers_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/subscribers","subscription_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/subscription","commits_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/contents/{+path}","compare_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/merges","archive_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/downloads","issues_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/issues{/number}","pulls_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/pulls{/number}","milestones_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/milestones{/number}","notifications_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/labels{/name}","releases_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/releases{/id}","deployments_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/deployments","created_at":"2016-01-23T18:02:45Z","updated_at":"2017-04-11T07:04:14Z","pushed_at":"2017-04-11T08:27:05Z","git_url":"git://github.com/jenkinsci/blueocean-plugin.git","ssh_url":"git@github.com:jenkinsci/blueocean-plugin.git","clone_url":"https://github.com/jenkinsci/blueocean-plugin.git","svn_url":"https://github.com/jenkinsci/blueocean-plugin","homepage":"https://jenkins.io/projects/blueocean/","size":12572,"stargazers_count":1795,"watchers_count":1795,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":187,"mirror_url":null,"open_issues_count":11,"forks":187,"open_issues":11,"watchers":1795,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jenkinsci/blueocean-plugin/pulls/950"},"html":{"href":"https://github.com/jenkinsci/blueocean-plugin/pull/950"},"issue":{"href":"https://api.github.com/repos/jenkinsci/blueocean-plugin/issues/950"},"comments":{"href":"https://api.github.com/repos/jenkinsci/blueocean-plugin/issues/950/comments"},"review_comments":{"href":"https://api.github.com/repos/jenkinsci/blueocean-plugin/pulls/950/comments"},"review_comment":{"href":"https://api.github.com/repos/jenkinsci/blueocean-plugin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jenkinsci/blueocean-plugin/pulls/950/commits"},"statuses":{"href":"https://api.github.com/repos/jenkinsci/blueocean-plugin/statuses/556eb81d2d8ac610963d3e7eb6e1d6a3ce545eb9"}}}}
{"actor":{"display_login":"i386"}}