SlideShare une entreprise Scribd logo
1  sur  14
Télécharger pour lire hors ligne
TEST DRIVEN
DEVELOPMENT
A development practice you should not skip
• Computer Science graduate from the American University of Beirut.
• Currently freelancing in software engineering and design
• Focused mainly on Mobile Development using best practices and Agile
methods
• Thriving to be an international speaker in different topics
A BRIEF ABOUT ME
Jad Salhani
3
1. Introduction to TDD
2. Why TDD?
3. TDD vs ADD
4. TDD and Agile
5. Live Demo
OUR PROGRAM
WHAT IS TDD?
• As the name suggests, the tests drive your development
• When developing a product / feature, first the Test is
designed
• The test will be based on the product spec, and thus will
drive the correct development of the feature
• After the test is written, you keep writing code until it no
longer fails
4
For example:
12 class ExampleTest extends TestCase
13 {
14 /**
15 * A basic functional test example.
16 *
17 * @return void
18 */
19 public function testBasicExample()
20 {
21 $this->visit('/')
22 ->see('Laravel');
23 }
24
25 public function testAdditionEquation(){
26 $x = 1;
27 $this->assertEquals(2, $x+$x);
28 }
29 }
• A significant advantage of TDD is that it enables you to take
small steps when writing software. 
• It is much easier to find, and then fix, defects if you've
written two new lines of code than two thousand
• Especially handy in large-scale projects
• Stable guide for feature development
WHY TDD?
“If it's worth building, it's worth testing.
If it's not worth testing, why are you wasting your time working on it?”
TDD VS ADD
• Single Test Suite written at the
beginning (“Acceptance Test”)
• Test Suite covers a large product
specification, not a single feature /
component
• Keep writing code until the test
passes
• Move on to next test / End product
development
“Begin with the end in mind.” — Stephen R. Covey
19 public function testLogin()
20 {
21 $this->assertTrue(true);
22 }
23
24 public function testRegistration()
25 {
26 $this->assertTrue(true);
27 }
28
29 public function testGetItems()
30 {
31 $this->assertTrue(true);
32 }
33
34 public function testPurchaseItem()
35 {
36 $this->assertTrue(true);
37 }
38
39 public function testViewItemDetail()
40 {
41 $this->assertTrue(true);
42 }
• Write all
product tests
from the start
• Keep writing
code until they
pass
ADD EXAMPLE
• First write the test for the feature
TDD EXAMPLE
19 public function testLogin()
20 {
21 $this->assertTrue(true);
22 }
• Then write the feature
9 class TestController extends Controller
10 {
11 public function loginUser(){
12 // Some login code in the database
13 }
14 }
• Then run the test
IT FAILS :D
REPEAT
TDD AND AGILE
AGILE MODEL-DRIVEN
DEVELOPMENT (AMDD)
• AMDD addresses the agile scaling issues that TDD
does not.
• TDD provides detailed specification (tests) whereas
AMDD is better for thinking through bigger issues.
• TDD provides concrete evidence that your
software works whereas AMDD supports your
team, including stakeholders, in working toward a
common understanding.
LIVE DEMO
@JadSalhani
github.com/jadsalhani
THANK YOU

Contenu connexe

Tendances

Growing Object Oriented Software
Growing Object Oriented SoftwareGrowing Object Oriented Software
Growing Object Oriented Software
Annmarie Lanesey
 
Inrotduction of Testing
Inrotduction of TestingInrotduction of Testing
Inrotduction of Testing
Palash Ghosh
 

Tendances (19)

Continuous business goal validation
Continuous business goal validationContinuous business goal validation
Continuous business goal validation
 
TDD (Test Driven Design)
TDD (Test Driven Design)TDD (Test Driven Design)
TDD (Test Driven Design)
 
Tdd
TddTdd
Tdd
 
Test Driven Development (TDD)
Test Driven Development (TDD)Test Driven Development (TDD)
Test Driven Development (TDD)
 
