Generate Test Methods

Generate a test method in your test class.

Press ⌘N (macOS) / Alt+Insert (Windows/Linux) to open the Generate menu. The options you get will depend on the testing framework you are using in your project, for example, JUnit 5.


Related Resources

Generate a Test Class
Generate a Test Class
Generate a new test class from your Java class.
Navigate to Test
Navigate to Test
Go to your matching test class with one keyboard shortcut.
Merge/Unmerge If Statements
Merge/Unmerge If Statements
Experiment with your code without changing the semantics.