SlideShare uma empresa Scribd logo
1 de 43
Baixar para ler offline
Test-driven-development
How to develop software in high quality mode
&
Who is ?
Hackerstolz is a young club from the Rhine-Neckar region. We organize
Hackathons, promote the digital culture and advocate for more women in the IT
field .
Agenda
- What is test-driven-development (TDD)?
- Basic concept of TDD
- Pro’s and con’s of TDD
- Need of test frameworks and unit tests
- What is a test framework?
- What is a unit test?
- Conclusion
- Live coding: Create StringUtil
What is test-driven-development (TDD)
- Original idea from NASA in Mercury project in 1960
- Mercury project was first try of NASA to send a real human to universe.
What is test-driven-development (TDD)
- Original idea from NASA in Mercury project in 1960
- Mercury project was first try of NASA to send a real human to universe.
- After a while this idea found its way back to development and was
mentioned in the book “Guide to better Smalltalk” from Kent Beck
What is test-driven-development (TDD)
- Original idea from NASA in Mercury project in 1960
- Mercury project was first try of NASA to send a real human to universe.
- After a while this idea found its way back to development and was
mentioned in the book “Guide to better Smalltalk” from Kent Beck
Xtreme Programming
SUnit - Smalltalk
JUnit - Java
Basic concept of TDD
- Test first!
- Write your test code first
- Afterwards write your code unter test
Basic concept of TDD
- Test first!
- Write your test code first
- Afterwards write your code unter test
- Red phase
- First test code has to fail
Basic concept of TDD
- Test first!
- Write your test code first
- Afterwards write your code unter test
- Red phase
- First test code has to fail
- Yellow/Blue phase
- Code under test was writen, test execution runs?
Basic concept of TDD
- Test first!
- Write your test code first
- Afterwards write your code unter test
- Red phase
- First test code has to fail
- Yellow/Blue phase
- Code under test was writen, test execution runs?
- Green phase
- Test execution works succeesfully and code under test is implemented
Pro’s of TDD
- Less code redundancy
Pro’s of TDD
- Less code redundancy
- No hidden features
Pro’s of TDD
- Less code redundancy
- No hidden features
- Clear API which can be tested
Pro’s of TDD
- Less code redundancy
- No hidden features
- Clear API which can be tested
- Code “security” and developer confidence raises
Pro’s of TDD
- Less code redundancy
- No hidden features
- Clear API which can be tested
- Code “security” and developer confidence raises
- Stability of main development branch/trunk
Pro’s of TDD
- Less code redundancy
- No hidden features
- Clear API which can be tested
- Code “security” and developer confidence raises
- Stability of main development branch/trunk
- Customer confidence
Con’s of TDD
- Costly development in time and resources
Con’s of TDD
- Costly development in time and resources
- Writing test code can be very complex
Con’s of TDD
- Costly development in time and resources
- Writing test code can be very complex
- IDE integration is very helpful
Con’s of TDD
- Costly development in time and resources
- Writing test code can be very complex
- IDE integration is very helpful
- More code to write
- Each line has positive and negative test code
Con’s of TDD
- Costly development in time and resources
- Writing test code can be very complex
- IDE integration is very helpful
- More code to write
- Each line has positive and negative test code
- Test framework API’s must be used
Need of test frameworks and unit tests
- You need a test framework to run automated test
Need of test frameworks and unit tests
- You need a test framework to run automated test
- Unit tests form the test suite
Need of test frameworks and unit tests
- You need a test framework to run automated test
- Unit tests form the test suite
- Developer has to adapt test framework usage
Need of test frameworks and unit tests
- You need a test framework to run automated test
- Unit tests form the test suite
- Developer has to adapt test framework usage
- Devide tests into unit, integration, scenario tests
- Test coverage tools needed
What is a test framework?
A test automation framework is an integrated system that sets the rules of
automation of a specific product. This system integrates the function libraries, test
data sources, object details and various reusable modules. These components act
as small building blocks which need to be assembled to represent a business
process. The framework provides the basis of test automation and simplifies the
automation effort
https://en.wikipedia.org/wiki/Test_automation#Framework_approach_in_automation
What is a test framework?
A test automation framework is an integrated system that sets the rules of
automation of a specific product. This system integrates the function libraries,
test data sources, object details and various reusable modules. These
components act as small building blocks which need to be assembled to represent
a business process. The framework provides the basis of test automation and
simplifies the automation effort
https://en.wikipedia.org/wiki/Test_automation#Framework_approach_in_automation
What is a unit test?
- Automated test to run code under test
What is a unit test?
- Automated test to run code under test
- Testing smallest unit of code in an application
What is a unit test?
- Automated test to run code under test
- Testing smallest unit of code in an application
- Code under test should have as little as possible dependencies to other
“units”
What is a unit test?
- Automated test to run code under test
- Testing smallest unit of code in an application
- Code under test should have as little as possible dependencies to other
“units”
- Each unit test should be independent
from others
What is a unit test?
- Automated test to run code under test
- Testing smallest unit of code in an application
- Code under test should have as little as possible dependencies to other
“units”
- Each unit test should be independent
from others
- Using mocks, stubs, spies
What is a unit test?
- Automated test to run code under test
- Testing smallest unit of code in an application
- Code under test should have as little as possible dependencies to other
“units”
- Each unit test should be independent
from others
- Using mocks, stubs, spies
- Can be used for documenation
What is a unit test?
- Automated test to run code under test
- Testing smallest unit of code in an application
- Code under test should have as little as possible dependencies to other
“units”
- Each unit test should be independent
from others
- Using mocks, stubs, spies
- Can be used for documenation
- Prove of concept for architecture
design and API
What is a unit test?
- Automated test to run code under test
- Testing smallest unit of code in an application
- Code under test should have as little as possible dependencies to other
“units”
- Each unit test should be independent
from others
- Using mocks, stubs, spies
- Can be used for documenation
- Prove of concept for architecture
design and API
Conclusion
- Unit testing is important. It helps to…
- reduce the costs of failure
Conclusion
- Unit testing is important. It helps to…
- reduce the costs of failure
- prove architecture and API
Conclusion
- Unit testing is important. It helps to…
- reduce the costs of failure
- prove architecture and API
- makes the usage of software clear
Conclusion
- Unit testing is important. It helps to…
- reduce the costs of failure
- prove architecture and API
- makes the usage of software clear
- But is also…
- difficult to write good tests
Conclusion
- Unit testing is important. It helps to…
- reduce the costs of failure
- prove architecture and API
- makes the usage of software clear
- But is also…
- difficult to write good tests
- a problem with higher test code complexity
Conclusion
- Unit testing is important. It helps to…
- reduce the costs of failure
- prove architecture and API
- makes the usage of software clear
- But is also…
- difficult to write good tests
- a problem with higher test code complexity
- consumption of time
Live coding
- String utility class in node.js
- Requirements:
- Build a single StringUtil class which should
- Chomp string left and right with given template strings
- LowerCase / UpperCase
- Provide fluent API
Test-driven-development
Thank you
&

