Test Driven Development

(Difference between revisions)
Jump to: navigation, search
(added idea 3)
(adde monopoly example and updated code affine giving us permission)
Line 27: Line 27:
  
 
=== TDD "Lessons" ===
 
=== TDD "Lessons" ===
* https://dzone.com/articles/Write-JUnit-Tests-in-Spring-With-Mocked-and-Real-Objects
+
* http://www.codeaffine.com/2014/08/12/junit-in-a-nutshell-hello-world/ , http://www.codeaffine.com/2012/11/26/working-efficiently-with-junit-in-eclipse-2/
** It looks decent, but I think the site is copyright encumbered :-/ all content on it is proprietary in their submission legal text
+
** I have read that referencing material for learning purpose can fall under Fair Use law, but its a gray area
+
 
+
* http://www.codeaffine.com/2014/08/12/junit-in-a-nutshell-hello-world/
+
 
** A superbly written step-by-step walk through of creating a test and then creating the associated functional code
 
** A superbly written step-by-step walk through of creating a test and then creating the associated functional code
 
** It uses JUnit, which is an open source technology - but it uses a helloworld example - not sure if we want this or more of an integration with an existing oss project
 
** It uses JUnit, which is an open source technology - but it uses a helloworld example - not sure if we want this or more of an integration with an existing oss project
** Unknown copyright beyond a ©
+
** Code Affine gave us permission to use!
 +
 
 +
* https://schuchert.wikispaces.com/Cxx+TDD+Monopoly
 +
** Line-by-line explanation of code and tests and process to create Monopoly features via TDD
 +
** Not sure what students would do, as all answers are given
 +
** CC-BY-SA
 +
 
 +
* https://dzone.com/articles/Write-JUnit-Tests-in-Spring-With-Mocked-and-Real-Objects
 +
** Specific to spring framework, and not for beginners; possibly complex to implement for beginners
 +
**I think DZone is copyright encumbered :-/ all content on it is proprietary in their submission legal text
  
 
* http://technologyconversations.com/2013/12/20/test-driven-development-tdd-example-walkthrough/ http://osherove.com/tdd-kata-1/ https://vimeo.com/8506325
 
* http://technologyconversations.com/2013/12/20/test-driven-development-tdd-example-walkthrough/ http://osherove.com/tdd-kata-1/ https://vimeo.com/8506325

Revision as of 15:15, 17 February 2016

Contents

Examples of OSS projects that use TDD

Best examples

  • https://github.com/unclebob/fitnesse
    • Written by one of the Agile Manifesto co-authors
    • Very clean code, tests in /test directory
    • Not as well known, but might be easier for students to understand

Weaker examples


TDD "Lessons"

  • https://github.com/orfjackal/tdd-tetris-tutorial
    • Tetris based TDD
    • It gives you test cases, already written, and you code to satisfy the tests
    • License says "You may use and modify this material freely for personal non-commercial use. This material may NOT be used as course material without prior written agreement."


Background reading


Ideas and research

TDD

  • Idea 1: Find a project that already has a testing harness and associated tests; learn it, and add a new unit test
  • Idea 2: Create a test harness to make, build, and run unit tests on an existing open source project
    • Jim Bowring has done this in the past, though it seems they are lengthy projects vs a shorter activity; Do we want to create a “project”-oriented LA?
  • Idea 3: Use an existing JUnit exercise / tutorial to teach a simple TDD test first, code after scenario
  • Teach the “mental discipline” of testing
  • How can we test a Requirement?
    • Ensuring testing starts at user requirement gathering
    • Iterating through tests once code has been written, helps to improve the tests
Personal tools
Namespaces
Variants
Actions
Events
Learning Resources
HFOSS Projects
Evaluation
Navigation
Toolbox