{"action":"opened","issue":{"url":"https://api.github.com/repos/colszowka/simplecov/issues/585","repository_url":"https://api.github.com/repos/colszowka/simplecov","labels_url":"https://api.github.com/repos/colszowka/simplecov/issues/585/labels{/name}","comments_url":"https://api.github.com/repos/colszowka/simplecov/issues/585/comments","events_url":"https://api.github.com/repos/colszowka/simplecov/issues/585/events","html_url":"https://github.com/colszowka/simplecov/issues/585","id":230246728,"number":585,"title":"Merging results from different processes","user":{"login":"JacobEvelyn","id":1114569,"avatar_url":"https://avatars0.githubusercontent.com/u/1114569?v=3","gravatar_id":"","url":"https://api.github.com/users/JacobEvelyn","html_url":"https://github.com/JacobEvelyn","followers_url":"https://api.github.com/users/JacobEvelyn/followers","following_url":"https://api.github.com/users/JacobEvelyn/following{/other_user}","gists_url":"https://api.github.com/users/JacobEvelyn/gists{/gist_id}","starred_url":"https://api.github.com/users/JacobEvelyn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JacobEvelyn/subscriptions","organizations_url":"https://api.github.com/users/JacobEvelyn/orgs","repos_url":"https://api.github.com/users/JacobEvelyn/repos","events_url":"https://api.github.com/users/JacobEvelyn/events{/privacy}","received_events_url":"https://api.github.com/users/JacobEvelyn/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-05-21T20:31:52Z","updated_at":"2017-05-21T20:31:52Z","closed_at":null,"body":"I maintain a CLI gem whose tests are all full run-throughs of the CLI command (e.g. each tests calls something along the lines of `Open3.capture3(\"bundle exec bin/command #{args_for_test}\"` and then inspects the output to ensure it is correct).\r\n\r\nSince each possible command is tested extremely thoroughly I'd be shocked if the coverage were below 98% or so. However, SimpleCov's output tells me coverage is around 60%, so I think something is going wrong in how the results are merged together.\r\n\r\nHere's my SimpleCov setup:\r\n\r\n```ruby\r\n# In the test helper that runs once:\r\nrequire \"simplecov\"\r\npid = Process.pid\r\nSimpleCov.at_exit do\r\n  SimpleCov.result.format! if Process.pid == pid\r\nend\r\nSimpleCov.start\r\n```\r\n\r\n```ruby\r\n# In the bin/command file that is called in each test:\r\nrequire \"simplecov\"\r\nSimpleCov.command_name Process.pid # I've also tried using ARGV.join(\"\") for uniqueness here.\r\nSimpleCov.at_exit {}\r\nSimpleCov.start\r\n```\r\n\r\nWhat else am I missing that would get these results to merge correctly? If it's useful information I'm using MiniTest, and if possible I'd like to continue to be able to speed up my test suite with [minitest-parallel_fork](https://github.com/jeremyevans/minitest-parallel_fork)."}}
{"actor":{"display_login":"JacobEvelyn"}}