-
Notifications
You must be signed in to change notification settings - Fork 0
/
component---src-docs-cpp-clion-plugin-md-45d5cc4dcc579a69fd2a.js
2 lines (2 loc) · 6.66 KB
/
component---src-docs-cpp-clion-plugin-md-45d5cc4dcc579a69fd2a.js
1
2
"use strict";(self.webpackChunkunittestbot_web=self.webpackChunkunittestbot_web||[]).push([[201],{82178:function(e,t,n){n.r(t),n.d(t,{_frontmatter:function(){return s},default:function(){return c}});var i=n(87462),o=n(63366),r=(n(15007),n(64983)),l=n(23017),a=(n(13879),["components"]),s={};void 0!==s&&s&&s===Object(s)&&Object.isExtensible(s)&&!Object.prototype.hasOwnProperty.call(s,"__filemeta")&&Object.defineProperty(s,"__filemeta",{configurable:!0,value:{name:"_frontmatter",filename:"src/docs/cpp/clion-plugin.md"}});var p={_frontmatter:s},u=l.Z;function c(e){var t=e.components,n=(0,o.Z)(e,a);return(0,r.kt)(u,(0,i.Z)({},p,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h1",{id:"plugin-description"},"Plugin description"),(0,r.kt)("h2",{id:"ui-overview"},"UI overview"),(0,r.kt)("p",null,"Main UI elements of the plugin are:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"Status bar icons, they show connection status and verbose mode option"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"UTBot consoles"),", a window to show logs from server (GTest log, Server log) and plugin (Client log)"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"UTBot targets"),", a window to show targets found by server in current project"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"UTBot Source Directories"),", a view to show source directories marked green")),(0,r.kt)("p",null,(0,r.kt)("img",{alt:"clionPluginOverview",src:"https://github.com/UnitTestBot/unittestbot.github.io/blob/source/resources/images/clion_plugin/overview.png?raw=true"})),(0,r.kt)("h2",{id:"tests-generation"},"Tests generation"),(0,r.kt)("p",null,"You can trigger tests generation in multiple ways:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},"From editor context menu. For example, right click in editor and choose ",(0,r.kt)("inlineCode",{parentName:"p"},"UTBot Generate Tests... for File")),(0,r.kt)("img",{src:"https://github.com/UnitTestBot/unittestbot.github.io/blob/source/resources/images/clion_plugin/generate/from-editor.png?raw=true",alt:"fromEditor",height:"400",width:"500"})),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},"From project view context menu. For example, right click on file in project view and choose:\n",(0,r.kt)("inlineCode",{parentName:"p"},"UTBot: Generate Tests For Folder")),(0,r.kt)("img",{src:"https://github.com/UnitTestBot/unittestbot.github.io/blob/source/resources/images/clion_plugin/generate/from-project-view.png?raw=true",alt:"fromProjectView",height:"600"})),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},"From search window. Open search window by pressing ",(0,r.kt)("inlineCode",{parentName:"p"},"Shift")," twice. Then search for a particular\naction, for instance ",(0,r.kt)("inlineCode",{parentName:"p"},"UTBot: Generate For project")))),(0,r.kt)("p",null,(0,r.kt)("img",{alt:"fromProjectView",src:"https://github.com/UnitTestBot/unittestbot.github.io/blob/source/resources/images/clion_plugin/generate/trigger-from-search.png?raw=true"})),(0,r.kt)("h2",{id:"running-tests-with-coverage"},"Running tests with coverage"),(0,r.kt)("h3",{id:"run-a-single-test"},"Run a single test"),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"How-to steps"),":"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},"Open file with generated tests"),(0,r.kt)("li",{parentName:"ol"},"Click on the icon located near the test")),(0,r.kt)("p",null,(0,r.kt)("img",{alt:"runSingleTestGif",src:"https://github.com/UnitTestBot/unittestbot.github.io/blob/source/resources/gifs/clion_plugin/run/run-single-test.gif?raw=true"})),(0,r.kt)("h3",{id:"run-all-tests-in-a-file"},"Run all tests in a file"),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"How-to steps"),":"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},"Open file with generated tests"),(0,r.kt)("li",{parentName:"ol"},"Click on the icon located near ",(0,r.kt)("inlineCode",{parentName:"li"},"UTBot")," namespace")),(0,r.kt)("p",null,(0,r.kt)("img",{alt:"runAllInFileGif",src:"https://github.com/UnitTestBot/unittestbot.github.io/blob/source/resources/gifs/clion_plugin/run/run-all-in-file.gif?raw=true"})),(0,r.kt)("h3",{id:"run-all-tests-in-project"},"Run all tests in project"),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"How-to steps"),":"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},"Open search window by pressing ",(0,r.kt)("inlineCode",{parentName:"li"},"Shift")," twice"),(0,r.kt)("li",{parentName:"ol"},"Search for ",(0,r.kt)("inlineCode",{parentName:"li"},"UTBot: Run All Tests and Show Coverage"))),(0,r.kt)("h2",{id:"manage-coverage"},"Manage coverage"),(0,r.kt)("p",null,"Consider the following scenario: you ran tests ",(0,r.kt)("inlineCode",{parentName:"p"},"A")," with coverage, and then you run\nsome other tests ",(0,r.kt)("inlineCode",{parentName:"p"},"B")," with coverage. Then a dialog with three options will be opened: "),(0,r.kt)("p",null,(0,r.kt)("img",{alt:"dialog",src:"https://github.com/UnitTestBot/unittestbot.github.io/blob/source/resources/images/clion_plugin/coverage/dialog.png?raw=true"})),(0,r.kt)("p",null,"It is because there is already coverage displayed\nfrom tests ",(0,r.kt)("inlineCode",{parentName:"p"},"A"),", and you can choose:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"to merge coverage from ",(0,r.kt)("inlineCode",{parentName:"li"},"A")," with ",(0,r.kt)("inlineCode",{parentName:"li"},"B")," ",(0,r.kt)("strong",{parentName:"li"},"(Add to active suites)")),(0,r.kt)("li",{parentName:"ul"},"to replace coverage from ",(0,r.kt)("inlineCode",{parentName:"li"},"A")," with coverage from ",(0,r.kt)("inlineCode",{parentName:"li"},"B")," ",(0,r.kt)("strong",{parentName:"li"},"(Replace active suites)")),(0,r.kt)("li",{parentName:"ul"},"to show coverge only from ",(0,r.kt)("inlineCode",{parentName:"li"},"A")," ",(0,r.kt)("strong",{parentName:"li"},"(Do not apply collected coverage)"))),(0,r.kt)("h2",{id:"plugin-settings"},"Plugin settings"),(0,r.kt)("p",null,"You can view and edit available settings in ",(0,r.kt)("inlineCode",{parentName:"p"},"Settings")," -> ",(0,r.kt)("inlineCode",{parentName:"p"},"Tools")," -> ",(0,r.kt)("inlineCode",{parentName:"p"},"UTBot Settings")),(0,r.kt)("p",null,(0,r.kt)("img",{alt:"clionPluginSettingsDemo",src:"https://github.com/UnitTestBot/unittestbot.github.io/blob/source/resources/gifs/clion_plugin/settings-demo.gif?raw=true"})))}c&&c===Object(c)&&Object.isExtensible(c)&&!Object.prototype.hasOwnProperty.call(c,"__filemeta")&&Object.defineProperty(c,"__filemeta",{configurable:!0,value:{name:"MDXContent",filename:"src/docs/cpp/clion-plugin.md"}}),c.isMDXComponent=!0}}]);
//# sourceMappingURL=component---src-docs-cpp-clion-plugin-md-45d5cc4dcc579a69fd2a.js.map