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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T17:23:25+00:00 2026-06-13T17:23:25+00:00

I am basically practicing with Java socket programming by building client and server (not

  • 0

I am basically practicing with Java socket programming by building client and server (not necessarily HTTP server). In brief, the clients are sending request through sockets to server and server adds requests to task queue. The thread pool initially has certain number of threads and each free one is assigned to one runnable task in the task queue. My web server also has a simple storage that stores and retrieves data from a file from disk. In this project, I have to take care of several concurrency issues.

Basically, I have to build client, server, thread pool, handler, storage. However, I want to test thoroughly in a good systematic way (unit test, integration test, etc.). I don’t have much experience in testing so I am looking for pointers, methodologies, frameworks, or tutorials. (I use Ant to automate building, and initially consider JUnit and EasyMock for testing)

architecture

  • 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-13T17:23:27+00:00Added an answer on June 13, 2026 at 5:23 pm

    Before testing, I’d start by coding some rough and ready prototpye code. Just to see it working and to get a feel for the APIs I will be using.

    Then introduce some unit tests with JUnit (there are other frameworks but JUnit is ubiquitous, and you’ll find plenty of tutorials to get you started).

    If your object needs to interact with some other Objects to complete it’s tasks, then use mocks (EasyMock or whatever) to provide the interaction – this will probably lead to a bit of re-factoring.

    Once you are happy, you can start to look at testing how your Objects interact, you can write new (integration) tests that replace the Mocks with the real thing. Greater interaction results in greater complexity.

    Some things to remember

    • trivial methods aren’t worth testing (e.g. simple accessors)
    • 100% coverage is a waste of time
    • any test is better than none
    • Unit test is easier to achieve than integration test
    • Not all tests are functional
    • Testing multi-threaded applications is hard

    There is a book on how Google does testing. Basically they don’t write tests until something looks viable. They have engineers who advise on how to structure code for testing. The point is:

    • Runnable code is the goal
    • Tests add to that goal, but do not replace it
    • Writing code that can be tested is a learnt skill
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Well basically, one of my mates was practicing JS and he had an idea
basically I want to validate whether or not a text box is a certain
Basically what I'm doing is building a desktop application that needs to connect to
Basically i'd like to allow an arbitrary (but not empty ) number of key-value
I'm playing around with native javascript. I'm basically practicing basic node manipulations such --
So, basically I am practicing some algorithms. And I am trying to figure out
Basically, I would like a brief explanation of how I can access a SQL
Basically I need to verify that a certain program is not running before installation.
Basically I have this server app I built in vc#, and for some reason
Basically I need to get older version of a file in the repository without

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.