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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T21:51:07+00:00 2026-05-10T21:51:07+00:00

Do you put unit tests in the same project for convenience or do you

  • 0

Do you put unit tests in the same project for convenience or do you put them in a separate assembly?

If you put them in a separate assembly like we do, we end up with a number of extra projects in the solution. It’s great for unit testing while coding but how do you release the application without all of these extra assemblies?

  • 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. 2026-05-10T21:51:07+00:00Added an answer on May 10, 2026 at 9:51 pm

    In my opinion, unit tests should be placed in a separate assembly from production code. Here are just a few cons of placing unit tests in the same assembly or assemblies as production code are:

    1. Unit tests get shipped with production code. The only thing shipped with product code is production code.
    2. Assemblies will be unnecessarily bloated by unit tests.
    3. Unit tests can affect build processes like automated or continuous build.

    I don’t really know of any pros. Having an extra project (or 10) isn’t a con.

    Edit: More Info On Build and Shipping

    I would further recommend that any automated build process place production and unit tests into different locations. Ideally, the unit test build process only runs if the production code builds, and copies the product files into the unit tests directory. Doing it this way results in the actual bits being separated for shipping, etc. Additionally, it is fairly trivial to run automated unit testing at this point on all tests in a particular directory.

    To summarize, here is the general idea for a daily build and testing and shipping of bits and other files:

    1. Production build runs, placing production files into a specific ‘production’ directory.
      1. Build production projects only.
      2. Copy compiled bits and other files into a ‘production’ directory.
      3. Copy bits and other files into a release candidate directory, aka a Christmas release directory would be ‘Release20081225’.
    2. If production build succeeds, unit test build runs.
      1. Copy production code to ‘tests’ directory.
      2. Build unit tests to ‘tests’ directory.
      3. Run unit tests.
    3. Send build notifications and unit tests results to developers.
    4. When a release candidate (like Release20081225) is accepted, ship these bits.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 94k
  • Answers 94k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You are probably hitting the shell builtin echo. Try using… May 11, 2026 at 6:45 pm
  • Editorial Team
    Editorial Team added an answer I've been evaluating these options and here's the conclusion that… May 11, 2026 at 6:45 pm
  • Editorial Team
    Editorial Team added an answer When the class violates the SRP, it's time to refactor.… May 11, 2026 at 6:45 pm

Related Questions

Having just read the first four chapters of Refactoring: Improving the Design of Existing
Imagine that you want to develop a non-trivial end-user desktop (not web) application in
I'm not sure if this has been asked or not yet, but how much
I am modifying a Nant build script to run some unit tests. I have

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.