-
Notifications
You must be signed in to change notification settings - Fork 0
/
component---src-docs-java-generate-tests-with-default-configuration-md-a8dd44ceac8ca2c81fbd.js
2 lines (2 loc) · 3.06 KB
/
component---src-docs-java-generate-tests-with-default-configuration-md-a8dd44ceac8ca2c81fbd.js
1
2
"use strict";(self.webpackChunkunittestbot_web=self.webpackChunkunittestbot_web||[]).push([[315],{11090:function(t,e,n){n.r(e),n.d(e,{_frontmatter:function(){return l},default:function(){return p}});var a=n(87462),o=n(63366),r=(n(15007),n(64983)),s=n(23017),i=(n(13879),["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/java/Generate-tests-with-default-configuration.md"}});var c={_frontmatter:l},u=s.Z;function p(t){var e=t.components,n=(0,o.Z)(t,i);return(0,r.kt)(u,(0,a.Z)({},c,n,{components:e,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"With UnitTestBot you can generate tests"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"for a package,"),(0,r.kt)("li",{parentName:"ul"},"for a single class or a set of classes,"),(0,r.kt)("li",{parentName:"ul"},"for a method or a set of methods.")),(0,r.kt)("h2",{id:"how-to-generate-and-run-tests-with-default-configuration"},"How to generate and run tests with default configuration"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},"Open your Java project in IntelliJ IDEA."),(0,r.kt)("li",{parentName:"ol"},"Choose the required package, class or set of classes in the Project tool window.",(0,r.kt)("br",null),"\nRight-click and choose ",(0,r.kt)("strong",{parentName:"li"},"Generate Tests with UnitTestBot...")," or press ",(0,r.kt)("strong",{parentName:"li"},"Alt+Shift+U"),"."),(0,r.kt)("li",{parentName:"ol"},"Alternatively, in the Editor, place the caret at the required class or method.",(0,r.kt)("br",null),"\nPress ",(0,r.kt)("strong",{parentName:"li"},"Alt+Shift+U")," or right-click and choose ",(0,r.kt)("strong",{parentName:"li"},"Generate...")," > ",(0,r.kt)("strong",{parentName:"li"},"Tests with UnitTestBot"),"."),(0,r.kt)("li",{parentName:"ol"},"In the ",(0,r.kt)("strong",{parentName:"li"},"Generate Tests with UnitTestBot")," window tick the classes or methods you'd like to cover with tests and press ",(0,r.kt)("strong",{parentName:"li"},"Generate Tests")," or ",(0,r.kt)("strong",{parentName:"li"},"Generate and Run"),".",(0,r.kt)("br",null))),(0,r.kt)("p",null,"Now you can see the resulting test class or classes in the Editor."),(0,r.kt)("p",null,(0,r.kt)("em",{parentName:"p"},"Note:")," if you re-generate the test for a given class or method, it will erase the previously generated test for this unit. To prevent this, rename or move the tests you want to keep. For more information see ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/UnitTestBot/UTBotJava/wiki/Fine-tune-test-generation#test-sources-root"},(0,r.kt)("strong",{parentName:"a"},"Test sources root")),"."))}p&&p===Object(p)&&Object.isExtensible(p)&&!Object.prototype.hasOwnProperty.call(p,"__filemeta")&&Object.defineProperty(p,"__filemeta",{configurable:!0,value:{name:"MDXContent",filename:"src/docs/java/Generate-tests-with-default-configuration.md"}}),p.isMDXComponent=!0}}]);
//# sourceMappingURL=component---src-docs-java-generate-tests-with-default-configuration-md-a8dd44ceac8ca2c81fbd.js.map