Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 344925
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T11:02:09+00:00 2026-05-12T11:02:09+00:00

I’ve spent a few hours searching for this, and can’t find it, so I’m

  • 0

I’ve spent a few hours searching for this, and can’t find it, so I’m asking. Why here?

How can I customize Eclipse so that when I create a new JUnit test class or method, it includes different items? For other source, I’d just go into Window->Preferences, and change the templates.

But for JUnit, that doesn’t seem to be possible.

I’ve recently installed MoreUnit, and that doesn’t seem to help either.

Anyone have a pointer?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T11:02:09+00:00Added an answer on May 12, 2026 at 11:02 am

    It does not seem to be directly available.

    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.
    This is bug 37440… and it is not very popular (since 2003!). And in WON'T FIX status…

    The closest would be

    Window > Preferences > Java > Editor - Templates and look under “test method (JUnit4)”

    However, as mentioned in this thread:

    but that will not affect the auto-generated JUnit test method stub templates.
    In other words in the New JUnit Test Case dialog, one can select the methods of the class under test and test methods stubs are auto-generated.

    To modify the template that creates these JUnit test method stubs… seems not possible at the moment.

    Bug 71783 is somewhat related to this issue, regarding the comment templates of those methods.

    Note: the generation of the JUnit class itself seems entirely hard-coded in the class

    org.eclipse.jdt.junit.wizards.NewTestCaseWizardPageOne


    Speaking of template, you also needed to to provide VM arguments to all JUnit tests you run, manually copying them for every new configuration.
    Bug 37862 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.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
I have a jquery bug and I've been looking for hours now, I can't
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I know there's a lot of other questions out there that deal with this
Does anyone know how can I replace this 2 symbol below from the string
I'm trying to create an if statement in PHP that prevents a single post
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
For some reason, after submitting a string like this Jack’s Spindle from a text

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.