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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T06:13:06+00:00 2026-05-11T06:13:06+00:00

I would like to know how to implement unit testing in an existing (quite

  • 0

I would like to know how to implement unit testing in an existing (quite large) application using visual studio 2008 (.net 2.0).

I understand that developing unit tests for the existing/legacy code is not realistic but I would like to have tests for code moving forward.

I have found plenty of examples on how to write tests for code but nothing on how to set it up from scratch on an existing project, and how to integrate it into the development cycle.

  • 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-11T06:13:07+00:00Added an answer on May 11, 2026 at 6:13 am

    Simple approach:

    • Pick one of unit test frameworks (Nunit, MbUnit, Xunit, VS unit test framework, …)
    • Add project for unit tests in your solution (for example UnitTests).
    • Start writing tests.

    For easier organization, create at least one namespace for each project in solution, for example UnitTest.Project1, UnitTests.Project2, … Depending on size of projects, add more levels to namespace.

    This way test project is part of solution. If you use some continuous integration tool, then tests can be automatically executed on each commit to source code repository.

    Edit:
    Regarding comment on MS Unit Test Framework problem with creating unit tests, there is know problem: ‘Create unit test’ wizard does not work. It looks that there are unsupported types of projects that prevent unit test wizard from working correctly. I just tried with one solution that have one F# and several C# projects. I added unit testing project and tried to add tests. Test wizard had problems until I unloaded F# project. Then everything worked fine.

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

Sidebar

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.