{"action":"created","issue":{"url":"https://api.github.com/repos/gotwarlost/istanbul/issues/301","labels_url":"https://api.github.com/repos/gotwarlost/istanbul/issues/301/labels{/name}","comments_url":"https://api.github.com/repos/gotwarlost/istanbul/issues/301/comments","events_url":"https://api.github.com/repos/gotwarlost/istanbul/issues/301/events","html_url":"https://github.com/gotwarlost/istanbul/issues/301","id":54944345,"number":301,"title":"Probably a dumb question but I am not getting output from \"instrument\"ed code at all","user":{"login":"bleurose","id":330104,"avatar_url":"https://avatars.githubusercontent.com/u/330104?v=3","gravatar_id":"","url":"https://api.github.com/users/bleurose","html_url":"https://github.com/bleurose","followers_url":"https://api.github.com/users/bleurose/followers","following_url":"https://api.github.com/users/bleurose/following{/other_user}","gists_url":"https://api.github.com/users/bleurose/gists{/gist_id}","starred_url":"https://api.github.com/users/bleurose/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bleurose/subscriptions","organizations_url":"https://api.github.com/users/bleurose/orgs","repos_url":"https://api.github.com/users/bleurose/repos","events_url":"https://api.github.com/users/bleurose/events{/privacy}","received_events_url":"https://api.github.com/users/bleurose/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-01-20T21:43:40Z","updated_at":"2015-01-21T00:08:54Z","closed_at":null,"body":"I read through several other issues (including closed ones) to see if I was missing something obvious and one of the issues did say that coverage for pre-instrumented code goes to \"global.\\_coverage\\_ in node\" but when I search the directory structure, I do not find any \"global.\\_coverage\\_\" directory anywhere.  \r\n\r\nHere is what I am doing:\r\n\r\n1. I have several directories with node .js files (for the moment, we will just say there are two directories called \"rest\" and \"cli\" and each has a cmd.js file.)  I want to run an integration test suite which starts both our cli listener/server and our rest listener/server.  The tests call our cli interface which in turn calls the rest interface.  The goal is to see how much coverage of our system our integration tests are providing (we already have unit test coverage but we are more interested in coverage between all of our modules which are highly interrlated).  \r\n\r\n2. I execute the following command on each directory from the upper src directory:\r\n\r\n    istanbul instrument --output rest-covered --embed-source --no-compact --preserve-comments rest\r\n    istanbul instrument --output cli-covered --embed-source --no-compact --preserve-comments cli\r\n\r\n3. I now switch the xxxx-covered and xxxx directories for each, so that the covered code ends up under the main directory name (there are other parts of our build process that depend on these names being the ones it knows about).  \r\n\r\n4. I execute the two servers with no special options.\r\n\r\n5. I shut down the servers with their appropriate \"shutdown\" commands (which shuts them down cleanly).  \r\n\r\nAt this point, nothing is written to the output streams for either server and I can't find any coverage folders (or \\_coverage\\_ folders, etc.)  \r\n\r\nBTW, when I execute EITHER of the two servers manually and independently with istanbul, i.e.:\r\n\r\n   istanbul cover rest/cmd.js ...\r\n\r\nand shut that server down properly, it gets its own \"coverage\" folder in that directory and it all works.  However, I can't execute things that way in our build system (at least I don't know how to change that easily).  Plus, my whole purpose is to get integrated coverage of all of the .js files we have (we actually have over a dozen different \"packages\" that use javascript that I need to instrument simultaneously to really make this work fully, but I've been working on a subset just to make sure I can do it at all.\r\n\r\nThanks for any help!  (I greatly appreciated your fast response to my questions.  Sorry for my ignorance, but I can't find any other documentation on how to use the instrument option.\r\n\r\nJon Rosen\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/gotwarlost/istanbul/issues/comments/70760880","html_url":"https://github.com/gotwarlost/istanbul/issues/301#issuecomment-70760880","issue_url":"https://api.github.com/repos/gotwarlost/istanbul/issues/301","id":70760880,"user":{"login":"gotwarlost","id":1056819,"avatar_url":"https://avatars.githubusercontent.com/u/1056819?v=3","gravatar_id":"","url":"https://api.github.com/users/gotwarlost","html_url":"https://github.com/gotwarlost","followers_url":"https://api.github.com/users/gotwarlost/followers","following_url":"https://api.github.com/users/gotwarlost/following{/other_user}","gists_url":"https://api.github.com/users/gotwarlost/gists{/gist_id}","starred_url":"https://api.github.com/users/gotwarlost/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gotwarlost/subscriptions","organizations_url":"https://api.github.com/users/gotwarlost/orgs","repos_url":"https://api.github.com/users/gotwarlost/repos","events_url":"https://api.github.com/users/gotwarlost/events{/privacy}","received_events_url":"https://api.github.com/users/gotwarlost/received_events","type":"User","site_admin":false},"created_at":"2015-01-21T00:08:54Z","updated_at":"2015-01-21T00:08:54Z","body":"No, `istanbul cover` hooks `require` as well so everything that is required is automatically covered."}}