{"action":"created","issue":{"url":"https://api.github.com/repos/rstudio/rstudio/issues/2452","repository_url":"https://api.github.com/repos/rstudio/rstudio","labels_url":"https://api.github.com/repos/rstudio/rstudio/issues/2452/labels{/name}","comments_url":"https://api.github.com/repos/rstudio/rstudio/issues/2452/comments","events_url":"https://api.github.com/repos/rstudio/rstudio/issues/2452/events","html_url":"https://github.com/rstudio/rstudio/pull/2452","id":306675548,"number":2452,"title":"Improvements for testthat and shinytest","user":{"login":"javierluraschi","id":3478847,"avatar_url":"https://avatars1.githubusercontent.com/u/3478847?v=4","gravatar_id":"","url":"https://api.github.com/users/javierluraschi","html_url":"https://github.com/javierluraschi","followers_url":"https://api.github.com/users/javierluraschi/followers","following_url":"https://api.github.com/users/javierluraschi/following{/other_user}","gists_url":"https://api.github.com/users/javierluraschi/gists{/gist_id}","starred_url":"https://api.github.com/users/javierluraschi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/javierluraschi/subscriptions","organizations_url":"https://api.github.com/users/javierluraschi/orgs","repos_url":"https://api.github.com/users/javierluraschi/repos","events_url":"https://api.github.com/users/javierluraschi/events{/privacy}","received_events_url":"https://api.github.com/users/javierluraschi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2018-03-19T23:32:09Z","updated_at":"2018-03-21T19:12:18Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/rstudio/rstudio/pulls/2452","html_url":"https://github.com/rstudio/rstudio/pull/2452","diff_url":"https://github.com/rstudio/rstudio/pull/2452.diff","patch_url":"https://github.com/rstudio/rstudio/pull/2452.patch"},"body":"This PR improves integration with `testthat` and `shinytest`.\r\n\r\n# testthat\r\n\r\nTriggering **Test Package** now parses `testthat` output into the build pane:\r\n\r\n<img width=\"423\" alt=\"screen shot 2018-03-19 at 4 20 35 pm\" src=\"https://user-images.githubusercontent.com/3478847/37627427-90844b44-2b91-11e8-8dd8-8e9cc481849e.png\">\r\n\r\nDouble-clicking an error opens the given file and also gainst a **Run Test** toolbar button to easily rerun tests:\r\n\r\n<img width=\"180\" alt=\"screen shot 2018-03-20 at 5 10 37 pm\" src=\"https://user-images.githubusercontent.com/3478847/37689365-cbac971e-2c61-11e8-868d-3b62a57b8cf9.png\">\r\n\r\n# shinytest\r\n\r\nShiny apps gain a new menu to **Record Test** or **Run Tests*:\r\n\r\n<img width=\"268\" alt=\"screen shot 2018-03-16 at 12 18 27 pm\" src=\"https://user-images.githubusercontent.com/3478847/37627470-cbf88398-2b91-11e8-9f7a-ad0cc40850ea.png\">\r\n\r\n**Note:** The icons are placeholders and will probably get updated once available.\r\n\r\nRecording or running a test will trigger package dependencies against `shinytest`, additionally, it runs `shinytest::dependenciesInstalled()`, if this fails we prompt:\r\n\r\n<img width=\"416\" alt=\"screen shot 2018-03-19 at 4 25 08 pm\" src=\"https://user-images.githubusercontent.com/3478847/37627537-1ea096b2-2b92-11e8-91a1-bd30d7ff5538.png\">\r\n\r\nWhen use accepts prompt, a console triggers `shinytest::installDependencies()`:\r\n\r\n<img width=\"633\" alt=\"screen shot 2018-03-19 at 2 25 53 pm\" src=\"https://user-images.githubusercontent.com/3478847/37627361-40848a46-2b91-11e8-862f-87eb0e41c3cd.png\">\r\n\r\nAlso, shiny docs also gain the record and run tests menu entries:\r\n\r\n<img width=\"280\" alt=\"screen shot 2018-03-20 at 5 11 08 pm\" src=\"https://user-images.githubusercontent.com/3478847/37689358-c1e8fab0-2c61-11e8-9b40-7336067405ff.png\">\r\n\r\nFor tests running outside a package, a **tests** tab was added since the build tab is not available:\r\n\r\n<img width=\"1010\" alt=\"screen shot 2018-03-20 at 1 34 00 pm\" src=\"https://user-images.githubusercontent.com/3478847/37683173-eb98ae96-2c48-11e8-8245-96bfb54760ec.png\">\r\n\r\n<img width=\"1010\" alt=\"screen shot 2018-03-20 at 1 33 55 pm\" src=\"https://user-images.githubusercontent.com/3478847/37683188-fb090a1a-2c48-11e8-96ba-b0f0a39c2c15.png\">\r\n\r\nEach shiny test file gains two commands for **Comparing Results** and to **Run Test** again:\r\n\r\n<img width=\"266\" alt=\"screen shot 2018-03-19 at 4 29 35 pm\" src=\"https://user-images.githubusercontent.com/3478847/37627687-d1991f78-2b92-11e8-8c70-eb121ed3370e.png\">\r\n\r\nFor the record and compare windows, the toolbar has been stripped and a [PR](https://github.com/rstudio/shinytest/pull/180) to `shinytest` sent to make this windows nicely integrated:\r\n\r\n<img width=\"1002\" alt=\"37550747-d99a6474-294f-11e8-8285-f2b04e5d645e\" src=\"https://user-images.githubusercontent.com/3478847/37627699-df67f6e2-2b92-11e8-9572-28a1c16a85d9.png\">\r\n"},"comment":{"url":"https://api.github.com/repos/rstudio/rstudio/issues/comments/375062808","html_url":"https://github.com/rstudio/rstudio/pull/2452#issuecomment-375062808","issue_url":"https://api.github.com/repos/rstudio/rstudio/issues/2452","id":375062808,"user":{"login":"javierluraschi","id":3478847,"avatar_url":"https://avatars1.githubusercontent.com/u/3478847?v=4","gravatar_id":"","url":"https://api.github.com/users/javierluraschi","html_url":"https://github.com/javierluraschi","followers_url":"https://api.github.com/users/javierluraschi/followers","following_url":"https://api.github.com/users/javierluraschi/following{/other_user}","gists_url":"https://api.github.com/users/javierluraschi/gists{/gist_id}","starred_url":"https://api.github.com/users/javierluraschi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/javierluraschi/subscriptions","organizations_url":"https://api.github.com/users/javierluraschi/orgs","repos_url":"https://api.github.com/users/javierluraschi/repos","events_url":"https://api.github.com/users/javierluraschi/events{/privacy}","received_events_url":"https://api.github.com/users/javierluraschi/received_events","type":"User","site_admin":false},"created_at":"2018-03-21T19:12:18Z","updated_at":"2018-03-21T19:12:18Z","author_association":"MEMBER","body":"Additional feedback:\r\n\r\n- [ ] Use wider window for recorder command (iframe same width as run app window)\r\n- [ ] Change install prompt message to: \"Install this module?\"\r\n- [ ] Fix `shinytest` run tooltip mentioning `testthat`.\r\n- [ ] Compare button should be ideally disabled when there is nothing to compare.\r\n- [ ] Shiny file command should be \"Run Test\" not \"Run Tests\"."}}
{"actor":{"display_login":"javierluraschi"}}