Mais conteúdo relacionado

Mais procurados

Code-Review-Principles-Process-and-Tools (1)
Code-Review-Principles-Process-and-Tools (1)Code-Review-Principles-Process-and-Tools (1)
Code-Review-Principles-Process-and-Tools (1)
Aditya Bhuyan
 
Current Testing Challenges Ireland
Current Testing Challenges IrelandCurrent Testing Challenges Ireland
Current Testing Challenges Ireland
David O'Dowd
 
Code Review
Code ReviewCode Review
Code Review
Ravi Raj
 
Clean Code III - Software Craftsmanship
Clean Code III - Software CraftsmanshipClean Code III - Software Craftsmanship
Clean Code III - Software Craftsmanship
Theo Jungeblut
 
Code Coverage Revised : EclEmma on JaCoCo
Code Coverage Revised : EclEmma on JaCoCoCode Coverage Revised : EclEmma on JaCoCo
Code Coverage Revised : EclEmma on JaCoCo
Evgeny Mandrikov
 

Mais procurados (20)

Do Bugs Reside in Complex Code?
Do Bugs Reside in Complex Code?Do Bugs Reside in Complex Code?
Do Bugs Reside in Complex Code?
 
Code metrics in PHP
Code metrics in PHPCode metrics in PHP
Code metrics in PHP
 
Code-Review-Principles-Process-and-Tools (1)
Code-Review-Principles-Process-and-Tools (1)Code-Review-Principles-Process-and-Tools (1)
Code-Review-Principles-Process-and-Tools (1)
 
Improving Code Quality Through Effective Review Process
Improving Code Quality Through Effective  Review ProcessImproving Code Quality Through Effective  Review Process
Improving Code Quality Through Effective Review Process
 
