forked from UnitTestBot/unittestbot.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
component---src-docs-general-home-md-0d8cb7fb537c66623a5a.js.map
1 lines (1 loc) · 6.77 KB
/
component---src-docs-general-home-md-0d8cb7fb537c66623a5a.js.map
1
{"version":3,"file":"component---src-docs-general-home-md-0d8cb7fb537c66623a5a.js","mappings":"8RAQaA,EAAe,Q,gOAC5B,IAAMC,EAAc,CAClBD,aAAAA,GAEIE,EAAYC,EAAAA,EACH,SAASC,EAAT,GAGZ,IAFDC,EAEC,EAFDA,WACGC,GACF,YACD,OAAO,QAACJ,GAAD,UAAeD,EAAiBK,EAAhC,CAAuCD,WAAYA,EAAYE,QAAQ,eAG5E,cACE,GAAM,gBADR,iBAGA,cACE,GAAM,uBADR,yBAGA,gSAGA,mCAAqB,aAAGC,WAAW,IAC/B,KAAQ,oDADS,sBAArB,wPAKC,aAAGA,WAAW,IACX,KAAQ,wCADX,yBALD,MAQA,cACE,GAAM,qCADR,uCAGA,kBAAG,kBAAQA,WAAW,KAAnB,eAAH,oHACM,cAAIA,WAAW,KAAf,mBADN,0HAEsB,kBAAQA,WAAW,MAAI,cAAIA,WAAW,UAAf,qBAF7C,eAEsH,cAAIA,WAAW,KAAf,UAFtH,qCAGA,qDAAuC,kBAAQA,WAAW,KAAnB,gBAAvC,iDAAwI,kBAAQA,WAAW,KAAnB,kCAAxI,6GAEA,mBACE,cAAIA,WAAW,MAAf,yBAA6C,gBAAMC,MAAO,CACtD,MAAS,WACR,6BAFL,mBAEiD,0BAFjD,iEAIA,cAAID,WAAW,MAAf,yBAA6C,gBAAMC,MAAO,CACtD,MAAS,SACR,+BAFL,mBAEmD,0BAFnD,uEAKF,kKAEA,cACE,GAAM,oCADR,sCAGA,ibAGyD,kBAAQD,WAAW,MAAI,cAAIA,WAAW,UAAf,gBAHhF,MAIA,0CAA4B,cAAIA,WAAW,KAAf,oBAA5B,SAAiF,cAAIA,WAAW,KAAf,SAAjF,wCAA0J,cAAIA,WAAW,KAAf,eAA1J,SAA0M,cAAIA,WAAW,KAAf,OAA1M,+NAGA,cACE,GAAM,iBADR,kBAGA,8DACA,mBACE,cAAIA,WAAW,MAAf,aAAiC,aAAGE,KAAK,+CAAR,iBAAjC,mCACA,cAAIF,WAAW,MAAf,kHAEF,wEAA0D,kBAAQA,WAAW,KAAnB,SAA1D,8CAAiJ,cAAIA,WAAW,KAAf,iBAAjJ,2IAES,kBAAQA,WAAW,MAAI,cAAIA,WAAW,UAAf,uBAFhC,UAGE,kBAAQA,WAAW,MAAI,cAAIA,WAAW,UAAf,oBAHzB,2E,uNAQJJ,EAAWO,gBAAiB","sources":["webpack://unittestbot-web/./src/docs/general/Home.md"],"sourcesContent":["import * as React from 'react'\n /* @jsx mdx */\nimport { mdx } from '@mdx-js/react';\n/* @jsxRuntime classic */\n\n/* @jsx mdx */\n\nimport DefaultLayout from \"/home/user/Github/utbot-new-wiki/node_modules/gatsby-theme-docz/src/base/Layout.js\";\nexport const _frontmatter = {};\nconst layoutProps = {\n _frontmatter\n};\nconst MDXLayout = DefaultLayout;\nexport default function MDXContent({\n components,\n ...props\n}) {\n return <MDXLayout {...layoutProps} {...props} components={components} mdxType=\"MDXLayout\">\n\n\n <h1 {...{\n \"id\": \"introduction\"\n }}>{`Introduction`}</h1>\n <h2 {...{\n \"id\": \"what-is-unittestbot\"\n }}>{`What is UnitTestBot?`}</h2>\n <p>{`UnitTestBot (aka UTBot) tool provides engineers with a simple 1-mouse-click way to automatically generate unit tests and\nvisualize coverage for projects written in C and C++ Programming Languages. It is an IDE extension (the client) paired\nwith server application.`}</p>\n <p>{`The tool uses `}<a parentName=\"p\" {...{\n \"href\": \"https://en.wikipedia.org/wiki/Symbolic_execution\"\n }}>{`symbolic execution`}</a>{` for test cases generation. UTBot\nuses KLEE Symbolic Virtual Machine enchanced with a new advanced bidirectional symbolic execution algorithm developed by\nResearch Group from Saint Petersburg State University. Tests are generated in form\nof `}<a parentName=\"p\" {...{\n \"href\": \"https://github.com/google/googletest\"\n }}>{`Google Test Framework`}</a>{`.`}</p>\n <h2 {...{\n \"id\": \"tests-generation-regression-suite\"\n }}>{`Tests Generation: Regression Suite`}</h2>\n <p><strong parentName=\"p\">{`UnitTestBot`}</strong>{` generates test cases by code, trying to cover maximum statements and execution paths. We treat source\ncode as `}<em parentName=\"p\">{`source of truth`}</em>{` assuming that behavior is correct (corresponds to initial user demand). Generated tests are\nplaced in the so-called `}<strong parentName=\"p\"><em parentName=\"strong\">{`regression suite`}</em></strong>{`. Thus, we `}<em parentName=\"p\">{`fixate`}</em>{` current behavior by test cases.`}</p>\n <p>{`What is the purpose? You obtain `}<strong parentName=\"p\">{`full control`}</strong>{` of future code changes. Any code change now `}<strong parentName=\"p\">{`can't break behavior\nsilently`}</strong>{`. If developer changes the code, then some tests will fall on CI. Then, ther are two possible scenarios:`}</p>\n <ul>\n <li parentName=\"ul\">{`Initial behavior was `}<span style={{\n \"color\": \"green\"\n }}><b>{`correct`}</b></span>{` but developer `}<i>{`broke`}</i>{` it. And, as a result,\ngenerated test helped to find a bug.`}</li>\n <li parentName=\"ul\">{`Initial behavior was `}<span style={{\n \"color\": \"red\"\n }}><b>{`incorrect`}</b></span>{` and developer `}<i>{`fixed`}</i>{` it. Then, test must\nbe manually updated to fixate new behavior.`}</li>\n </ul>\n <p>{`UTBot provides dramatic code quality improvement in the long term: after tests are generated no change can break\nbehavior without an alarm.`}</p>\n <h2 {...{\n \"id\": \"test-generation-errors-detection\"\n }}>{`Test Generation: Errors Detection`}</h2>\n <p>{`UnitTestBot is not only able to fixate the behavior in an existing code, but it also helps to find real bugs in your\nproject. Some code fragments might be invalid, while developers don't know about it. For example, buffer overflows,\nassertion failures, segmentation faults, and so on. If UTBot finds an execution path leading to such a situation, it\ncreates a special test case that is added to the so-called `}<strong parentName=\"p\"><em parentName=\"strong\">{`error suite`}</em></strong>{`.`}</p>\n <p>{`While all tests from `}<em parentName=\"p\">{`regression suite`}</em>{` are `}<em parentName=\"p\">{`green`}</em>{` right after generation, tests from `}<em parentName=\"p\">{`error suite`}</em>{` are `}<em parentName=\"p\">{`red`}</em>{` (they\nfail if you run them). Such tests generated by UnitTestBot are a convenient way to discover critical problems as soon as\npossible. After developer fixes a bug, tests can be rerun to verify the problem is gone.`}</p>\n <h2 {...{\n \"id\": \"code-coverage\"\n }}>{`Code Coverage`}</h2>\n <p>{`UTBot tries to generate test cases that:`}</p>\n <ul>\n <li parentName=\"ul\">{`maximize `}<a href=\"https://en.wikipedia.org/wiki/Code_coverage\">{`code coverage`}</a>{` (by statements and branches);`}</li>\n <li parentName=\"ul\">{`minimize number of tests, i.e. if you drop any test case from generated suite, your code coverage decreases.`}</li>\n </ul>\n <p>{`Of course, in an ideal world we would like to test `}<strong parentName=\"p\">{`every`}</strong>{` execution path of the program (so-called `}<em parentName=\"p\">{`path coverage`}</em>{`),\nbut the number of such paths is often infinite due to loops and recursion. UnitTestBot aims to maximize other types of\ncoverages: `}<strong parentName=\"p\"><em parentName=\"strong\">{`statement coverage`}</em></strong>{`\nand `}<strong parentName=\"p\"><em parentName=\"strong\">{`branch coverage`}</em></strong>{`, most commonly used as metrics for coverage quality assessment tools.`}</p>\n\n </MDXLayout>;\n}\n;\nMDXContent.isMDXComponent = true;\n "],"names":["_frontmatter","layoutProps","MDXLayout","DefaultLayout","MDXContent","components","props","mdxType","parentName","style","href","isMDXComponent"],"sourceRoot":""}