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

  • Home
  • SEARCH
  • 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 635183
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T20:22:36+00:00 2026-05-13T20:22:36+00:00

Can you explain in a few sentences: Why we need it / why they

  • 0

Can you explain in a few sentences:

  1. Why we need it / why they make our life easier ?
  2. How to unit-test [simple example in Java] ?
  3. When do not we need them / types of projects we can leave unit-testing out?
  4. useful links
  • 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-13T20:22:37+00:00Added an answer on May 13, 2026 at 8:22 pm

    Why we need it / why they make our life easier ?

    • It allows you to check the expected behavior of the piece(s) of code you are testing, serving as a contract that it must satisfy.
    • It also allows you to safely re-factor code without breaking the functionality (contract) of it.
    • It allows you to make sure that bug fixes stay fixed by implementing a Unit test after correcting a bug.
    • It may serve as as a way to write decoupled code (if you have testing in mind while writing your code).

    How to unit-test [simple example in Java] ?

    Check out the JUnit website and the JUnit cookbook for details. There isn’t much to writing JUnit test cases. Actually coming up with good test cases is surely harder than the actual implementation.

    When do not we need them / types of projects we can leave unit-testing out?

    Don’t try to test every method in a class, but rather focus on testing the functionality of a class. Beans for example, you won’t write tests for the getters and setters…

    Links

    JUnit – Unit testing

    EclEmma – test coverage tool

    link text – Wikipedia link to unit testing

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

Sidebar

Related Questions

Can someone explain this result to me. The first test succeeds but the second
Of course, I can explain it in whole books. But I read a few
Can someone explain these few lines of MSIL? Why does it move a value
Is there anything simple Java can't do that can be done in a similar
I hope I can explain this clearly enough. I have my main form (A)
I'm new to WPF and data binding so hopefully I can explain the problem
I've run into a really strange bug, that I'm hoping someone can explain. I
Can someone explain the mechanics of a jump table and why is would be
Can someone explain to me the advantages of using an IOC container over simply
Can you explain STA and MTA in your own words? Also, what are apartment

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.