I was given kata to work on the weekend. Before starting, I just wanted to collect my thoughts. I'm not looking for a solution, just some ideas on best approach / practice.
From the conversation that I had, it would seem, I need to use BDD β ATDD (refer to scripts in gherkin) β TDD approach. I'm just looking for the best approach.
My real thinking is
1) Create a specflow project and drag the user's story into the cucumber.
2) Create related acceptance tests in gherkin (scripts) using the GWT syntax, and thus generate my ATTD style tests in the [binding] class (right-click βgenerateβ).
3) Take the ATDD tests with the cucumber.
I mean, tests that reference directly to the ATTD tests in my gherkin file do not give me a sufficiently low level of testing.
So what should I do? I write my ATDD tests at a high level, and then, before passing them, I dig deeper and just write pure TDD tests for designing lower-level objects?
Yes, I did not develop how to work in full BDD (pure style) style, but I just wondered how I dig. I appreciate that you should work gradually and pass one test and pass, but I feel that I need to start the test at a high ATDD level and then go deeper, so higher level tests will not work until I earn my low code level, but following TDD I need to check this low-level code, and therefore I already violated the principle of 1 unit test, and then switched to the refactor .....
, - , , "" , . , ββ... ( , , , , , , ). , , : -)
, TDD. ? , 1 specflow .test, .
P.S. , , . . +1 , , , : -/
, ,
User Story Front
+--------------------------------------------------+
| |
| Title: Waste an Hour Having Fun |
| |
| As a frequent games player, |
| I'd like to play rock, paper, scissors |
| so that I can spend an hour of my day having fun |
| |
| Acceptance Criteria |
| - Can I play Player vs Computer? |
| - Can I play Computer vs Computer? |
| - Can I play a different game each time? |
| |
+--------------------------------------------------+
User Story Back
+--------------------------------------------------+
| |
| Technical Constraints |
| |
| - Doesn't necessarily need a flashy GUI |
| (can be simple) |
| - Can use any modern language |
| |
| - Libs / external modules should only be used |
| for tests |
| - Using best in industry practices |
| |
+--------------------------------------------------+
? http://en.wikipedia.org/wiki/Rock-paper-scissors
(, ).
(.. ), - 2 3 () .
, , . Java, .NET, , .
#.
, # ASP.Net MVC.