Agile Testing - Not Just Tester’s Story _ Dang Thanh Long
Agile Testing - Not Just Tester’s Story _ Dang Thanh LongAgile Testing - Not Just Tester’s Story _ Dang Thanh Long
Agile Testing - Not Just Tester’s Story _ Dang Thanh Long
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
A Brief Introduction to Test-Driven Development
A Brief Introduction to Test-Driven DevelopmentA Brief Introduction to Test-Driven Development
A Brief Introduction to Test-Driven Development
 
Growing Object Oriented Software
Growing Object Oriented SoftwareGrowing Object Oriented Software
Growing Object Oriented Software
 
TDD talk
TDD talkTDD talk
TDD talk
 
Inrotduction of Testing
Inrotduction of TestingInrotduction of Testing
Inrotduction of Testing
 
Ian Cooper webinar for DDD Iran: Kent beck style tdd seven years after
Ian Cooper webinar for DDD Iran: Kent beck style tdd   seven years afterIan Cooper webinar for DDD Iran: Kent beck style tdd   seven years after
Ian Cooper webinar for DDD Iran: Kent beck style tdd seven years after
 
Integrate Test Activities in Agile
Integrate Test Activities in AgileIntegrate Test Activities in Agile
Integrate Test Activities in Agile
 
Test-Driven Development
Test-Driven DevelopmentTest-Driven Development
Test-Driven Development
 
Why Automated Testing Matters To DevOps
Why Automated Testing Matters To DevOpsWhy Automated Testing Matters To DevOps
Why Automated Testing Matters To DevOps
 
Test-Driven Development
Test-Driven DevelopmentTest-Driven Development
Test-Driven Development
 
Cost of defects
Cost of defectsCost of defects
Cost of defects
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
TDD in Agile
TDD in AgileTDD in Agile
TDD in Agile
 

En vedette

EN - Visual Planning Brochure in English
EN - Visual Planning Brochure in EnglishEN - Visual Planning Brochure in English
EN - Visual Planning Brochure in English
Visual Planning
 
One storytheoryquestionnotes
One storytheoryquestionnotesOne storytheoryquestionnotes
One storytheoryquestionnotes
16pcooley48
 

En vedette (20)

EN - Visual Planning Brochure in English
EN - Visual Planning Brochure in EnglishEN - Visual Planning Brochure in English
EN - Visual Planning Brochure in English
 
U.S. Aluminum Insulated Wire And Cable Market. Analysis And Forecast to 2020
U.S. Aluminum Insulated Wire And Cable Market. Analysis And Forecast to 2020U.S. Aluminum Insulated Wire And Cable Market. Analysis And Forecast to 2020
U.S. Aluminum Insulated Wire And Cable Market. Analysis And Forecast to 2020
 
Catalog takigen - Beeteco.com
Catalog takigen  - Beeteco.comCatalog takigen  - Beeteco.com
Catalog takigen - Beeteco.com
 
краљево
краљевокраљево
краљево
 
Aula Paula Rizzo
Aula Paula RizzoAula Paula Rizzo
Aula Paula Rizzo
 
One storytheoryquestionnotes
One storytheoryquestionnotesOne storytheoryquestionnotes
One storytheoryquestionnotes
 
8 regalos
8 regalos8 regalos
8 regalos
 
EN - E-Mail Sending Module
EN - E-Mail Sending ModuleEN - E-Mail Sending Module
EN - E-Mail Sending Module
 
Audiovisualidades Soterradas: escavando o internet archive (ALCAR 2015)
Audiovisualidades Soterradas: escavando o internet archive (ALCAR 2015)Audiovisualidades Soterradas: escavando o internet archive (ALCAR 2015)
Audiovisualidades Soterradas: escavando o internet archive (ALCAR 2015)
 
Bảng giá Circutor - Beeteco.com
Bảng giá Circutor - Beeteco.comBảng giá Circutor - Beeteco.com
Bảng giá Circutor - Beeteco.com
 
