The Squaretest plugin for IntelliJ IDEA allows you to automatically generate the boilerplate code required for your Java unit tests. Squaretest allows you to generate a test-class for your Java class with one keyboard shortcut. The test-class contains boilerplate code to construct the instance of the source-class and initialize its dependencies. The test-class also contains a test-method for each public and package-local method in the source-class; each test-method has code to invoke the corresponding source-class method and compare the returned result to an expected value, when necessary.
Squaretest supports creating test-classes in either Java or Groovy using the following test frameworks: JUnit4, JUnit5, AndroidJUnit4 and Robolectric3. You can customize all aspects of how the test-classes are generated by creating your own Apache Velocity template. Visit squaretest.com to learn more.
Last updated 17 Apr 2018