{"action":"created","issue":{"url":"https://api.github.com/repos/yegor256/jpeek/issues/164","repository_url":"https://api.github.com/repos/yegor256/jpeek","labels_url":"https://api.github.com/repos/yegor256/jpeek/issues/164/labels{/name}","comments_url":"https://api.github.com/repos/yegor256/jpeek/issues/164/comments","events_url":"https://api.github.com/repos/yegor256/jpeek/issues/164/events","html_url":"https://github.com/yegor256/jpeek/issues/164","id":295906647,"number":164,"title":"The way the metric tests are set up is broken: slows down development of the project as a whole","user":{"login":"llorllale","id":2019896,"avatar_url":"https://avatars1.githubusercontent.com/u/2019896?v=4","gravatar_id":"","url":"https://api.github.com/users/llorllale","html_url":"https://github.com/llorllale","followers_url":"https://api.github.com/users/llorllale/followers","following_url":"https://api.github.com/users/llorllale/following{/other_user}","gists_url":"https://api.github.com/users/llorllale/gists{/gist_id}","starred_url":"https://api.github.com/users/llorllale/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/llorllale/subscriptions","organizations_url":"https://api.github.com/users/llorllale/orgs","repos_url":"https://api.github.com/users/llorllale/repos","events_url":"https://api.github.com/users/llorllale/events{/privacy}","received_events_url":"https://api.github.com/users/llorllale/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-02-09T15:23:40Z","updated_at":"2018-02-11T17:34:01Z","closed_at":"2018-02-11T17:33:39Z","author_association":"CONTRIBUTOR","body":"**Problem**\r\nWe're currently adding all tests for all metrics inside the same test fixture in `MetricsTest`. This can unnecessarily create coupling between tests which then turns into impediments.\r\n\r\nExample 1:\r\nThe [job](https://github.com/yegor256/jpeek/issues/93) asking for implementation of NHD. The [decision](https://github.com/yegor256/jpeek/issues/102) was made to use a certain value that happens to be incompatible with the current test fixture. A [puzzle](https://github.com/yegor256/jpeek/issues/121) was left to add those test cases later. This puzzle shouldn't have been required in the first place if the tests would've been implemented separately.\r\n\r\nExample 2:\r\nAdding [method-method interactions](https://github.com/yegor256/jpeek/issues/106) is introducing extra `<op>` which consequently breaks some existing tests, leading one to then have to create a puzzle to fix those later.\r\n\r\n[EDIT]\r\nAnother symptom of this problem is that I keep having to constantly solve merge conflicts on my PRs long after I initially delivered them\r\n\r\n**Proposal**\r\nLet's separate tests for each metric. Each metric can have its own test class (eg. `NhdTest`) with its own `@Test` methods. Each metric should also have its own set of test resources in its own folder, separate from the rest (eg. `org.jpeek.samples.nhd`). \r\n\r\nAny reusable test functionality could be refactored into its own \"helper\" class in the test packages.\r\n"},"comment":{"url":"https://api.github.com/repos/yegor256/jpeek/issues/comments/364770126","html_url":"https://github.com/yegor256/jpeek/issues/164#issuecomment-364770126","issue_url":"https://api.github.com/repos/yegor256/jpeek/issues/164","id":364770126,"user":{"login":"0crat","id":24387511,"avatar_url":"https://avatars1.githubusercontent.com/u/24387511?v=4","gravatar_id":"","url":"https://api.github.com/users/0crat","html_url":"https://github.com/0crat","followers_url":"https://api.github.com/users/0crat/followers","following_url":"https://api.github.com/users/0crat/following{/other_user}","gists_url":"https://api.github.com/users/0crat/gists{/gist_id}","starred_url":"https://api.github.com/users/0crat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/0crat/subscriptions","organizations_url":"https://api.github.com/users/0crat/orgs","repos_url":"https://api.github.com/users/0crat/repos","events_url":"https://api.github.com/users/0crat/events{/privacy}","received_events_url":"https://api.github.com/users/0crat/received_events","type":"User","site_admin":false},"created_at":"2018-02-11T17:34:01Z","updated_at":"2018-02-11T17:34:01Z","author_association":"COLLABORATOR","body":"Job `gh:yegor256/jpeek#164` is not assigned, can't get start time\n\n<!-- claim_id: 421733171, version: 1.0-SNAPSHOT, hash: aa4e4185 -->"}}
{"actor":{"display_login":"0crat"}}