Bảng giá dây cáp điện CADISUN tháng 9 năm 2016
Bảng giá dây cáp điện CADISUN tháng 9 năm 2016Bảng giá dây cáp điện CADISUN tháng 9 năm 2016
Bảng giá dây cáp điện CADISUN tháng 9 năm 2016
 
Agile sap high-level introduction by ensead advisory
Agile sap   high-level introduction by ensead advisoryAgile sap   high-level introduction by ensead advisory
Agile sap high-level introduction by ensead advisory
 
mkt mobile
mkt mobilemkt mobile
mkt mobile
 
5 things i learnt by travelling
5 things i learnt by travelling5 things i learnt by travelling
5 things i learnt by travelling
 
Il carattere rigido: lettura del corpo in bioenergetica
Il carattere rigido: lettura del corpo in bioenergeticaIl carattere rigido: lettura del corpo in bioenergetica
Il carattere rigido: lettura del corpo in bioenergetica
 
3. nutrição entérica
3. nutrição entérica3. nutrição entérica
3. nutrição entérica
 
Bảng giá Đèn báo nút nhấn, Relay, Timer IDEC - Beeteco.com
Bảng giá Đèn báo nút nhấn, Relay, Timer IDEC - Beeteco.comBảng giá Đèn báo nút nhấn, Relay, Timer IDEC - Beeteco.com
Bảng giá Đèn báo nút nhấn, Relay, Timer IDEC - Beeteco.com
 
Go down wiring
Go down wiringGo down wiring
Go down wiring
 
Ap World History Intro
Ap World History IntroAp World History Intro
Ap World History Intro
 
DOES16 London - Ron van Kemenade - Nothing Beats Engineering Talent…The Agile...
DOES16 London - Ron van Kemenade - Nothing Beats Engineering Talent…The Agile...DOES16 London - Ron van Kemenade - Nothing Beats Engineering Talent…The Agile...
DOES16 London - Ron van Kemenade - Nothing Beats Engineering Talent…The Agile...
 

Similaire à TDD Agile Tour Beirut

Test driven development
Test driven developmentTest driven development
Test driven development
Harry Potter
 
Test driven development
Test driven developmentTest driven development
Test driven development
Luis Goldster
 
Test driven development
Test driven developmentTest driven development
Test driven development
Tony Nguyen
 
Test driven development
Test driven developmentTest driven development
Test driven development
Young Alista
 
Test driven development
Test driven developmentTest driven development
Test driven development
James Wong
 
Test driven development
Test driven developmentTest driven development
Test driven development
Fraboni Ec
 

Similaire à TDD Agile Tour Beirut (20)

Test Driven Development Introduction
Test Driven Development IntroductionTest Driven Development Introduction
Test Driven Development Introduction
 
Test driven development v1.0
Test driven development v1.0Test driven development v1.0
Test driven development v1.0
 
A la découverte des google/test (aka gtest)
A la découverte des google/test (aka gtest)A la découverte des google/test (aka gtest)
A la découverte des google/test (aka gtest)
 
Reduce Development Cost with Test Driven Development
Reduce Development Cost with Test Driven DevelopmentReduce Development Cost with Test Driven Development
Reduce Development Cost with Test Driven Development
 
How BDD enables True CI/CD
How BDD enables True CI/CDHow BDD enables True CI/CD
How BDD enables True CI/CD
 
TDD reloaded - JUGTAA 24 Ottobre 2012
TDD reloaded - JUGTAA 24 Ottobre 2012TDD reloaded - JUGTAA 24 Ottobre 2012
TDD reloaded - JUGTAA 24 Ottobre 2012
 
Tdd 1-introduction
Tdd 1-introductionTdd 1-introduction
Tdd 1-introduction
 
Test Driven Development - Overview and Adoption
Test Driven Development - Overview and AdoptionTest Driven Development - Overview and Adoption
Test Driven Development - Overview and Adoption
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
Test driven development
Test driven developmentTest driven development
Test driven development
 
Test driven development
Test driven developmentTest driven development
Test driven development
 
Test driven development
Test driven developmentTest driven development
Test driven development
 
