Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Automated unit test generation and precise code analysis for Java

License

NotificationsYou must be signed in to change notification settings

UnitTestBot/UTBotJava

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UnitTestBot: build and run testsPlugin and CLI: publish as archives

👉 Find UnitTestBot onJetBrains Marketplace.

👉 Visit theofficial UnitTestBot website.

What is UnitTestBot?

UnitTestBot is the tool forautomated unit test generation andprecise code analysis. It produces ready-to-usetestcases forJava — withvalid inputs and comments. It can even predict whether the tests fail or pass. You can analyze them, run them, show coverage — as if you've created them personally.

Thesymbolic execution engine paired with asmart fuzzing technique constitutes the core of UnitTestBot. It helps tofind errors andprevent regressions in the code in a much more efficient way — UnitTestBotmaximizes path coverage whileminimizing the number of tests and false positives.

UnitTestBot represents all the test summaries in ahuman-readable format. The intelligible test method names and comments help you to control the whole testing process. Test failed? The summary refers you to the related branch or the condition under test.

Get started

Try theonline demo to generate unit tests with one click.

Get to know thefull version of UnitTestBot plugin with this quick guide:

Install UnitTestBot plugin for IntelliJ IDEA

Try the most straightforward path to start using UnitTestBot plugin.

  1. Please check thesystem requirements.
  2. Open your IntelliJ IDEA.
  3. Go toFile > Settings... > Plugins > Marketplace.
  4. In the search field typeUnitTestBot — you'll see the UnitTestBot plugin page.
  5. Press theInstall button and wait until it changes toInstalled, then clickOK.

Now you can find the UnitTestBot plugin enabled in theFile > Settings > Plugins window.

Do you want to manually choose the build or to update the plugin? Please refer toInstall or update plugin in our user guide.


Generate tests with default configuration

Proceed to generating unit tests for the existing Java project. If you don't have one, create it using theJetBrains tutorial.

  1. Open your Java project in IntelliJ IDEA.
  2. Right-click the required package or a file in the Project tool window, scroll the menu down to the bottom andchooseGenerate Tests with UnitTestBot...
  3. In theGenerate Tests with UnitTestBot window tick the classes or methods you'd like to cover with unit tests andpressGenerate Tests orGenerate and Run.

Now you can see the resulting test class or classes in the Editor tool window.

Need to configure testing framework, mocking strategy or parameterization? Please check allconfiguration options.


Make use of generated tests

What can you do with the output?

  1. Tofind and fix the errors in your code:
  • Run the generated tests: right-click the test class or a folder with tests and chooseRun.

  • In the Run tool window you can see the tests failed with the brief failure explanation.

  • Fix your errors if needed.

  1. Toprevent regressions:
  • Having your errors fixed, run the tests again. "Passed"? Commit them as the regression suite.

  • Introduce changes in the code and run your tests as often as needed!

  • Tests failed? Decide whether it is a bug or a feature and generate new tests if necessary.

  1. Toview coverage:

Right-click the test class, chooseMore Run/Debug > Run ... with Coverage.

Want to know more about test descriptions or SARIF reports? Please learn how toGet use of test results.


Contribute to UnitTestBot

UnitTestBot is an open source project. We welcome everyone who wants to make UnitTestBot better — introduce a new feature or report a bug. We have only one kind request for our contributors: we expect you to prove the necessity and quality of the suggested changes.

How can you do this? Refer to ourContributing guide.

Feel free to join theDiscussions!

And thank you for your time and effort! ⭐

Find support

Having troubles with using UnitTestBot? Contact usdirectly.

Find more UnitTestBot products

You can also tryUnitTestBot developed especially for C/C++.

You are welcome tocontribute to it too!

About

Automated unit test generation and precise code analysis for Java

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors35


[8]ページ先頭

©2009-2025 Movatter.jp