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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T21:17:37+00:00 2026-05-14T21:17:37+00:00

How do you know if you Test Fixture is right-sized. And by Test Fixture

  • 0

How do you know if you “Test Fixture” is right-sized. And by “Test Fixture” I mean a class with a bunch of tests in it.

One thing that I’ve always noticed with my test fixtures is that they get to be kind of verbose; seeing as they could also be not verbose enough, how do you get a sense of when your unit tests are the right size?

My assumption is that (at least in the context of web development) you should have one test fixture class per page.

I know of a good quote for this and it’s:

“Perfection is achieved, not when there is nothing left to add, but when there is nothing left to remove.” – Antoine de Saint-Exupery.

  • 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-14T21:17:37+00:00Added an answer on May 14, 2026 at 9:17 pm

    This is more to your question I think:

    The metric that I use is “Test until you are comfortable” (not sure of the source). I test until I am comfortable that my code is right. If you have doubts, you probably don’t have enough tests. If you feel like you are wasting your time, you should probably stop.

    Re-reading, I think the following does not answer your question:

    Going by this definition of Test Fixture as the setup functions, objects and mock objects that are required to make the System Under Test function: When I write tests, there is usually code that get replicated, I typically refactor that code and hide it in a region (C#). I try to keep my tests in the 5-10 line range, so if there is code that exceeds this or obfuscates the meaning of the test, I put in the fixture region. I typically don’t worry about too much about fixture size. I worry more about making sure I have enough tests and that my functionality is tested.

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

Sidebar

Related Questions

I know that one of the defining principles of Test driven development is that
I have got to know that src/test/java is used for writing unit tests. I
Does anyone know a good way to test if one element, stored in a
I know that Test Case Management app silently records intellitrace data dump files (
I've got a UnitTest++ test class, which allows me to test that a class
I'm working on a PHP project with solid unit-tests coverage. I've noticed, that last
I need to create some fixtures for django test. Does anyone know of a
I am working with fixtures on rails and I want one of the fixture
I've created some MbUnit Test Fixtures that have SetUp methods marked with the SetUp
does anyone know a little test tool (like Poster / RestTool for Firefox) that

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.