{"action":"created","issue":{"url":"https://api.github.com/repos/apache/commons-lang/issues/171","repository_url":"https://api.github.com/repos/apache/commons-lang","labels_url":"https://api.github.com/repos/apache/commons-lang/issues/171/labels{/name}","comments_url":"https://api.github.com/repos/apache/commons-lang/issues/171/comments","events_url":"https://api.github.com/repos/apache/commons-lang/issues/171/events","html_url":"https://github.com/apache/commons-lang/pull/171","id":165839168,"number":171,"title":"Removing test redundant for org.apache.commons.lang3.ClassUtilsTest.testWrapperToPrimitiveNoWrapper","user":{"login":"TestSuiteReductionResearch","id":20469862,"avatar_url":"https://avatars.githubusercontent.com/u/20469862?v=3","gravatar_id":"","url":"https://api.github.com/users/TestSuiteReductionResearch","html_url":"https://github.com/TestSuiteReductionResearch","followers_url":"https://api.github.com/users/TestSuiteReductionResearch/followers","following_url":"https://api.github.com/users/TestSuiteReductionResearch/following{/other_user}","gists_url":"https://api.github.com/users/TestSuiteReductionResearch/gists{/gist_id}","starred_url":"https://api.github.com/users/TestSuiteReductionResearch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TestSuiteReductionResearch/subscriptions","organizations_url":"https://api.github.com/users/TestSuiteReductionResearch/orgs","repos_url":"https://api.github.com/users/TestSuiteReductionResearch/repos","events_url":"https://api.github.com/users/TestSuiteReductionResearch/events{/privacy}","received_events_url":"https://api.github.com/users/TestSuiteReductionResearch/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-07-15T17:32:48Z","updated_at":"2016-07-15T21:02:07Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/commons-lang/pulls/171","html_url":"https://github.com/apache/commons-lang/pull/171","diff_url":"https://github.com/apache/commons-lang/pull/171.diff","patch_url":"https://github.com/apache/commons-lang/pull/171.patch"},"body":"We are researchers working on identifying redundant tests in a test suite. Our analysis of finding redundant tests involve each test's dynamic code coverage and their potential fault-detection capability.\n\nThrough our analysis, we found that the tests org.apache.commons.lang3.ClassUtilsTest.testWrapperToPrimitiveNoWrapper, org.apache.commons.lang3.ClassUtilsTest.testWrapperToPrimitiveNull are redundant with respect to one another. In this pull request, we are proposing to keep only the test org.apache.commons.lang3.ClassUtilsTest.testWrapperToPrimitiveNoWrapper while adding @Ignore annotations to the remaining test. However, as we believe these tests are identical, any one of them can be kept while skipping the remaining test.\n\nIf you do not believe any of these tests should be ignored, we would greatly appreciate it if you could follow up on this pull request and let us know your reasons."},"comment":{"url":"https://api.github.com/repos/apache/commons-lang/issues/comments/233069030","html_url":"https://github.com/apache/commons-lang/pull/171#issuecomment-233069030","issue_url":"https://api.github.com/repos/apache/commons-lang/issues/171","id":233069030,"user":{"login":"kinow","id":304786,"avatar_url":"https://avatars.githubusercontent.com/u/304786?v=3","gravatar_id":"","url":"https://api.github.com/users/kinow","html_url":"https://github.com/kinow","followers_url":"https://api.github.com/users/kinow/followers","following_url":"https://api.github.com/users/kinow/following{/other_user}","gists_url":"https://api.github.com/users/kinow/gists{/gist_id}","starred_url":"https://api.github.com/users/kinow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kinow/subscriptions","organizations_url":"https://api.github.com/users/kinow/orgs","repos_url":"https://api.github.com/users/kinow/repos","events_url":"https://api.github.com/users/kinow/events{/privacy}","received_events_url":"https://api.github.com/users/kinow/received_events","type":"User","site_admin":false},"created_at":"2016-07-15T21:02:07Z","updated_at":"2016-07-15T21:02:07Z","body":"Both tests use ClassUtils#wrapperToPrimitive. One passes a String.class, and the other a null value. Then the method looks at a map, created and filled in a static constructor. \r\n\r\nSince String.class is not in the map, it returns a null value.\r\n\r\nThen trying to get a value for the key null, also returns a null value.\r\n\r\nI agree that, considering code coverage, both tests are redundant. But they are assessing two different things, as defined in the method names. One assessing that asking for null will return a null. And the other that requesting an element that is not in the map also returns null.\r\n\r\nEven though they may be redundant now, something may change in the future, and having tests covering scenarios, regardless of coverage, is a good thing too.\r\n\r\n>If you do not believe any of these tests should be ignored, we would greatly appreciate it if you could follow up on this pull request and let us know your reasons.\r\n\r\nSo for this, I'm -1 for removing the test based only on coverage. They may be redundant, looking from a test coverage perspective, but as a developer using that method, I expect to be able to quickly understand what's going to happen in each scenario I use it. Tests and Javadoc with some examples, covering these scenarios, can be extremely useful."}}
{"actor":{"display_login":"kinow"}}