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

Generate tests with default configuration

Olga Naumenko edited this pageApr 28, 2023 ·4 revisions

With UnitTestBot, you can generate tests

  • for a package,
  • for a single class or a set of classes,
  • for a method or a set of methods.

How to generate and run tests with default configuration

  1. Open your Java project in IntelliJ IDEA.
  2. Choose the required package, class or set of classes in the Project tool window.
    Right-click and chooseGenerate Tests with UnitTestBot or pressAlt+Shift+U.

  1. Alternatively, in the Editor, place the caret at the required class or method.
    PressAlt+Shift+U or right-click and chooseGenerate >Tests with UnitTestBot.

  1. In theGenerate Tests with UnitTestBot window, tick the classes or methods you'd like to cover with tests andpressGenerate Tests orGenerate and Run.

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

Note: if you re-generate the test for a given class or method, it will erase the previously generated test forthis unit. To prevent this, rename or move the tests you want to keep. For more information, seeTest sources root.

User guides

IntelliJ IDEA plugin

Contributor guides

(redirect to/docs inmain repo)

General info

Continuous integration

Design docs

Clone this wiki locally

[8]ページ先頭

©2009-2025 Movatter.jp