Agile code quality metrics
Agile code quality metricsAgile code quality metrics
Agile code quality metrics
 
Functional testing vs non functional testing | Difference Between Functional ...
Functional testing vs non functional testing | Difference Between Functional ...Functional testing vs non functional testing | Difference Between Functional ...
Functional testing vs non functional testing | Difference Between Functional ...
 
API Design - developing for developers
API Design - developing for developersAPI Design - developing for developers
API Design - developing for developers
 
Top 10 static code analysis tool
Top 10 static code analysis toolTop 10 static code analysis tool
Top 10 static code analysis tool
 
Current Testing Challenges Ireland
Current Testing Challenges IrelandCurrent Testing Challenges Ireland
Current Testing Challenges Ireland
 
Server Side Template Injection by Mandeep Jadon
Server Side Template Injection by Mandeep JadonServer Side Template Injection by Mandeep Jadon
Server Side Template Injection by Mandeep Jadon
 
Code Review
Code ReviewCode Review
Code Review
 
Code review in practice
Code review in practiceCode review in practice
Code review in practice
 
Code Review: How and When
Code Review: How and WhenCode Review: How and When
Code Review: How and When
 
Clean Code III - Software Craftsmanship
Clean Code III - Software CraftsmanshipClean Code III - Software Craftsmanship
Clean Code III - Software Craftsmanship
 
Test Driven Design - GDG DevFest Istanbul 2016
Test Driven Design - GDG DevFest Istanbul 2016Test Driven Design - GDG DevFest Istanbul 2016
Test Driven Design - GDG DevFest Istanbul 2016
 
Scrum Events and Artifacts in Action
Scrum Events and Artifacts in ActionScrum Events and Artifacts in Action
Scrum Events and Artifacts in Action
 
SonarQube: Continuous Code Inspection
SonarQube: Continuous Code InspectionSonarQube: Continuous Code Inspection
SonarQube: Continuous Code Inspection
 
Code Coverage Revised : EclEmma on JaCoCo
Code Coverage Revised : EclEmma on JaCoCoCode Coverage Revised : EclEmma on JaCoCo
Code Coverage Revised : EclEmma on JaCoCo
 
How to Embed Codeless Test Automation Into DevOps
How to Embed Codeless Test Automation Into DevOpsHow to Embed Codeless Test Automation Into DevOps
How to Embed Codeless Test Automation Into DevOps
 
Codeception Testing Framework -- English #phpkansai
Codeception Testing Framework -- English #phpkansaiCodeception Testing Framework -- English #phpkansai
Codeception Testing Framework -- English #phpkansai
 

Semelhante a Test driven development

What Good is this Tool? A Guide to Choosing the Right Application Security Te...
What Good is this Tool? A Guide to Choosing the Right Application Security Te...What Good is this Tool? A Guide to Choosing the Right Application Security Te...
What Good is this Tool? A Guide to Choosing the Right Application Security Te...
Kevin Fealey
 
Cost effective web application testing
Cost effective web application testingCost effective web application testing
Cost effective web application testing
Harinath Pudipeddi
 

Semelhante a Test driven development (20)

Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
Unit Testing in JavaScript
Unit Testing in JavaScriptUnit Testing in JavaScript
Unit Testing in JavaScript
 
Test-Driven Development In Action
Test-Driven Development In ActionTest-Driven Development In Action
Test-Driven Development In Action
 
Gcs day1
Gcs day1Gcs day1
Gcs day1
 
Continuous delivery is more than dev ops
Continuous delivery is more than dev opsContinuous delivery is more than dev ops
Continuous delivery is more than dev ops
 
Debugging
DebuggingDebugging
Debugging
 
Testing 101
Testing 101Testing 101
Testing 101
 
An Introduction to Microservices
An Introduction to MicroservicesAn Introduction to Microservices
An Introduction to Microservices
 
The Right Tool for the Right Project
The Right Tool for the Right ProjectThe Right Tool for the Right Project
The Right Tool for the Right Project
 
What Good is this Tool? A Guide to Choosing the Right Application Security Te...
What Good is this Tool? A Guide to Choosing the Right Application Security Te...What Good is this Tool? A Guide to Choosing the Right Application Security Te...
What Good is this Tool? A Guide to Choosing the Right Application Security Te...
 
Cost Effective Web Application Testing
Cost Effective Web Application TestingCost Effective Web Application Testing
Cost Effective Web Application Testing
 
