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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T04:13:44+00:00 2026-05-29T04:13:44+00:00

I’m really confused here. Let’s say my user story looks like this. A user

  • 0

I’m really confused here. Let’s say my user story looks like this.

“A user must be able to look at the stats of every player in the league so that he can scout
properly.”

Maybe the user story is bad but still how am I supposed to TDD that? I’m I supposed to test against the property I am expecting? I am really lost here and would appreciate your point of view.

EDIT: I am fairly new to TDD but I get the basic and have done a few katas

  • 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-29T04:13:46+00:00Added an answer on May 29, 2026 at 4:13 am

    What you’re describing isn’t really fine-grained enough to TDD in code, but you can break it down.

    First of all, how are they going to be presented with the information they need to do the search? Are they going to see all the stats? Search for a player? Search for a particular stat? This gives you finer-grained behavior, and now you can start thinking about the interface that the user will use. Think of just one example of something the user does – maybe searching for a player, perhaps visiting the first page, etc. Make it something interesting but simple.

    Once you know what this part of the UI will look like, you can code it. (You could TDD it but normally the interface changes quite a bit and UI automation is hard, so most people don’t TDD UIs).

    The UI will want to get some information from somewhere, and pass some information back. You’ll find yourself thinking about a collaborating class – probably a controller or a presenter – which will help the UI. In turn, that controller will want to control the interactions between some other classes – the UI itself, the repository for player stats, security, validation, etc. This is the first class you’ll write tests for.

    You can now start writing the test for the controller. You already know how the UI is going to use it. Just write an example of how another class might be able to use the controller in the same way, what kind of information the controller needs, and what outcome you get when you use it.

    Of course, you don’t have any other classes yet, and the controller might need them. Use interfaces for the roles that those classes will play, dependency-inject them, and mock or stub them out in your test.

    At some point the controller will be ready to do something, but you still can’t run the application because you haven’t finished coding the collaborating classes – they’re still just interfaces. Do the same thing again for them – pretend you’re the controller, using them, and if they need any other classes, mock or stub them out.

    Eventually you won’t have any classes to mock or stub, and the first scenario in the user interface will run. If you want to get faster feedback, at any point you can just hard-code some data so that the UI runs and you can see what it looks like.

    Doing it this way is called outside-in, and is related to BDD, a slightly different way of thinking about TDD. I hope that this page might help you.

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

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
Let's say I'm outputting a post title and in our database, it's Hello Y’all
For some reason, after submitting a string like this Jack’s Spindle from a text
I would like to run a str_replace or preg_replace which looks for certain words
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have this code to decode numeric html entities to the UTF8 equivalent character.
I am trying to render a haml file in a javascript response like so:
I would like to count the length of a string with PHP. The string
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString

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.