{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/vscode/issues/9505","repository_url":"https://api.github.com/repos/Microsoft/vscode","labels_url":"https://api.github.com/repos/Microsoft/vscode/issues/9505/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/vscode/issues/9505/comments","events_url":"https://api.github.com/repos/Microsoft/vscode/issues/9505/events","html_url":"https://github.com/Microsoft/vscode/issues/9505","id":166436013,"number":9505,"title":"Test Runner Viewlet with an Extension API to plug into [Enhancement Request]","user":{"login":"cloudRoutine","id":680051,"avatar_url":"https://avatars.githubusercontent.com/u/680051?v=3","gravatar_id":"","url":"https://api.github.com/users/cloudRoutine","html_url":"https://github.com/cloudRoutine","followers_url":"https://api.github.com/users/cloudRoutine/followers","following_url":"https://api.github.com/users/cloudRoutine/following{/other_user}","gists_url":"https://api.github.com/users/cloudRoutine/gists{/gist_id}","starred_url":"https://api.github.com/users/cloudRoutine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cloudRoutine/subscriptions","organizations_url":"https://api.github.com/users/cloudRoutine/orgs","repos_url":"https://api.github.com/users/cloudRoutine/repos","events_url":"https://api.github.com/users/cloudRoutine/events{/privacy}","received_events_url":"https://api.github.com/users/cloudRoutine/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-07-19T21:08:08Z","updated_at":"2016-07-19T21:36:42Z","closed_at":null,"body":"[In response to Erich Gamma's tweet](https://twitter.com/ErichGamma/status/755437588291485697) @Krzysztof-Cieslak\r\n\r\nA test runner viewlet/sidebar with a pluggable API would be a great addition to vscode. \r\n\r\nThe viewlet should include visual indications of \r\n- the progress of completed tests out of the set of tests being run\r\n- visual indicators or icons showing basic tests states at the least \r\n`not run |  success | failure | ignored/skipped`\r\n\r\n![](http://i.imgur.com/Rt4uw9S.png)\r\n\r\nThe test runner should be able to provide a set of sorting categories and repopulate the viewlet based on the users selection\r\n\r\n![](http://i.imgur.com/MhP5Elk.png)\r\n\r\nA query box with the ability to filter the tests based on the names shown in the runner's list at a minimum, with the ability for the underlying runner to populate a set of query filters.\r\n\r\n![](http://i.imgur.com/062i5zz.png)\r\n\r\n\r\nInstead of the VS style of collapsing categories\r\n\r\n![](http://i.imgur.com/GivhUBv.png)\r\n\r\nI think the vscode style used in the debugger viewlet is much nicer :smile: \r\n\r\n![](http://i.imgur.com/iOFmimd.png)\r\n\r\nA button could be used to select which test runner you want to use out of the test runner extensions that have been installed\r\n\r\n![](http://i.imgur.com/7P5ljMa.png)\r\n\r\nBut a dropdown menu would work too\r\n\r\n![](http://i.imgur.com/KA1fG2r.png)\r\n\r\nA side button to open a menu could enable the active test runner to populate it with any additional commands specific to its functionality \r\n\r\n![](http://i.imgur.com/QDh2Wu3.png)\r\n\r\nSome other functionality points -\r\n* When an individual test is selected the result could be rendered in the output panel\r\n* An icon/button to run all tests\r\n* The ability to highlight/select a set of tests and only run those tests \r\n* A basic set of run options, which individual runners might be able to extend  \r\n![](http://i.imgur.com/BkYPZfB.png)\r\n* Tests outputs can contain links to specific points in source code\r\n* Debugging specific tests (would be awesome, but understandable if this is too difficult for an initial implementation)\r\n* Associate test runner extensions with specific languages?\r\n* Test playlists (would be nice, but not especially important)\r\n* Ability to specify a task/trigger that will repopulate the viewlet's list of tests\r\n* Dropdown menu that the test runner can population with platform/environment/runtime configurations to use during test execution."},"comment":{"url":"https://api.github.com/repos/Microsoft/vscode/issues/comments/233773995","html_url":"https://github.com/Microsoft/vscode/issues/9505#issuecomment-233773995","issue_url":"https://api.github.com/repos/Microsoft/vscode/issues/9505","id":233773995,"user":{"login":"Krzysztof-Cieslak","id":5427083,"avatar_url":"https://avatars.githubusercontent.com/u/5427083?v=3","gravatar_id":"","url":"https://api.github.com/users/Krzysztof-Cieslak","html_url":"https://github.com/Krzysztof-Cieslak","followers_url":"https://api.github.com/users/Krzysztof-Cieslak/followers","following_url":"https://api.github.com/users/Krzysztof-Cieslak/following{/other_user}","gists_url":"https://api.github.com/users/Krzysztof-Cieslak/gists{/gist_id}","starred_url":"https://api.github.com/users/Krzysztof-Cieslak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Krzysztof-Cieslak/subscriptions","organizations_url":"https://api.github.com/users/Krzysztof-Cieslak/orgs","repos_url":"https://api.github.com/users/Krzysztof-Cieslak/repos","events_url":"https://api.github.com/users/Krzysztof-Cieslak/events{/privacy}","received_events_url":"https://api.github.com/users/Krzysztof-Cieslak/received_events","type":"User","site_admin":false},"created_at":"2016-07-19T21:36:42Z","updated_at":"2016-07-19T21:36:42Z","body":"Few ideas, all just IMHO, may be totally wrong ;)\r\n\r\n---\r\n\r\nI believe that test adapters should have their separate extension point just like debuggers.\r\n\r\nAlso creating nice, lightweight UI (as described above) would be really great, there is enough place on left panel for one more button ;)\r\n\r\n--- \r\n\r\nFrom the API point of view I think we would need:\r\n\r\n1. Function which returns list of tests for current workspace\r\n2. Define when the test list is repopulated (for some frameworks it can be really dynamic, other requires file saving or even recompilation... all depending on tool and language)\r\n3. Function which takes list of tests and returns their results\r\n4. I guess result should have some kind of standard category - Passed, Failed, Not Run, Ignored\r\n\r\nButtons to run all tests / selected tests / single test / previously not passed  tests etc. would all execute function 3. just with appropriate list of tests based on chosen command, selection in UI, and previous result category.\r\n\r\n---\r\n\r\n> A basic set of run options, which individual runners might be able to extend\r\n\r\nBasic run options could be easily handled by VSCode (as I've described earlier). Getting API for providing custom options / list could be nice but it's definitely not necessary for initial implementation\r\n\r\n\r\n> Debugging specific tests (would be awesome, but understandable if this is too difficult for an initial implementation)\r\n\r\nIt's possible to execute start debugging using `vscode.startDebug` it's just matter of defining which debugger should be started and with what configuration \r\n\r\nOpen question, should it be defined by test adapter creator or by end user?\r\n\r\n> Associate test runner extensions with specific languages?\r\n\r\nI'd say so - probably just for sake of lazy extension activation. If language supported by test adapter appears in current workspace active test runner.  \r\n\r\n> Ability to specify a task/trigger that will repopulate the viewlet's list of tests\r\n\r\nThat's actually really interesting case, for most APIs right now VSCode decide when to recalculate things and call implemented API again. \r\n\r\n> Dropdown menu that the test runner can population with platform/environment/runtime configurations to use during test execution.\r\n\r\nI'd like to see something similar to debug case where we have dropdown to select different debugging configurations - different configs specified in `launch.json` (in case of debuggers, we could have similar file for test adapters)\r\n"}}
{"actor":{"display_login":"Krzysztof-Cieslak"}}