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 8183567
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T01:12:05+00:00 2026-06-07T01:12:05+00:00

The basic question is How should one start with writing unit and integration testing

  • 0

The basic question is “How should one start with writing unit and integration testing for a untested project? Especially considering the fact that the person is not familiar with the code and has not done integration testing before.“

Consider the scenario where unit tests and integration tests have to be written for a project. The project uses Java/J2EE technology does not have any tests written at all.

The dilemma that I face is since I have not written the code, I don’t want to refactor the code immediately to write tests. I also have to select a testing framework. I am thinking of using Mockito and Powermock.

I also have to estimate code coverage for the tests. And then perform integration testing. I will have to research on integration testing tools and select one. I have not done any integration testing or estimated acceptable level of code coverage for a project before.

Since I am working independently, if there are some strategies, tips, suggestions on what should I start with and tools that one can recommend, I will appreciate it.

  • 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-06-07T01:12:06+00:00Added an answer on June 7, 2026 at 1:12 am

    First comes first:

    1. Understand the architecture, what are the main components?
    2. If you have no good overview of the features and functions the program offers, make a list of them and create a hierarchy of them
    3. Get familiar with the code, I recommend the following approach:
      • after you understand where the code of its different components are started, try to figure out the method invocation hierarchy (in Eclipse you can easily jump the source code definitions by pressing F3)
      • later you can do the same, while debugging the code, this way it will jump automatically to the definitions, plus you can observe how the state of the program changes

    For Unit Testing itself, I can recommend Clean Code Chapter 9 (circa 12 pages) for starters. It uses JUnit for the example and gives a very good introduction how good testing is done.

    There you will learn things like the F.I.R.S.T. principle, that Unit Tests should be:

    Fast, Independent, Repeatable, Self-Validating and Timly

    Some clarifications, JUnit is the most used and accepted test framework itself. Mockito and Powermock are mocking frameworks, they are used together with JUnit when you want to do integration tests.

    For code coverage I can only recommend Cobertura, but there are many more.

    Cobertura

    Start with unit tests before you dive into integration tests (bottom-up), you can also do it the other way around (top-bottom), but since you say you are not so much experienced I would stay stick to the first.

    Finally, just go for it and get started. You will learn the most and fastest while actually writing the test code.

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

Sidebar

Related Questions

My question is : from basic which are the necessary jars that should required
This is pretty basic question around unit testing. I have a method e.g. GetOrderDetails
I know this should be a basic question but I am hitting a brick
This should be a very basic design question, but for some reason it doesn't
Very basic question - how to get one value from a generator in Python?
This is probably a basic question. I have two projects: A web application project,
I have a very basic question about ViewPager. I have a ViewPagerActivity that includes
I am aware that this is a very basic question, but an interviewer asked
Basic question - is it possible to access the current Page from a static
Basic question.. had to ask. Any help will be appreciated. Q: Why can't I

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.