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

The Archive Base Latest Questions

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

This is a sanity check because I’m finding this to be true in our

  • 0

This is a sanity check because I’m finding this to be true in our code. Unlike our functional code, the tests of stateful GUIs have an unfortunate amount of weight due to state setup, combinatorial case analysis, and mocking/faking neighbors/collaborators/listeners/etc. Am I missing something? Thanks for your feedback.

Notes:

  • The tests are running in the JVM, everything is a POJO.
  • So far we’ve gotten some simplification by increasing unit size: testing more pieces glued together.

New Notes:

  • We’re using jUnit and Mockito.
  • 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:42:27+00:00Added an answer on June 13, 2026 at 5:42 pm
    1. Avoid code duplication. Common setup code and actions should be extracted
    2. Look for hierarchy. Don’t write one huge test scenario. Group common lines together and extract them to a meaningfully named method. Proceed building multi-layered test scenario
    3. Consider better tools. cucumber, FEST assertions, Scala or Groovy as test DSL (even if you don’t use them in production code), mockito…

    Besides that, the relation between the number of production and test lines of code is irrelevant. I can easily find an example of extremely short piece of code having so many edge cases that it requires dozens of tests.

    And a real-life example of SQLite (emphasis mine):

    […] library consists of approximately 81.3 KSLOC of C code. […] By comparison, the project has 1124 times as much test code and test scripts – 91421.1 KSLOC.

    That’s right, it’s approximately 1100 lines of test code per each line of production code.

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

Sidebar

Related Questions

I have debugged this legacy code, and would like a sanity check on it.
My ultimate goal is to do this programmatically, but as a sanity check I'm
This question strikes me as almost silly, but I just want to sanity check
My sanity check fails because a double variable does not contain the expected result,
This is just a sanity check, but I've done several test cases before you
This question is largely a sanity check. I've organized a DB by a collection
This one is for all you ALSA guys. I need a sanity check here.
Just a quick sanity check here! If I have a static method in an
I have a file with large number of columns. As a sanity check, I
I have the following code, and having read this , i understand it wont

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.