Test driven development
Test driven developmentTest driven development
Test driven development
 
Test driven development
Test driven developmentTest driven development
Test driven development
 
Test driven development
Test driven developmentTest driven development
Test driven development
 
tem7
tem7tem7
tem7
 
Joe Cisar - Everything I Know About TDD - Agile Midwest 2019
Joe Cisar - Everything I Know About TDD - Agile Midwest 2019Joe Cisar - Everything I Know About TDD - Agile Midwest 2019
Joe Cisar - Everything I Know About TDD - Agile Midwest 2019
 
Agile Testing - What is it?
Agile Testing - What is it?Agile Testing - What is it?
Agile Testing - What is it?
 
Agile Testing
Agile Testing  Agile Testing
Agile Testing
 

Plus de Agile Tour Beirut

Plus de Agile Tour Beirut (20)

Implementing Tomorrow's Business Model
Implementing Tomorrow's Business ModelImplementing Tomorrow's Business Model
Implementing Tomorrow's Business Model
 
Valuable Agile Retrospectives | Ben Linders
Valuable Agile Retrospectives | Ben LindersValuable Agile Retrospectives | Ben Linders
Valuable Agile Retrospectives | Ben Linders
 
How to Becomea Better Scrum Master | Ben Linders
How to Becomea Better Scrum Master | Ben LindersHow to Becomea Better Scrum Master | Ben Linders
How to Becomea Better Scrum Master | Ben Linders
 
Aligned autonomy | Bernhard Sterchi
Aligned autonomy | Bernhard SterchiAligned autonomy | Bernhard Sterchi
Aligned autonomy | Bernhard Sterchi
 
Marketing before having a product | Georges Abi-Aad | Lebanon
Marketing before having a product | Georges Abi-Aad | Lebanon Marketing before having a product | Georges Abi-Aad | Lebanon
Marketing before having a product | Georges Abi-Aad | Lebanon
 
How to develop your 1-page personal plan Workshop | Guillaume Warnery | Lebanon
How to develop your 1-page personal plan Workshop | Guillaume Warnery | LebanonHow to develop your 1-page personal plan Workshop | Guillaume Warnery | Lebanon
How to develop your 1-page personal plan Workshop | Guillaume Warnery | Lebanon
 
Heart of Agile: What is Agile?
Heart of Agile: What is Agile?Heart of Agile: What is Agile?
Heart of Agile: What is Agile?
 
Agile @SAP Why and How?
Agile @SAP Why and How?Agile @SAP Why and How?
Agile @SAP Why and How?
 
Complexity in the company
Complexity in the companyComplexity in the company
Complexity in the company
 
Beyond Budgeting - Bjarte Bogsnes
Beyond Budgeting - Bjarte BogsnesBeyond Budgeting - Bjarte Bogsnes
Beyond Budgeting - Bjarte Bogsnes
 
Estimation Games – Pascal Van Cauwenberghe
Estimation Games – Pascal Van CauwenbergheEstimation Games – Pascal Van Cauwenberghe
Estimation Games – Pascal Van Cauwenberghe
 
Managers to the beach – Gulnur Bayhan
Managers to the beach – Gulnur BayhanManagers to the beach – Gulnur Bayhan
Managers to the beach – Gulnur Bayhan
 
Recognition: The philosopher’s stone of every improvement in the Agile team a...
Recognition: The philosopher’s stone of every improvement in the Agile team a...Recognition: The philosopher’s stone of every improvement in the Agile team a...
Recognition: The philosopher’s stone of every improvement in the Agile team a...
 
How to simulate the office, online! – Lisette Sutherland
How to simulate the office, online! – Lisette SutherlandHow to simulate the office, online! – Lisette Sutherland
How to simulate the office, online! – Lisette Sutherland
 
Introduction to Scrum – Hassan Jaffal
Introduction to Scrum – Hassan Jaffal Introduction to Scrum – Hassan Jaffal
Introduction to Scrum – Hassan Jaffal
 
