Test Driven Development

(Difference between revisions)
Jump to: navigation, search
(examples found)
(added lessons found and background readings and additional TDD examples)
Line 1: Line 1:
 
=== Examples of TDD in OSS ===
 
=== Examples of TDD in OSS ===
 +
* http://junit.org/
 +
** Well-known java unit testing framwork written by Kent Beck, inventor or TDD himself
 +
** https://github.com/junit-team/junit
 +
** https://github.com/junit-team/junit/tree/master/src/test
 +
** ex of actual test code: https://github.com/junit-team/junit/blob/master/src/test/java/junit/tests/framework/AssertTest.java
 +
 +
* 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
 +
 +
 +
* http://stackoverflow.com/questions/4174425/open-source-project-developed-using-tdd-and-java
 +
** http://www.sqlite.org/testing.html
 +
** Superb write up by SQLite of how they do extensive testing, but its possibly not developed with TDD principles, or maybe partially.
 +
 
* https://www.quora.com/What-are-examples-of-substantial-open-source-software-written-using-test-driven-development-TDD
 
* https://www.quora.com/What-are-examples-of-substantial-open-source-software-written-using-test-driven-development-TDD
 
** https://github.com/rails/rails
 
** https://github.com/rails/rails
 
** https://travis-ci.org/rails/rails
 
** https://travis-ci.org/rails/rails
 
** https://github.com/rails/rails/pull/23690
 
** https://github.com/rails/rails/pull/23690
 +
** It is said that much of anything rails is developed via TDD
  
* http://stackoverflow.com/questions/4174425/open-source-project-developed-using-tdd-and-java
+
* https://github.com/AutoFixture/AutoFixture
** http://www.sqlite.org/testing.html
+
** https://github.com/AutoFixture/AutoFixture/blob/master/Src/AutoFixture.xUnit.net.UnitTest/AutoDataAttributeTest.cs
** Superb write up of how they do extensive testing, but its possibly not developed with TDD principles, or maybe partially.
+
** Another TDD example project, but its around .NET .... meh
  
* https://github.com/unclebob/fitnesse
+
=== TDD "Lessons" ===
** Written by one of the Agile Manifesto co-authors
+
* https://dzone.com/articles/Write-JUnit-Tests-in-Spring-With-Mocked-and-Real-Objects
** Very clean code, tests in /test directory
+
** It look decent, but I think the site is copyright encumbered :-/ all content on it is proprietary in their submission legal text
 +
** I have read that referncing material for learning purpse can fall under Fair Use law, but its a gray area
  
* http://junit.org/
+
* http://www.codeaffine.com/2014/08/12/junit-in-a-nutshell-hello-world/
** Well-known java unit testing framwork written by Kent Beck, inventor or TDD himself
+
** A superbly written step-by-step walk through of creating a test and then creating the associated functional code
** https://github.com/junit-team/junit
+
** 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
** https://github.com/junit-team/junit/tree/master/src/test
+
** ex of actual test code: https://github.com/junit-team/junit/blob/master/src/test/java/junit/tests/framework/AssertTest.java
+
  
 
=== Ideas and research ===
 
=== Ideas and research ===
 
 
TDD
 
TDD
 
* Idea 1: Find a project that already has a testing harness and associated tests; learn it, and add a new unit test
 
* Idea 1: Find a project that already has a testing harness and associated tests; learn it, and add a new unit test
Line 38: Line 53:
 
** http://foss2serve.org/index.php/Test_Coverage_Activity
 
** http://foss2serve.org/index.php/Test_Coverage_Activity
  
* Info that Nick Ingalls gave me
+
=== Background reading ===
** https://gist.github.com/ingalls/70508ec69c8e97a1c81e pseudo-code TDD
+
** https://github.com/substack/tape tape tap-producing test harness for node and browsers
+
 
+
 
* 5 min TDD overview https://www.youtube.com/watch?v=QCif_-r8eK4
 
* 5 min TDD overview https://www.youtube.com/watch?v=QCif_-r8eK4
 +
* Graphical explanation of TDD http://www.agiledata.org/essays/tdd.html
 
* Is TDD Dead? https://www.youtube.com/watch?v=z9quxZsLcfo
 
* Is TDD Dead? https://www.youtube.com/watch?v=z9quxZsLcfo
 +
* Kent Beck book http://www.amazon.com/exec/obidos/ASIN/0321146530/
 +
* Astels book http://www.amazon.com/exec/obidos/ASIN/0131016490/
 +
* Unit test vs Acceptance test https://dzone.com/articles/Write-JUnit-Tests-in-Spring-With-Mocked-and-Real-Objects
 +
* TDD in a CalPoly course https://users.csc.calpoly.edu/~djanzen/courses/405W10/presentations/TDD.pdf

Revision as of 19:22, 16 February 2016

Contents

Examples of TDD in OSS

  • 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


TDD "Lessons"

  • 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
    • 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

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?
  • 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

Background reading

Personal tools
Namespaces
Variants
Actions
Events
Learning Resources
HFOSS Projects
Evaluation
Navigation
Toolbox