-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcomponent---src-docs-java-get-use-of-test-results-md-ef219ab19fae67ee3743.js.map
1 lines (1 loc) · 11.8 KB
/
component---src-docs-java-get-use-of-test-results-md-ef219ab19fae67ee3743.js.map
1
{"version":3,"file":"component---src-docs-java-get-use-of-test-results-md-ef219ab19fae67ee3743.js","mappings":"8RAMaA,EAAe,CAAC,OAAE,gPAC/B,IAAMC,EAAc,CAClBD,aAAAA,GAEIE,EAAYC,EAAAA,EACH,SAASC,EAAW,GAGhC,IAFDC,EAAU,EAAVA,WACGC,GAAK,YAER,OAAO,QAACJ,GAAS,UAAKD,EAAiBK,EAAK,CAAED,WAAYA,EAAYE,QAAQ,eAG5E,cACE,GAAM,uBAAqB,wBAE7B,cACE,GAAM,wBAAsB,yBAE9B,gLACA,kDAAoC,cAAIC,WAAW,KAAG,WAAiB,0FAA0F,kBAAQA,WAAW,KAAG,SAAmB,oCAC1M,6CACA,mBACE,cAAIA,WAAW,OAAK,cAAIA,WAAW,MAAI,YACvC,cAAIA,WAAW,OAAK,cAAIA,WAAW,MAAI,6BAAmC,OAE5E,wCACA,mBACE,cAAIA,WAAW,OAAK,cAAIA,WAAW,MAAI,2BACvC,cAAIA,WAAW,OAAK,cAAIA,WAAW,MAAI,4CACvC,cAAIA,WAAW,OAAK,cAAIA,WAAW,MAAI,kBAEzC,6CACA,kBAAG,eAAKC,IAAI,kEAAkEC,IAAI,4GAClF,6FACA,cACE,GAAM,0BAAwB,2BAEhC,kBAAG,eAAKD,IAAI,mBAAmBC,IAAI,4GACnC,yCACA,cACE,GAAM,mBAAiB,oBAEzB,4DACA,mBACE,cAAIF,WAAW,MAAI,QAAS,aAAGA,WAAW,KACtC,KAAQ,iGAA+F,yBACzE,yBAAyB,kBAAQA,WAAW,MAAI,eACzE,QAAQ,kBAAQA,WAAW,MAAI,sCAAgD,WACxF,cAAIA,WAAW,OAAK,aAAGA,WAAW,KAC9B,KAAQ,iGAA+F,2BACvE,4C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AC/F,sBAAYA,WAAW,KAAG,YAA0B,MAAM,sBAAYA,WAAW,KAAG,4BAA0C,iBAC5H,cACE,GAAM,oBAAkB,qBAE1B,0EACA,cACE,GAAM,+BAA6B,gCAErC,gDAAkC,aAAGA,WAAW,IAC5C,KAAQ,6DAA2D,aACjD,SAAS,aAAGA,WAAW,IACzC,KAAQ,0DAAwD,iBAC1C,2FAC1B,oMACA,cACE,GAAM,qBAAmB,sBAE3B,cACE,GAAM,iBAAe,mBAEvB,+BAAiB,cAAIA,WAAW,KAAG,8CAAoD,8EACvF,+QACA,0DAA4C,aAAGA,WAAW,IACtD,KAAQ,oEAAkE,mBAClD,MAC5B,cACE,GAAM,0CAAwC,2CAEhD,6FACA,kBAAG,cAAIA,WAAW,KAAG,SAAe,mBAAmB,kBAAQA,WAAW,KAAG,uBAAiC,YAAY,kBAAQA,WAAW,KAAG,mCAA6C,kDAC7L,uDAAyC,sBAAYA,WAAW,KAAG,aAA2B,oBAAoB,kBAAQA,WAAW,KAAG,qBAA+B,MAG3K,CAAC,uOAEDJ,EAAWO,gBAAiB,C","sources":["webpack://unittestbot-web/./src/docs/java/Get-use-of-test-results.md"],"sourcesContent":["import * as React from 'react'\n /* @jsx mdx */\nimport { mdx } from '@mdx-js/react';\n/* @jsxRuntime classic */\n/* @jsx mdx */\nimport DefaultLayout from \"/home/runner/work/utbot-site-staging/utbot-site-staging/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 <h2 {...{\n \"id\": \"explore-test-suites\"\n }}>{`Explore test suites`}</h2>\n <h3 {...{\n \"id\": \"view-clustered-tests\"\n }}>{`View clustered tests`}</h3>\n <p>{`Even before running tests you have them clustered into suites. Analyze them to see failing tests, explicitly thrown exceptions, and successful executions.`}</p>\n <p>{`These clusters are marked as `}<em parentName=\"p\">{`Regions`}</em>{` in test source code. To view all the suites at once and navigate between them, press `}<strong parentName=\"p\">{`Alt+7`}</strong>{` to open Structure tool window.`}</p>\n <p>{`The typical suites are:`}</p>\n <ul>\n <li parentName=\"ul\"><em parentName=\"li\">{`Fuzzer`}</em></li>\n <li parentName=\"ul\"><em parentName=\"li\">{`Symbolic execution engine`}</em>{`,`}</li>\n </ul>\n <p>{`each divided into:`}</p>\n <ul>\n <li parentName=\"ul\"><em parentName=\"li\">{`Successful executions`}</em></li>\n <li parentName=\"ul\"><em parentName=\"li\">{`Explicitly thrown unchecked exceptions`}</em></li>\n <li parentName=\"ul\"><em parentName=\"li\">{`Error suite`}</em></li>\n </ul>\n <p>{`Find the example below:`}</p>\n <p><img alt=\"Screenshot of UnitTestBot output structure, showing test suites\" src=\"https://user-images.githubusercontent.com/64418523/193044976-c83d990d-3211-4218-8c07-57d628ccf780.PNG\" /></p>\n <p>{`Dive into these suites to find test methods with detailed descriptions.`}</p>\n <h3 {...{\n \"id\": \"read-test-descriptions\"\n }}>{`Read test descriptions`}</h3>\n <p><img alt=\"test_description\" src=\"https://user-images.githubusercontent.com/64418523/193581057-28d22cbf-d6c4-4c2e-b628-f0d84b991366.PNG\" /></p>\n <p>{`Each test contains:`}</p>\n <h4 {...{\n \"id\": \"javadoc-comment\"\n }}>{`Javadoc comment`}</h4>\n <p>{`Briefly describes test execution path.`}</p>\n <ul>\n <li parentName=\"ul\">{`See `}<a parentName=\"li\" {...{\n \"href\": \"https://github.com/UnitTestBot/UTBotJava/wiki/Fine-tune-test-generation#javadoc-comment-style\"\n }}>{`Javadoc comment style`}</a>{` for configuring the `}<strong parentName=\"li\">{`Plain\ntext`}</strong>{` or `}<strong parentName=\"li\">{`Structured via custom Javadoc tags`}</strong>{` view.`}</li>\n <li parentName=\"ul\"><a parentName=\"li\" {...{\n \"href\": \"https://www.jetbrains.com/help/idea/working-with-code-documentation.html#toggle-rendered-view\"\n }}>{`Render Javadoc comments`}</a>{` to get more clear and structured view.`}</li>\n <li parentName=\"ul\">{`Jump to the method-under-test right from the comment.`}</li>\n </ul>\n <h4 {...{\n \"id\": \"testing-framework-annotations\"\n }}>{`Testing framework annotations`}</h4>\n <p>{`Provide a super short test method description inside:`}</p>\n <ul>\n <li parentName=\"ul\">\n <p parentName=\"li\">{`For JUnit 5: `}<inlineCode parentName=\"p\">{`@DisplayName(\"\\\\<short description>\")`}</inlineCode></p>\n </li>\n <li parentName=\"ul\">\n <p parentName=\"li\">{`For TestNG: `}<inlineCode parentName=\"p\">{`@Test(description = \"\\\\<short description>\")`}</inlineCode><br></br>{`\n(For JUnit 4 there are no descriptions right in the annotations.)`}</p>\n <p parentName=\"li\">{` `}<em parentName=\"p\"><strong parentName=\"em\">{`Disabled (or sandboxed) tests`}</strong></em></p>\n <p parentName=\"li\">{` Sometimes the tests with the `}<em parentName=\"p\">{`@Disabled`}</em>{` annotation and a stack trace appear in the output:`}</p>\n <p parentName=\"li\">{` `}<inlineCode parentName=\"p\">{`@Disabled(\"Disabled due to sandbox\")`}</inlineCode></p>\n <p parentName=\"li\">{` Keep calm: it is a feature, not a bug. These tests were sandboxed, i.e. interrupted, because they tried to execute potentially unsafe code.`}</p>\n <p parentName=\"li\">{` The most common forbidden actions are:`}</p>\n <ul parentName=\"li\">\n <li parentName=\"ul\">\n <p parentName=\"li\">{`working with files (read, write, create, delete),`}</p>\n </li>\n <li parentName=\"ul\">\n <p parentName=\"li\">{`connecting to sockets,`}</p>\n </li>\n <li parentName=\"ul\">\n <p parentName=\"li\">{`invoking `}<inlineCode parentName=\"p\">{`System.exit()`}</inlineCode>{`,`}</p>\n </li>\n <li parentName=\"ul\">\n <p parentName=\"li\">{`accessing system properties or JVM properties,`}</p>\n </li>\n <li parentName=\"ul\">\n <p parentName=\"li\">{`using reflection.`}</p>\n <p parentName=\"li\">{`You can `}<strong parentName=\"p\">{`add permissions`}</strong>{` in `}<inlineCode parentName=\"p\">{`~\\\\.utbot\\\\sandbox.policy`}</inlineCode>{`. Create this file manually.`}</p>\n <p parentName=\"li\">{`You can refer to the `}<a parentName=\"p\" {...{\n \"href\": \"https://docs.oracle.com/javase/1.5.0/docs/guide/security/spec/security-spec.doc3.html\"\n }}>{`Full list of permissions`}</a>{`.`}</p>\n <p parentName=\"li\">{`If you are sure you want the code to be executed as is (`}<strong parentName=\"p\">{`including the unsafe operations!`}</strong>{`) you can `}<strong parentName=\"p\">{`turn sandboxing off`}</strong>{`: add `}<inlineCode parentName=\"p\">{`AllPermission`}</inlineCode>{` to `}<inlineCode parentName=\"p\">{`~\\\\.utbot\\\\sandbox.policy`}</inlineCode>{`. Be careful!`}</p>\n <p parentName=\"li\">{`If you remove the `}<em parentName=\"p\">{`@Disabled`}</em>{` annotation and run the test, it will be run without creating a sandbox.`}</p>\n </li>\n </ul>\n </li>\n </ul>\n <h4 {...{\n \"id\": \"test-method-name\"\n }}>{`Test method name`}</h4>\n <p>{`Usually looks like `}<inlineCode parentName=\"p\">{`testMethodUnderTestName`}</inlineCode>{`. Sometimes it is accompanied by explanatory supplements: e.g.,\n`}<inlineCode parentName=\"p\">{`ByFuzzer`}</inlineCode>{`, `}<inlineCode parentName=\"p\">{`ReturnsOneWithCornerCase`}</inlineCode>{`, or others.`}</p>\n <h4 {...{\n \"id\": \"test-method-body\"\n }}>{`Test method body`}</h4>\n <p>{`You can jump to the method-under-test from here too.`}</p>\n <h3 {...{\n \"id\": \"run-tests-and-view-coverage\"\n }}>{`Run tests and view coverage`}</h3>\n <p>{`There are multiple ways to `}<a parentName=\"p\" {...{\n \"href\": \"https://www.jetbrains.com/help/idea/performing-tests.html\"\n }}>{`run tests`}</a>{` and `}<a parentName=\"p\" {...{\n \"href\": \"https://www.jetbrains.com/help/idea/code-coverage.html\"\n }}>{`view coverage`}</a>{` in IntelliJ IDEA. All of them apply to UnitTestBot results — feel free to choose any.`}</p>\n <p>{`If you are not satisfied with coverage, try to `}{`[Experiment with test generation]`}{`(Fine-tune test generation.md#Experiment with test generation to reach higher coverage).`}</p>\n <h3 {...{\n \"id\": \"get-sarif-reports\"\n }}>{`Get SARIF reports`}</h3>\n <h4 {...{\n \"id\": \"what-is-sarif\"\n }}>{`What is SARIF?`}</h4>\n <p>{`It is the `}<em parentName=\"p\">{`Static Analysis Results Interchange Format`}</em>{` — a standard, JSON-based format for the output of static analysis tools.`}</p>\n <p>{`Every static analysis tool has its own output format, and these formats usually have little in common. SARIF provides a universal output format, which makes it possible to create common tooling, such as viewers, bug filers, metrics calculators, etc.`}</p>\n <p>{`For more information please refer to `}<a parentName=\"p\" {...{\n \"href\": \"https://github.com/microsoft/sarif-tutorials/blob/main/README.md\"\n }}>{`SARIF Tutorials`}</a>{`.`}</p>\n <h4 {...{\n \"id\": \"how-to-get-sarif-report-in-unittestbot\"\n }}>{`How to get SARIF report in UnitTestBot`}</h4>\n <p>{`By default, UnitTestBot creates SARIF reports for each test generation.`}</p>\n <p><em parentName=\"p\">{`Note:`}</em>{` if you enable `}<strong parentName=\"p\">{`Parameterized tests`}</strong>{` in the `}<strong parentName=\"p\">{`Generate Tests with UnitTestBot`}</strong>{` window, SARIF report is unavailable for now.`}</p>\n <p>{`You can find SARIF reports in the `}<inlineCode parentName=\"p\">{`resources`}</inlineCode>{` directory near `}<strong parentName=\"p\">{`Test sources root`}</strong>{`. `}</p>\n\n </MDXLayout>;\n}\n;\nMDXContent.isMDXComponent = true;\n "],"names":["_frontmatter","layoutProps","MDXLayout","DefaultLayout","MDXContent","components","props","mdxType","parentName","alt","src","isMDXComponent"],"sourceRoot":""}