The State Startups – Matti Schneider
The State Startups – Matti SchneiderThe State Startups – Matti Schneider
The State Startups – Matti Schneider
 
How To Start My Kanban – Pierre Neis
How To Start My Kanban – Pierre NeisHow To Start My Kanban – Pierre Neis
How To Start My Kanban – Pierre Neis
 
DevOps - A mindset change – Rami Farran
DevOps - A mindset change – Rami FarranDevOps - A mindset change – Rami Farran
DevOps - A mindset change – Rami Farran
 
How to reduce product release cycles down to 4 weeks – Youssif Asfour
How to reduce product release cycles down to 4 weeks – Youssif AsfourHow to reduce product release cycles down to 4 weeks – Youssif Asfour
How to reduce product release cycles down to 4 weeks – Youssif Asfour
 
Unleashing the power of creativity and innovation - Andreas Hägglund
Unleashing the power of creativity and innovation - Andreas HägglundUnleashing the power of creativity and innovation - Andreas Hägglund
Unleashing the power of creativity and innovation - Andreas Hägglund
 

Dernier

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Dernier (20)

Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 

TDD Agile Tour Beirut

  • 1. TEST DRIVEN DEVELOPMENT A development practice you should not skip
  • 2. • Computer Science graduate from the American University of Beirut. • Currently freelancing in software engineering and design • Focused mainly on Mobile Development using best practices and Agile methods • Thriving to be an international speaker in different topics A BRIEF ABOUT ME Jad Salhani
  • 3. 3 1. Introduction to TDD 2. Why TDD? 3. TDD vs ADD 4. TDD and Agile 5. Live Demo OUR PROGRAM
  • 4. WHAT IS TDD? • As the name suggests, the tests drive your development • When developing a product / feature, first the Test is designed • The test will be based on the product spec, and thus will drive the correct development of the feature • After the test is written, you keep writing code until it no longer fails 4
  • 5. For example: 12 class ExampleTest extends TestCase 13 { 14 /** 15 * A basic functional test example. 16 * 17 * @return void 18 */ 19 public function testBasicExample() 20 { 21 $this->visit('/') 22 ->see('Laravel'); 23 } 24 25 public function testAdditionEquation(){ 26 $x = 1; 27 $this->assertEquals(2, $x+$x); 28 } 29 }
  • 6. • A significant advantage of TDD is that it enables you to take small steps when writing software.  • It is much easier to find, and then fix, defects if you've written two new lines of code than two thousand • Especially handy in large-scale projects • Stable guide for feature development WHY TDD? “If it's worth building, it's worth testing. If it's not worth testing, why are you wasting your time working on it?”
  • 7. TDD VS ADD • Single Test Suite written at the beginning (“Acceptance Test”) • Test Suite covers a large product specification, not a single feature / component • Keep writing code until the test passes • Move on to next test / End product development “Begin with the end in mind.” — Stephen R. Covey
  • 8. 19 public function testLogin() 20 { 21 $this->assertTrue(true); 22 } 23 24 public function testRegistration() 25 { 26 $this->assertTrue(true); 27 } 28 29 public function testGetItems() 30 { 31 $this->assertTrue(true); 32 } 33 34 public function testPurchaseItem() 35 { 36 $this->assertTrue(true); 37 } 38 39 public function testViewItemDetail() 40 { 41 $this->assertTrue(true); 42 } • Write all product tests from the start • Keep writing code until they pass ADD EXAMPLE
  • 9. • First write the test for the feature TDD EXAMPLE 19 public function testLogin() 20 { 21 $this->assertTrue(true); 22 } • Then write the feature 9 class TestController extends Controller 10 { 11 public function loginUser(){ 12 // Some login code in the database 13 } 14 } • Then run the test
  • 12. AGILE MODEL-DRIVEN DEVELOPMENT (AMDD) • AMDD addresses the agile scaling issues that TDD does not. • TDD provides detailed specification (tests) whereas AMDD is better for thinking through bigger issues. • TDD provides concrete evidence that your software works whereas AMDD supports your team, including stakeholders, in working toward a common understanding.