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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T17:52:41+00:00 2026-06-18T17:52:41+00:00

I have read/watched so much about TDD & BDD recently that I really want

  • 0

I have read/watched so much about TDD & BDD recently that I really want to master it. I have been a developer that only writes code and then tests it from outside (like we always started). The problem seems to be in getting up and running with TDD. I want to just create a simple Winform app in which I want to show a list of something lets say products. I just don’t know where to get started, should I write a test for controller first? the controller needs reference to view and service and so on so forth. ASP.Net MVC is built for testing therefore it is a bit easy to get started but Winforms are a real pain. Kindly give me some Videos (Most preffered) that show TDD in Winforms.

I have watched tons of videos that show you testing a class or feature but how do you test UI that does not support testing?

In short I want to know if anyone has been doing TDD for a while, how
does he/she do it in Winforms?

I have written loads of code that I just delete because I get stuck, Please help!

  • 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-18T17:52:42+00:00Added an answer on June 18, 2026 at 5:52 pm

    Here’s how I do it for any kind of UI, be it Web or Winforms or WPF or Swing in Java or even a web service interface that’s going to be used by another system.

    • Write the UI, and hard-code any data behind it.
    • Write a controller, and move the hard-coded data to the controller. The controller should just be presenting the data in a form that the UI can understand.

    Your controller now has no behavior; just static data – but it’s got the right API for the UI, and now you know how the UI wants to use it.

    • Write an example that shows how the UI will use the controller in the most basic form.
    • Make the example work.
    • Write another example that shows how the controller behaves differently in a different context.
    • Make the example work.

    Those are your unit tests! If you know that your controller is going to need some other classes to collaborate with, you can mock those out too.

    Once your collaborators are mocked out, you already know how the controller wants to use them. Again, you have the API for those collaborators already, because the controller is using them.

    This is what we’re doing when we talk about “outside-in” in BDD.

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

Sidebar

Related Questions

I have a rails app that stores movies watched, books read, etc. The index
I have read many answers to questions about dynamically resizing NSWindows and nothing has
I have read pretty much the entire documentation even beyond on the AWS AS
I have read few articles about table partioning but still I am bit confused
I have read that GLSL (specifically v1.0.17: my application is running under WebGL) compilers
I have read the GCM detail from Google WebSite and watched the Google IO
I am making my first gui in C# and I have watched/read a ton
I have to implement a Facebook sharing method... I watched the video, read a
I have read a lot of articles on Dependency Injection as well as watched
I have a news application that has Opengraph integrated and actions approved like read

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.