{"action":"created","issue":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/11885","labels_url":"https://api.github.com/repos/JuliaLang/julia/issues/11885/labels{/name}","comments_url":"https://api.github.com/repos/JuliaLang/julia/issues/11885/comments","events_url":"https://api.github.com/repos/JuliaLang/julia/issues/11885/events","html_url":"https://github.com/JuliaLang/julia/issues/11885","id":91362541,"number":11885,"title":"The Push for 80% Test Coverage","user":{"login":"kshyatt","id":828643,"avatar_url":"https://avatars.githubusercontent.com/u/828643?v=3","gravatar_id":"","url":"https://api.github.com/users/kshyatt","html_url":"https://github.com/kshyatt","followers_url":"https://api.github.com/users/kshyatt/followers","following_url":"https://api.github.com/users/kshyatt/following{/other_user}","gists_url":"https://api.github.com/users/kshyatt/gists{/gist_id}","starred_url":"https://api.github.com/users/kshyatt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kshyatt/subscriptions","organizations_url":"https://api.github.com/users/kshyatt/orgs","repos_url":"https://api.github.com/users/kshyatt/repos","events_url":"https://api.github.com/users/kshyatt/events{/privacy}","received_events_url":"https://api.github.com/users/kshyatt/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/JuliaLang/julia/labels/intro%20issue","name":"intro issue","color":"0052cc"},{"url":"https://api.github.com/repos/JuliaLang/julia/labels/test","name":"test","color":"e102d8"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":48,"created_at":"2015-06-26T21:04:49Z","updated_at":"2015-07-08T13:37:54Z","closed_at":null,"body":"# The testing situation right now\r\nThe latest [Coveralls run](https://coveralls.io/builds/2869755) shows a test coverage percentage of 78.46%. This is very close to the 80% that will put us out of the red. Following the great work at #9493, I'd like to push for the yellow badge for 0.4. @ViralBShah asked us to open new issues rather than keep accumulating comments over there. There are many files in Julia which are poorly covered, but some are more target-rich than others. In particular, the 12 files with the most lines missed are:\r\n\r\n- [ ] `base/multi.jl` - 348 lines missed\r\n- [ ] `base/pkg/entry.jl` - 296 lines missed\r\n- [ ] `base/linalg/lapack.jl` - ~~293 lines missed~~ - 256 lines missed\r\n- [ ] `base/printf.jl` - 218 lines missed\r\n- [ ] `base/show.jl` - 215 lines missed\r\n- [ ] `base/LineEdit.jl` - 199 lines missed\r\n- [x] `base/abstractarray.jl` - 196 lines missed - claimed by @davidagold \r\n- [ ] `base/REPL.jl` - 186 lines missed\r\n- [ ] `base/stream.jl` - 164 lines missed\r\n- [x] `base/interactiveutil.jl` - 154 lines missed - claimed by @Rory-Finnegan \r\n- [ ] `base/string.jl` - 139 lines missed\r\n- [x] `base/int.jl` - 127 lines missed - claimed by @dpsanders \r\n\r\nTo get to 80% coverage, we need to cover ~~**555**~~ **187** lines. If we focus on the above 12 files, we can drastically improve their coverage and Julia's at once. I also like this set because there's a good spread across Julia functionality - linear algebra, strings, parallel processing, the REPL, etc.\r\n\r\n# File specifics\r\n\r\n`lapack.jl` is the file I know best. There are many functions wrapped in there that \"can't\" be tested right now because they require matrix storage formats that Julia doesn't support, like banded or RFP. But there are also functions that do complicated factorizations that can be difficult to test without a lot of domain expertise. Linear algebra experts welcome!\r\n\r\n`multi.jl`, the file in the worst state, has many methods for starting/stopping/talking to workers that have not been tested at all. Maybe this is an issue with the buildbots that @tkelman or @staticfloat can clarify more?\r\n\r\nIn general the state of the REPL testing is quite poor. If someone would like to familiarize themselves with the REPL internals writing these tests would be a wonderful way to do so.\r\n\r\n`abstractarray.jl` has some generated methods (the `_unsafe_{get/set}index` methods) that have big untested code branches and a few methods that tests don't touch at all. \r\n\r\n# How you can help\r\n\r\nIf there's an area in the above list you have some expertise in or want to learn more about, feel free to \"claim\" the file and start testing the heck out of it! That's how I got involved in the linear algebra testing and it worked out pretty well :wink:. The first set of tests was the hardest to write, but following the instructions in the OP of #9493 will get you most of the way there. You absolutely do not need to read the following 150+ comments! Following the [Coveralls repo](https://coveralls.io/r/JuliaLang/julia) is a good way to track our progress, and you will be able to see your numbers go up.\r\n\r\nIf someone claims a file as their testing baby, I will check it off in the list above. If there's no checkbox, that file is up for grabs and in need of some awesome Julians, newbies or experienced, to write some tests for it!\r\n\r\nWe now have a Gitter chat-room: https://gitter.im/kshyatt/julia-coverage\r\n\r\n# \"Help! I'm a first time contributor and I have no idea how to use Coveralls!\"\r\n\r\nHere's a step-by-step image guide to how I find things to test using Coveralls.\r\n\r\n1. Click on the latest build on the JuliaLang julia repo on Coveralls\r\n![step1](https://cloud.githubusercontent.com/assets/828643/8471763/4775e592-2050-11e5-9c3f-ceab030153cb.png)\r\n2. Coveralls by default doesn't show us a lot of files. Let's change that.\r\n![step2](https://cloud.githubusercontent.com/assets/828643/8471870/27b0fa16-2051-11e5-9d9a-3b3435ba575d.png)\r\n3. Let's view 100 files per page. Since Julia base has about 220 files, we can capture all the ones in the worst state this way\r\n![step3](https://cloud.githubusercontent.com/assets/828643/8471878/3ac5a35e-2051-11e5-829e-61a1b006fc84.png)\r\n4. Now let's look at all the files in Julia, rather than just the ones changed in the latest merge\r\n![step4](https://cloud.githubusercontent.com/assets/828643/8471885/496cd4d6-2051-11e5-9885-faaea1279308.png)\r\n5. `lapack.jl` here is in a bad state. Look at all those missed lines! Let's click on it and find something to test.\r\n![step5](https://cloud.githubusercontent.com/assets/828643/8471892/5d3ab776-2051-11e5-8266-a77cb6567894.png)\r\n6. Here's a line in red that's not tested. It's an error throw, which are often missed. Writing a test for this functionality should be pretty simple. \r\n![step6](https://cloud.githubusercontent.com/assets/828643/8471898/6ce7bb7e-2051-11e5-9f10-2b39439d63d7.png)\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/comments/119581771","html_url":"https://github.com/JuliaLang/julia/issues/11885#issuecomment-119581771","issue_url":"https://api.github.com/repos/JuliaLang/julia/issues/11885","id":119581771,"user":{"login":"ScottPJones","id":11798751,"avatar_url":"https://avatars.githubusercontent.com/u/11798751?v=3","gravatar_id":"","url":"https://api.github.com/users/ScottPJones","html_url":"https://github.com/ScottPJones","followers_url":"https://api.github.com/users/ScottPJones/followers","following_url":"https://api.github.com/users/ScottPJones/following{/other_user}","gists_url":"https://api.github.com/users/ScottPJones/gists{/gist_id}","starred_url":"https://api.github.com/users/ScottPJones/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ScottPJones/subscriptions","organizations_url":"https://api.github.com/users/ScottPJones/orgs","repos_url":"https://api.github.com/users/ScottPJones/repos","events_url":"https://api.github.com/users/ScottPJones/events{/privacy}","received_events_url":"https://api.github.com/users/ScottPJones/received_events","type":"User","site_admin":false},"created_at":"2015-07-08T13:37:54Z","updated_at":"2015-07-08T13:37:54Z","body":"Check out my PR #11976, where I added tests for deprecated functions.\r\nIt was a bit tricky, because you need to handle the fact that when `Base.runtests()` does tests using workers, they have `depwarn == 2`, but if you do `Base.runtests(\"deprecated\")` from the REPL, `depwarn` is whatever you have set (normally 1)."}}