Cost effective web application testing
Cost effective web application testingCost effective web application testing
Cost effective web application testing
 
Cost effective web application testing
Cost effective web application testingCost effective web application testing
Cost effective web application testing
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Effective DevSecOps
Effective DevSecOpsEffective DevSecOps
Effective DevSecOps
 
GNUCITIZEN Dwk Owasp Day September 2007
GNUCITIZEN Dwk Owasp Day   September 2007GNUCITIZEN Dwk Owasp Day   September 2007
GNUCITIZEN Dwk Owasp Day September 2007
 
Tools for Software Testing
Tools for Software TestingTools for Software Testing
Tools for Software Testing
 
Guide to Destroying Codebases The Demise of Clever Code
Guide to Destroying Codebases   The Demise of Clever CodeGuide to Destroying Codebases   The Demise of Clever Code
Guide to Destroying Codebases The Demise of Clever Code
 
Jason Kent - AppSec Without Additional Tools
Jason Kent - AppSec Without Additional ToolsJason Kent - AppSec Without Additional Tools
Jason Kent - AppSec Without Additional Tools
 
Developers’ mDay u Banjoj Luci - Milan Popović, PHP Srbija – Testimony (about...
Developers’ mDay u Banjoj Luci - Milan Popović, PHP Srbija – Testimony (about...Developers’ mDay u Banjoj Luci - Milan Popović, PHP Srbija – Testimony (about...
Developers’ mDay u Banjoj Luci - Milan Popović, PHP Srbija – Testimony (about...
 

Último

Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
chiefasafspells
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
masabamasaba
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
masabamasaba
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
masabamasaba
 

Último (20)

Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go Platformless
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
 
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
tonesoftg
tonesoftgtonesoftg
tonesoftg
 
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 

Test driven development

  • 1. Test-driven-development How to develop software in high quality mode &
  • 2. Who is ? Hackerstolz is a young club from the Rhine-Neckar region. We organize Hackathons, promote the digital culture and advocate for more women in the IT field .
  • 3. Agenda - What is test-driven-development (TDD)? - Basic concept of TDD - Pro’s and con’s of TDD - Need of test frameworks and unit tests - What is a test framework? - What is a unit test? - Conclusion - Live coding: Create StringUtil
  • 4. What is test-driven-development (TDD) - Original idea from NASA in Mercury project in 1960 - Mercury project was first try of NASA to send a real human to universe.
  • 5. What is test-driven-development (TDD) - Original idea from NASA in Mercury project in 1960 - Mercury project was first try of NASA to send a real human to universe. - After a while this idea found its way back to development and was mentioned in the book “Guide to better Smalltalk” from Kent Beck
  • 6. What is test-driven-development (TDD) - Original idea from NASA in Mercury project in 1960 - Mercury project was first try of NASA to send a real human to universe. - After a while this idea found its way back to development and was mentioned in the book “Guide to better Smalltalk” from Kent Beck Xtreme Programming SUnit - Smalltalk JUnit - Java
  • 7. Basic concept of TDD - Test first! - Write your test code first - Afterwards write your code unter test
  • 8. Basic concept of TDD - Test first! - Write your test code first - Afterwards write your code unter test - Red phase - First test code has to fail
  • 9. Basic concept of TDD - Test first! - Write your test code first - Afterwards write your code unter test - Red phase - First test code has to fail - Yellow/Blue phase - Code under test was writen, test execution runs?
  • 10. Basic concept of TDD - Test first! - Write your test code first - Afterwards write your code unter test - Red phase - First test code has to fail - Yellow/Blue phase - Code under test was writen, test execution runs? - Green phase - Test execution works succeesfully and code under test is implemented
  • 11. Pro’s of TDD - Less code redundancy
  • 12. Pro’s of TDD - Less code redundancy - No hidden features
  • 13. Pro’s of TDD - Less code redundancy - No hidden features - Clear API which can be tested
  • 14. Pro’s of TDD - Less code redundancy - No hidden features - Clear API which can be tested - Code “security” and developer confidence raises
  • 15. Pro’s of TDD - Less code redundancy - No hidden features - Clear API which can be tested - Code “security” and developer confidence raises - Stability of main development branch/trunk
  • 16. Pro’s of TDD - Less code redundancy - No hidden features - Clear API which can be tested - Code “security” and developer confidence raises - Stability of main development branch/trunk - Customer confidence
  • 17. Con’s of TDD - Costly development in time and resources
  • 18. Con’s of TDD - Costly development in time and resources - Writing test code can be very complex
  • 19. Con’s of TDD - Costly development in time and resources - Writing test code can be very complex - IDE integration is very helpful
  • 20. Con’s of TDD - Costly development in time and resources - Writing test code can be very complex - IDE integration is very helpful - More code to write - Each line has positive and negative test code
  • 21. Con’s of TDD - Costly development in time and resources - Writing test code can be very complex - IDE integration is very helpful - More code to write - Each line has positive and negative test code - Test framework API’s must be used
  • 22. Need of test frameworks and unit tests - You need a test framework to run automated test
  • 23. Need of test frameworks and unit tests - You need a test framework to run automated test - Unit tests form the test suite
  • 24. Need of test frameworks and unit tests - You need a test framework to run automated test - Unit tests form the test suite - Developer has to adapt test framework usage
  • 25. Need of test frameworks and unit tests - You need a test framework to run automated test - Unit tests form the test suite - Developer has to adapt test framework usage - Devide tests into unit, integration, scenario tests - Test coverage tools needed
  • 26. What is a test framework? A test automation framework is an integrated system that sets the rules of automation of a specific product. This system integrates the function libraries, test data sources, object details and various reusable modules. These components act as small building blocks which need to be assembled to represent a business process. The framework provides the basis of test automation and simplifies the automation effort https://en.wikipedia.org/wiki/Test_automation#Framework_approach_in_automation
  • 27. What is a test framework? A test automation framework is an integrated system that sets the rules of automation of a specific product. This system integrates the function libraries, test data sources, object details and various reusable modules. These components act as small building blocks which need to be assembled to represent a business process. The framework provides the basis of test automation and simplifies the automation effort https://en.wikipedia.org/wiki/Test_automation#Framework_approach_in_automation
  • 28. What is a unit test? - Automated test to run code under test
  • 29. What is a unit test? - Automated test to run code under test - Testing smallest unit of code in an application
  • 30. What is a unit test? - Automated test to run code under test - Testing smallest unit of code in an application - Code under test should have as little as possible dependencies to other “units”
  • 31. What is a unit test? - Automated test to run code under test - Testing smallest unit of code in an application - Code under test should have as little as possible dependencies to other “units” - Each unit test should be independent from others
  • 32. What is a unit test? - Automated test to run code under test - Testing smallest unit of code in an application - Code under test should have as little as possible dependencies to other “units” - Each unit test should be independent from others - Using mocks, stubs, spies
  • 33. What is a unit test? - Automated test to run code under test - Testing smallest unit of code in an application - Code under test should have as little as possible dependencies to other “units” - Each unit test should be independent from others - Using mocks, stubs, spies - Can be used for documenation
  • 34. What is a unit test? - Automated test to run code under test - Testing smallest unit of code in an application - Code under test should have as little as possible dependencies to other “units” - Each unit test should be independent from others - Using mocks, stubs, spies - Can be used for documenation - Prove of concept for architecture design and API
  • 35. What is a unit test? - Automated test to run code under test - Testing smallest unit of code in an application - Code under test should have as little as possible dependencies to other “units” - Each unit test should be independent from others - Using mocks, stubs, spies - Can be used for documenation - Prove of concept for architecture design and API
  • 36. Conclusion - Unit testing is important. It helps to… - reduce the costs of failure
  • 37. Conclusion - Unit testing is important. It helps to… - reduce the costs of failure - prove architecture and API
  • 38. Conclusion - Unit testing is important. It helps to… - reduce the costs of failure - prove architecture and API - makes the usage of software clear
  • 39. Conclusion - Unit testing is important. It helps to… - reduce the costs of failure - prove architecture and API - makes the usage of software clear - But is also… - difficult to write good tests
  • 40. Conclusion - Unit testing is important. It helps to… - reduce the costs of failure - prove architecture and API - makes the usage of software clear - But is also… - difficult to write good tests - a problem with higher test code complexity
  • 41. Conclusion - Unit testing is important. It helps to… - reduce the costs of failure - prove architecture and API - makes the usage of software clear - But is also… - difficult to write good tests - a problem with higher test code complexity - consumption of time
  • 42. Live coding - String utility class in node.js - Requirements: - Build a single StringUtil class which should - Chomp string left and right with given template strings - LowerCase / UpperCase - Provide fluent API