Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>It does not seem to be <em>directly</em> available.</p> <p>The idea has been raised to save a file (like a JUnit empty file) as a template, to reuse it at future (JUnit for instance) creation time.<br> This is <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=37440" rel="noreferrer">bug 37440</a>... and it is not very popular (since 2003!).</p> <p>The closest would be </p> <p><code>Window &gt; Preferences &gt; Java &gt; Editor - Templates</code> and look under <strong>"test method (JUnit4)"</strong></p> <p>However, as mentioned in <a href="http://dev.eclipse.org/newslists/news.eclipse.newcomer/msg08613.html" rel="noreferrer">this thread</a>: </p> <blockquote> <p>but that will not affect the auto-generated JUnit test method stub templates.<br> In other words in the <code>New JUnit Test Case</code> dialog, one can select the methods of the class under test and test methods stubs are auto-generated. </p> </blockquote> <p>To modify the template that creates these JUnit test method stubs... seems not possible at the moment.</p> <p><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=71783" rel="noreferrer">Bug 71783</a> is somewhat related to this issue, regarding the comment templates of those methods.</p> <p>Note: the generation of the JUnit class itself seems entirely hard-coded in the class </p> <p><a href="http://kickjava.com/src/org/eclipse/jdt/junit/wizards/NewTestCaseWizardPageOne.java.htm" rel="noreferrer"><strong><code>org.eclipse.jdt.junit.wizards.NewTestCaseWizardPageOne</code></strong></a></p> <hr> <p>Speaking of template, you also needed to to provide VM arguments to all JUnit tests you run, manually copying them for every new configuration.<br> <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=37862" rel="noreferrer">Bug 37862</a> has been set to address that and allow to create a Installed JRE for use with a JUnit testing, configuring it with the correct set of VM arguments.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload