forked from UnitTestBot/unittestbot.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
component---src-docs-usage-step-by-step-md-87f0d406ce23fff5879e.js
2 lines (2 loc) · 7.01 KB
/
component---src-docs-usage-step-by-step-md-87f0d406ce23fff5879e.js
1
2
"use strict";(self.webpackChunkunittestbot_web=self.webpackChunkunittestbot_web||[]).push([[9827],{13973:function(e,t,n){n.r(t),n.d(t,{_frontmatter:function(){return l},default:function(){return c}});var o=n(87462),r=n(63366),i=(n(15007),n(64983)),a=n(23017),s=(n(8156),["components"]),l={};void 0!==l&&l&&l===Object(l)&&Object.isExtensible(l)&&!Object.prototype.hasOwnProperty.call(l,"__filemeta")&&Object.defineProperty(l,"__filemeta",{configurable:!0,value:{name:"_frontmatter",filename:"src/docs/usage/step-by-step.md"}});var p={_frontmatter:l},u=a.Z;function c(e){var t=e.components,n=(0,r.Z)(e,s);return(0,i.kt)(u,(0,o.Z)({},p,n,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("h1",{id:"step-by-step-release-use"},"Step by step release use"),(0,i.kt)("p",null,"1) #### Install and run server\n",(0,i.kt)("a",{parentName:"p",href:"install-server"},"More about server install")),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre"},'* `(remote only)` Connect to your server\n* make directory for UTBotCpp\n `mkdir utbotcpp`\n* go into directory\n `cd utbotcpp`\n* add release version to bash env, check it\n on [github releases page](https://github.com/UnitTestBot/UTBotCpp/releases)\n `export UTBOT_VERSION="1.0.31"`\n* Download archive from\n `wget https://github.com/UnitTestBot/UTBotCpp/releases/download/v$UTBOT_VERSION/utbot-release-$UTBOT_VERSION.zip`\n* unarchive zip\n `unzip utbot-release-$UTBOT_VERSION.zip`\n* unarchive from tar.gz and run UTBotCpp server\n `chmod +x unpack_and_run_utbot.sh && ./unpack_and_run_utbot.sh`\n')),(0,i.kt)("p",null," for restart UTBotCpp run ",(0,i.kt)("inlineCode",{parentName:"p"},"./utbot_server_restart.sh $PORT")," from utbot_distr"),(0,i.kt)("p",null," ",(0,i.kt)("img",{alt:"serverinstallGif",src:"https://github.com/UnitTestBot/unittestbot.github.io/raw/source/resources/gifs/serverInstall.gif"})),(0,i.kt)("p",null,"2) #### ",(0,i.kt)("inlineCode",{parentName:"p"},"(remote only)")," Install VSCode SFTP plugin (skip if you alredy have installed SFTP plugin)"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre"},"* [link](https://marketplace.visualstudio.com/items?itemName=Natizyskunk.sftp)\n* in VSCode invoke `Developer: Reload Window`command from the Command pallette `Shift + Ctrl + P` or `F1`\n")),(0,i.kt)("p",null," ",(0,i.kt)("img",{alt:"sftpinstallGif",src:"https://github.com/UnitTestBot/unittestbot.github.io/raw/source/resources/gifs/sftpinstall.gif"})),(0,i.kt)("p",null,"3) #### Install VSCode plugin\n",(0,i.kt)("a",{parentName:"p",href:"install-vscode-plugin"},"More about VSCode plugin install")),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre"},"* `(remote only)` download archive from [github releases page](https://github.com/UnitTestBot/UTBotCpp/releases)\n* `(remote only)` unarchive zip\n* in VSCode inovke `Extensions: Install from VSIX` command from the Command pallette `Shift + Ctrl + P` or `F1`\n* choose the `utbot_plugin.vsix` file, that contains in release zip archive.\n")),(0,i.kt)("p",null," ",(0,i.kt)("img",{alt:"clientinstallGif",src:"https://github.com/UnitTestBot/unittestbot.github.io/raw/source/resources/gifs/clientInstall.gif"})),(0,i.kt)("p",null,"4) #### Open project\nFor test project, we recommend\nuse ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/UnitTestBot/UTBotCpp/tree/main/integration-tests/c-example"},"c-example")),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre"},"* `File` -> `Open Folder`\n")),(0,i.kt)("p",null,"5) #### ",(0,i.kt)("inlineCode",{parentName:"p"},"(remote only)")," Add SFTP config"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre"},"* in VSCode invoke `SFTP: config` command from the Command pallette `Shift + Ctrl + P` or `F1`\n* fill with your data\n* in VSCode inovke `SFTP: Sync Local -> Remote` command from the Command pallette `Shift + Ctrl + P` or `F1`\n* check files on server\n")),(0,i.kt)("p",null," ",(0,i.kt)("img",{alt:"sftpconfigGif",src:"https://github.com/UnitTestBot/unittestbot.github.io/raw/source/resources/gifs/sftpconfig.gif"})),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-json"},'{\n "name": "ServerName",\n "host": "192.168.1.50", // your server ip, or host name\n "protocol": "sftp",\n "port": 22, // ssh port to server usually 22\n "username": "utbot", // username on server\n "remotePath": "/home/utbot/remote/c-example", // path for project should same with path that you set in UTBotCpp plugin settings \n "uploadOnSave": true\n}\n')),(0,i.kt)("p",null,"6) #### Configure VSCode plugin\n",(0,i.kt)("a",{parentName:"p",href:"wizard"},"More about UTBot wizard")),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre"},"* in VSCode inovke `Run UTBot: Quickstart Wizard` command from the Command pallette `Shift + Ctrl + P` or `F1`\n* `Host` on `Connection` page\n * `(same machine)` set `127.0.0.1`\n * `(remote only)` set same with SFTP host ip\n* `Port` on `Connection` page by defult `2121`, or `$PORT` that you use then run `./utbot_server_restart.sh $PORT`\n* `Remote Path` page\n * `(same machine)` set path to project that you open\n * `(remote only)` set same with SFTP remotePath\n* use defaults`Build Directory` and `CMake Options`\n* press Finish\n* Open `UTBot explorer` from left corner or press F1 and type `View: Show UTBot explorer`\n")),(0,i.kt)("p",null," ",(0,i.kt)("img",{alt:"wizardGif",src:"https://github.com/UnitTestBot/unittestbot.github.io/raw/source/resources/gifs/wizard.gif"})),(0,i.kt)("p",null,"7) #### First tests generation"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre"},"* right click on some source file `Generate Tests` -> `for Current File`\n* in lower right corner press `Create build folder`\n* in lower right corner press `Configure`\n")),(0,i.kt)("p",null," ",(0,i.kt)("img",{alt:"generateGif",src:"https://github.com/UnitTestBot/unittestbot.github.io/raw/source/resources/gifs/generate.gif"})),(0,i.kt)("p",null,"8) #### Generate tests\n",(0,i.kt)("a",{parentName:"p",href:"generating-tests"},"More generate tests")),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre"},"- For project\n * in VSCode inovke `UTBot: Generate Tests For Project` command from the Command pallette `Shift + Ctrl + P`\n or `F1`\n * right click in VSCode folder explorer and click `UTBot: Generate Tests For Project`\n- For file open file\n * in VSCode inovke `UTBot: Generate Tests For Current File` command from the Command pallette `Shift + Ctrl + P`\n or `F1`\n * right click on it `Generate Tests` -> `for Current File`\n- For function open file with function\n * place the carriage in function body, inovke `UTBot: Generate Tests For Current Function` command from the\n Command pallette `Shift + Ctrl + P` or `F1`\n * right click on function body `Generate Tests` -> `for Current Function`\n")))}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/usage/step-by-step.md"}}),c.isMDXComponent=!0}}]);
//# sourceMappingURL=component---src-docs-usage-step-by-step-md-87f0d406ce23fff5879e.js.map