SlideShare a Scribd company logo
TESTIMONYTESTIMONY
(ABOUT TESTING)(ABOUT TESTING)
Presented by /Milan Popović @komita1981
MEME
PHP developer
Work for Navus Consulting GMBH
I like to learn and share knowledge
Active member of PHP Srbija
What is main property of bad code?
IT'S UNTESTABLEIT'S UNTESTABLE
KENT BECK'S RULES OF SIMPLEKENT BECK'S RULES OF SIMPLE
CODECODE
1. Runs all the tests
2. Contains no duplication
3. Express the intent of programmer
4. Minimizes the number of classes and methods
Given in order of importance
No so ware engineers release even the
tiniest change without testing, except
the very confident and the very sloppy.
- Kent Beck
The degree to which you know how
your so ware behaves is the degree to
which you have accurately tested it. -
Max Kanat-Alexander
WHAT DO PEOPLE THINK ABOUTWHAT DO PEOPLE THINK ABOUT
TESTING?TESTING?
Time consuming
Testing is hard
Steep learning curve
Don’t make anybody any money
WHAT TESTING REALLY IS?WHAT TESTING REALLY IS?
Fundamental part of professional so ware
development
Prove you've done your work
An insurance that the system works
Reduce number of bugs
Help you make better code design - easier to maintain
- facilitating change
WHAT TESTING REALLY IS?WHAT TESTING REALLY IS?
Ensures stable, long lasting application
Improve understanding how clients are going to use
your code
Enhance security
Provide free documentation
COST OF NOT TESTING OR LATECOST OF NOT TESTING OR LATE
TESTINGTESTING
Testing is expensive (event up to 40% of project's
budget)
Not testing is event more expensive
Cost of testing increases exponentially if happens later
WHY DO SO MANY DEVELOPERSWHY DO SO MANY DEVELOPERS
NOT DELIVER TESTS WITH THEIRNOT DELIVER TESTS WITH THEIR
CODE?CODE?
Habit is not established early
The consequence of not writing unit tests is delayed
The consequence is o en suffered by other people, not
the original author
Informational Conformity
WHAT IS TO BE TESTED?WHAT IS TO BE TESTED?
EVERYTHINGEVERYTHING
To be more precise
EVERYTHING THAT COULD BREAKEVERYTHING THAT COULD BREAK
YOUR APPYOUR APP
DDT VS TDD VS TFD VS BDD VSDDT VS TDD VS TFD VS BDD VS
WHATEVERWHATEVER
IBM & Microso - TDD - 20-40% longer to complete but
40-90% fewer bugs in production
By 2022 it will be not be possible to get
a professional programming job if you
do not practice TDD routinely - Allan
Kelly
STATE OF MINDSTATE OF MIND
LEVELS, TYPES AND METHODSLEVELS, TYPES AND METHODS
OF SOFTWARE TESTINGOF SOFTWARE TESTING
LEVELSLEVELS
Unit
Integration
System
Acceptance
TYPESTYPES
A/B
Acceptance
Accessibility
Alpha/Beta
Concurrent
Conformance and type
TYPESTYPES
Compatibility
Destructive
Development
Documentation
Functional vs Non Functional
Internationalization & Localization
TYPESTYPES
Installation
Performance
Regression
Smoke and Sanity
Security
Usability
METHODSMETHODS
Static
Dynamic
1. Try with writing tests a er writing the code
2. When you get confidence try to write tests before the
code
3. Treat test like your code - keep it "clean"
Be descriptive about what you are testing
Do not duplicate test code
Do not make tests complex
4. Number of asserts in a test ought to be minimized
5. Use Virtual Environments
6. Use continuous integration server
When I say testing I mean AUTOMATED testing
Automated testing is key point for so ware quality and
is preferred because of it's repeatability and easy of
use
Manual testing is time consuming and boring allowed
in some complex scenarios
Run tests o en
7. Test Boundary Conditions
8. Use test saboteurs
Humbug
Infection
9. Use test coverage properly
A rule of the thumb for test coverage related to
cyclomatic complexity is to have test cases equal in
number to the cyclomatic complexity value.
Test branch coverage not only code coverage
sampleMethod()
{
if (a < 5 and b > 10){
return a + b;
}
return $a - $b;
}
10. Test before refactoring
11. Write unit tests for each bug you are going to fix
12. Think twice before using New Operators - new
ClassName()
13. Think twice before using statics -
SomeClass::someMethod()
14. Avoid endless "anding" - Breaking SRP
15. Avoid using switch-case o en - use design patterns
instead
16. Avoid using too many dependencies - max 4
dependencies
17. Avoid logic in constructor - only assign variables
17. Do not break Law of Demeter
$company->getOwner()->getAccount()->getBank()...
18. Do Not Mock What You Do not Own
19. Use data providers
/**
* @dataProvider getSuccessfulAddData
*/
public function testSuccessfulAdd($a, $b, $result)
{
$this->assertEquals($result,
$this->calculator->add($a, $b));
}
public function getSuccessfulAddData()
{
return [
['a' => 1, 'b' => 2, 'result' => 3],
['a' => 2, 'b' => 1, 'result' => 3],
['a' => 0, 'b' => 1, 'result' => 1],
20. Respect 3A of Unit testing
Arrange objects, creating and setting them up as
necessary.
Act on an object
Assert that something is as expected
21.
22. Programming by Wishful Thinking
23. Use test doubles properly
Dummy
Fake
Stub
Mock
Spy
24. Before asserting through loop use assertCount
25. Do not lie about your real dependencies - use DI
Don't look for things! Ask for things!
26. Smoke testing
Quick check if there are any problems
Check if application is running
Ping an important API endpoint
27. Add time for testing in your estimates
30% testing
30% implementation
10% logging and metrics
30% refactoring
28. If you provide API use documentation testing
Dredd
Supports Swagger & API Blueprint
29. Run tests in parallel
30. Weeks of programming can save you hours of
planning and writing tests
Once you start testing You wont want to write code
without tests again
You are not good developer if you are not good tester
Developers starts producing better code
Testing makes developers complacent
Writing code that is testable encourages best practices
- such as SOLID
Quality is everyone’s responsibility — especially ours -
developer’s
Testing is fun :-)
f u cn rd ths, u cn gt a gd jb n s wr tstng
RESOURCESRESOURCES
Php tests tips
Unit test prez
Cost of tdd
Sebastian Bergmann in Atlanta
F.I.R.S.T Principles of Unit Testing
First principles
Prag prog blog
How O en Should You Run Your JUnit Tests?
Daed blog
Salesforce blog
Google testing blog
Unit testing blog
Testing doubles
Martin Fowler about XUnit
Notes on designing through mocking
Wishful Programming
That's Not Yours
Testing is dead
So ware Testing
So ware Testing
So ware Testing Concepts
IMAGESIMAGES
We are busy
Vagrant & Docker
TDD lifecycle
Testing code in production
Hard work
Steep learning curve
Advice
True or false
Testing pyramid
Inverted Testing pyramid
Hourglass
Kohana testing structure
Facts
Unit testing mvc
Make it brake it
THANK YOUTHANK YOU
QUESTIONS?QUESTIONS?

More Related Content

What's hot

TDD refresher
TDD refresherTDD refresher
TDD refresher
Kerry Buckley
 
TDD = bra design?
TDD = bra design?TDD = bra design?
TDD = bra design?
Kjetil Klaussen
 
Tdd
TddTdd
Tdd practices
Tdd practicesTdd practices
Tdd practices
axykim00
 
Test drive on driven development process
Test drive on driven development processTest drive on driven development process
Test drive on driven development process
Muralidharan Deenathayalan
 
TDD (Test Driven Design)
TDD (Test Driven Design)TDD (Test Driven Design)
TDD (Test Driven Design)
nedirtv
 
Test driven development vs Behavior driven development
Test driven development vs Behavior driven developmentTest driven development vs Behavior driven development
Test driven development vs Behavior driven development
Gallop Solutions
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
Sachithra Gayan
 
Unit testing & TDD concepts with best practice guidelines.
Unit testing & TDD concepts with best practice guidelines.Unit testing & TDD concepts with best practice guidelines.
Unit testing & TDD concepts with best practice guidelines.
Mohamed Taman
 
Tdd in php a brief example
Tdd in php   a brief exampleTdd in php   a brief example
Tdd in php a brief exampleJeremy Kendall
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
ZendCon
 
Importance of the quality of code
Importance of the quality of codeImportance of the quality of code
Importance of the quality of code
Shwe Yee
 
Test driven development
Test driven developmentTest driven development
Test driven development
Harry Potter
 
Agile Test Driven Development
Agile Test Driven DevelopmentAgile Test Driven Development
Agile Test Driven Development
Viraf Karai
 

What's hot (16)

TDD refresher
TDD refresherTDD refresher
TDD refresher
 
TDD = bra design?
TDD = bra design?TDD = bra design?
TDD = bra design?
 
Tdd
TddTdd
Tdd
 
Tdd practices
Tdd practicesTdd practices
Tdd practices
 
Test drive on driven development process
Test drive on driven development processTest drive on driven development process
Test drive on driven development process
 
TDD (Test Driven Design)
TDD (Test Driven Design)TDD (Test Driven Design)
TDD (Test Driven Design)
 
Test driven development vs Behavior driven development
Test driven development vs Behavior driven developmentTest driven development vs Behavior driven development
Test driven development vs Behavior driven development
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
Unit testing & TDD concepts with best practice guidelines.
Unit testing & TDD concepts with best practice guidelines.Unit testing & TDD concepts with best practice guidelines.
Unit testing & TDD concepts with best practice guidelines.
 
Tdd in php a brief example
Tdd in php   a brief exampleTdd in php   a brief example
Tdd in php a brief example
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
Importance of the quality of code
Importance of the quality of codeImportance of the quality of code
Importance of the quality of code
 
Test driven development
Test driven developmentTest driven development
Test driven development
 
TestDrivenDeveloment
TestDrivenDevelomentTestDrivenDeveloment
TestDrivenDeveloment
 
Chapter17 of clean code
Chapter17 of clean codeChapter17 of clean code
Chapter17 of clean code
 
Agile Test Driven Development
Agile Test Driven DevelopmentAgile Test Driven Development
Agile Test Driven Development
 

Similar to Developers’ mDay u Banjoj Luci - Milan Popović, PHP Srbija – Testimony (about 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
Iranian Domain-Driven Design Community
 
xUnit and TDD: Why and How in Enterprise Software, August 2012
xUnit and TDD: Why and How in Enterprise Software, August 2012xUnit and TDD: Why and How in Enterprise Software, August 2012
xUnit and TDD: Why and How in Enterprise Software, August 2012
Justin Gordon
 
Test Driven Development - Overview and Adoption
Test Driven Development - Overview and AdoptionTest Driven Development - Overview and Adoption
Test Driven Development - Overview and Adoption
Pyxis Technologies
 
Bdd - L'arte di non farsi i fatti propri
Bdd - L'arte di non farsi i fatti propriBdd - L'arte di non farsi i fatti propri
Bdd - L'arte di non farsi i fatti propri
Commit University
 
Understanding Unit Testing
Understanding Unit TestingUnderstanding Unit Testing
Understanding Unit Testing
ikhwanhayat
 
Clean code: understanding Boundaries and Unit Tests
Clean code: understanding Boundaries and Unit TestsClean code: understanding Boundaries and Unit Tests
Clean code: understanding Boundaries and Unit Tests
radin reth
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Developmentbhochhi
 
Test-Driven Development In Action
Test-Driven Development In ActionTest-Driven Development In Action
Test-Driven Development In Action
Jon Kruger
 
Tdd
TddTdd
Testing practicies not only in scala
Testing practicies not only in scalaTesting practicies not only in scala
Testing practicies not only in scala
Paweł Panasewicz
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
Consulthinkspa
 
Python and test
Python and testPython and test
Python and test
Micron Technology
 
TDD and Getting Paid
TDD and Getting PaidTDD and Getting Paid
TDD and Getting Paid
Rowan Merewood
 
Topic production code
Topic production codeTopic production code
Topic production code
Kavi Kumar
 
Indy meetup#7 effective unit-testing-mule
Indy meetup#7 effective unit-testing-muleIndy meetup#7 effective unit-testing-mule
Indy meetup#7 effective unit-testing-mule
ikram_ahamed
 
Automated tests
Automated testsAutomated tests
Automated tests
Damian Sromek
 
assertYourself - Breaking the Theories and Assumptions of Unit Testing in Flex
assertYourself - Breaking the Theories and Assumptions of Unit Testing in FlexassertYourself - Breaking the Theories and Assumptions of Unit Testing in Flex
assertYourself - Breaking the Theories and Assumptions of Unit Testing in Flex
michael.labriola
 
Test Driven Development and Automation
Test Driven Development and AutomationTest Driven Development and Automation
Test Driven Development and Automation
Mahesh Salaria
 
Introduction to Test Driven Development
Introduction to Test Driven DevelopmentIntroduction to Test Driven Development
Introduction to Test Driven Development
Michael Denomy
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
Kumaresh Chandra Baruri
 

Similar to Developers’ mDay u Banjoj Luci - Milan Popović, PHP Srbija – Testimony (about testing) (20)

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
 
xUnit and TDD: Why and How in Enterprise Software, August 2012
xUnit and TDD: Why and How in Enterprise Software, August 2012xUnit and TDD: Why and How in Enterprise Software, August 2012
xUnit and TDD: Why and How in Enterprise Software, August 2012
 
Test Driven Development - Overview and Adoption
Test Driven Development - Overview and AdoptionTest Driven Development - Overview and Adoption
Test Driven Development - Overview and Adoption
 
Bdd - L'arte di non farsi i fatti propri
Bdd - L'arte di non farsi i fatti propriBdd - L'arte di non farsi i fatti propri
Bdd - L'arte di non farsi i fatti propri
 
Understanding Unit Testing
Understanding Unit TestingUnderstanding Unit Testing
Understanding Unit Testing
 
Clean code: understanding Boundaries and Unit Tests
Clean code: understanding Boundaries and Unit TestsClean code: understanding Boundaries and Unit Tests
Clean code: understanding Boundaries and Unit Tests
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
Test-Driven Development In Action
Test-Driven Development In ActionTest-Driven Development In Action
Test-Driven Development In Action
 
Tdd
TddTdd
Tdd
 
Testing practicies not only in scala
Testing practicies not only in scalaTesting practicies not only in scala
Testing practicies not only in scala
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
Python and test
Python and testPython and test
Python and test
 
TDD and Getting Paid
TDD and Getting PaidTDD and Getting Paid
TDD and Getting Paid
 
Topic production code
Topic production codeTopic production code
Topic production code
 
Indy meetup#7 effective unit-testing-mule
Indy meetup#7 effective unit-testing-muleIndy meetup#7 effective unit-testing-mule
Indy meetup#7 effective unit-testing-mule
 
Automated tests
Automated testsAutomated tests
Automated tests
 
assertYourself - Breaking the Theories and Assumptions of Unit Testing in Flex
assertYourself - Breaking the Theories and Assumptions of Unit Testing in FlexassertYourself - Breaking the Theories and Assumptions of Unit Testing in Flex
assertYourself - Breaking the Theories and Assumptions of Unit Testing in Flex
 
Test Driven Development and Automation
Test Driven Development and AutomationTest Driven Development and Automation
Test Driven Development and Automation
 
Introduction to Test Driven Development
Introduction to Test Driven DevelopmentIntroduction to Test Driven Development
Introduction to Test Driven Development
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 

More from mCloud

Developers’ mDay 2021: Robert Juhas, SimpleTask – Should I run my own blockc...
Developers’ mDay 2021: Robert Juhas, SimpleTask –  Should I run my own blockc...Developers’ mDay 2021: Robert Juhas, SimpleTask –  Should I run my own blockc...
Developers’ mDay 2021: Robert Juhas, SimpleTask – Should I run my own blockc...
mCloud
 
Developers’ mDay 2021: Andrea Bjelogrlić, Sysbee – Tips, tricks and debugging...
Developers’ mDay 2021: Andrea Bjelogrlić, Sysbee – Tips, tricks and debugging...Developers’ mDay 2021: Andrea Bjelogrlić, Sysbee – Tips, tricks and debugging...
Developers’ mDay 2021: Andrea Bjelogrlić, Sysbee – Tips, tricks and debugging...
mCloud
 
Developers’ mDay 2021: Goran Kunjadić, Cyber security, cryptography and DPO e...
Developers’ mDay 2021: Goran Kunjadić, Cyber security, cryptography and DPO e...Developers’ mDay 2021: Goran Kunjadić, Cyber security, cryptography and DPO e...
Developers’ mDay 2021: Goran Kunjadić, Cyber security, cryptography and DPO e...
mCloud
 
Developers’ mDay 2021: Igor Spasić, Oblac – Jodd, jedna open-source priča
Developers’ mDay 2021: Igor Spasić, Oblac – Jodd, jedna open-source pričaDevelopers’ mDay 2021: Igor Spasić, Oblac – Jodd, jedna open-source priča
Developers’ mDay 2021: Igor Spasić, Oblac – Jodd, jedna open-source priča
mCloud
 
Developers’ mDay 2021: Mladen Janjetović, Laravel Srbija – Laravel Awesome
Developers’ mDay 2021: Mladen Janjetović, Laravel Srbija – Laravel AwesomeDevelopers’ mDay 2021: Mladen Janjetović, Laravel Srbija – Laravel Awesome
Developers’ mDay 2021: Mladen Janjetović, Laravel Srbija – Laravel Awesome
mCloud
 
Developers’ mDay 2021: Nikola Krgović, Twin Star Systems – CentOS i šta dalje
Developers’ mDay 2021: Nikola Krgović, Twin Star Systems – CentOS i šta daljeDevelopers’ mDay 2021: Nikola Krgović, Twin Star Systems – CentOS i šta dalje
Developers’ mDay 2021: Nikola Krgović, Twin Star Systems – CentOS i šta dalje
mCloud
 
Developers’ mDay 2021: Nebojša Kamber, Infostud – SQL vs noSQL
Developers’ mDay 2021: Nebojša Kamber, Infostud – SQL vs noSQLDevelopers’ mDay 2021: Nebojša Kamber, Infostud – SQL vs noSQL
Developers’ mDay 2021: Nebojša Kamber, Infostud – SQL vs noSQL
mCloud
 
Developers’ mDay 2021: Bogdan Kecman, Oracle – MySQL nekad i sad
Developers’ mDay 2021: Bogdan Kecman, Oracle – MySQL nekad i sadDevelopers’ mDay 2021: Bogdan Kecman, Oracle – MySQL nekad i sad
Developers’ mDay 2021: Bogdan Kecman, Oracle – MySQL nekad i sad
mCloud
 
Developers’ mDay 2021: Jelena Opačić, mCloud – Dobrodošlica
Developers’ mDay 2021: Jelena Opačić, mCloud – DobrodošlicaDevelopers’ mDay 2021: Jelena Opačić, mCloud – Dobrodošlica
Developers’ mDay 2021: Jelena Opačić, mCloud – Dobrodošlica
mCloud
 
Developers’ mDay 2019. - Zvonimir Gembec, Sysbee – Developers vs Sysadmins – ...
Developers’ mDay 2019. - Zvonimir Gembec, Sysbee – Developers vs Sysadmins – ...Developers’ mDay 2019. - Zvonimir Gembec, Sysbee – Developers vs Sysadmins – ...
Developers’ mDay 2019. - Zvonimir Gembec, Sysbee – Developers vs Sysadmins – ...
mCloud
 
Developers’ mDay 2019. - Dijana Milutinović, RNIDS – Kako se kalio domen
Developers’ mDay 2019. -  Dijana Milutinović, RNIDS – Kako se kalio domenDevelopers’ mDay 2019. -  Dijana Milutinović, RNIDS – Kako se kalio domen
Developers’ mDay 2019. - Dijana Milutinović, RNIDS – Kako se kalio domen
mCloud
 
Developers’ mDay 2019. - Bogdan Kecman, Oracle – MySQL 8.0 – why upgrade
Developers’ mDay 2019. - Bogdan Kecman, Oracle – MySQL 8.0 – why upgradeDevelopers’ mDay 2019. - Bogdan Kecman, Oracle – MySQL 8.0 – why upgrade
Developers’ mDay 2019. - Bogdan Kecman, Oracle – MySQL 8.0 – why upgrade
mCloud
 
Developers’ mDay 2019. - Rastko Vasiljević, SuperAdmins – Infrastructure as c...
Developers’ mDay 2019. - Rastko Vasiljević, SuperAdmins – Infrastructure as c...Developers’ mDay 2019. - Rastko Vasiljević, SuperAdmins – Infrastructure as c...
Developers’ mDay 2019. - Rastko Vasiljević, SuperAdmins – Infrastructure as c...
mCloud
 
Developers’ mDay 2019. - Dejan Bosanac, Red Hat – Cloud scale IoT connectivity
Developers’ mDay 2019. - Dejan Bosanac, Red Hat – Cloud scale IoT connectivityDevelopers’ mDay 2019. - Dejan Bosanac, Red Hat – Cloud scale IoT connectivity
Developers’ mDay 2019. - Dejan Bosanac, Red Hat – Cloud scale IoT connectivity
mCloud
 
Developers’ mDay 2019. - Adrian Smijulj, Webiny – Server-side rendering u Ser...
Developers’ mDay 2019. - Adrian Smijulj, Webiny – Server-side rendering u Ser...Developers’ mDay 2019. - Adrian Smijulj, Webiny – Server-side rendering u Ser...
Developers’ mDay 2019. - Adrian Smijulj, Webiny – Server-side rendering u Ser...
mCloud
 
Developers’ mDay 2019. - Nikola Krgović, Twin Star Systems – Big Data for Dev...
Developers’ mDay 2019. - Nikola Krgović, Twin Star Systems – Big Data for Dev...Developers’ mDay 2019. - Nikola Krgović, Twin Star Systems – Big Data for Dev...
Developers’ mDay 2019. - Nikola Krgović, Twin Star Systems – Big Data for Dev...
mCloud
 
Developers’ mDay 2019. - Dragutin Ćirković, mCloud – HTTP/3
Developers’ mDay 2019. - Dragutin Ćirković, mCloud – HTTP/3Developers’ mDay 2019. - Dragutin Ćirković, mCloud – HTTP/3
Developers’ mDay 2019. - Dragutin Ćirković, mCloud – HTTP/3
mCloud
 
Developers’ mDay u Banjoj Luci - Janko Isidorović, Mainflux – Unified IoT Pl...
Developers’ mDay u Banjoj Luci - Janko Isidorović, Mainflux –  Unified IoT Pl...Developers’ mDay u Banjoj Luci - Janko Isidorović, Mainflux –  Unified IoT Pl...
Developers’ mDay u Banjoj Luci - Janko Isidorović, Mainflux – Unified IoT Pl...
mCloud
 
Developers’ mDay u Banjoj Luci - Jelena Opačić, mCloud – Dobrodošlica
Developers’ mDay u Banjoj Luci - Jelena Opačić, mCloud – DobrodošlicaDevelopers’ mDay u Banjoj Luci - Jelena Opačić, mCloud – Dobrodošlica
Developers’ mDay u Banjoj Luci - Jelena Opačić, mCloud – Dobrodošlica
mCloud
 
Developers’ mDay u Banjoj Luci - Duško Bajić, Kotlin User Group Bosnia – Kotl...
Developers’ mDay u Banjoj Luci - Duško Bajić, Kotlin User Group Bosnia – Kotl...Developers’ mDay u Banjoj Luci - Duško Bajić, Kotlin User Group Bosnia – Kotl...
Developers’ mDay u Banjoj Luci - Duško Bajić, Kotlin User Group Bosnia – Kotl...
mCloud
 

More from mCloud (20)

Developers’ mDay 2021: Robert Juhas, SimpleTask – Should I run my own blockc...
Developers’ mDay 2021: Robert Juhas, SimpleTask –  Should I run my own blockc...Developers’ mDay 2021: Robert Juhas, SimpleTask –  Should I run my own blockc...
Developers’ mDay 2021: Robert Juhas, SimpleTask – Should I run my own blockc...
 
Developers’ mDay 2021: Andrea Bjelogrlić, Sysbee – Tips, tricks and debugging...
Developers’ mDay 2021: Andrea Bjelogrlić, Sysbee – Tips, tricks and debugging...Developers’ mDay 2021: Andrea Bjelogrlić, Sysbee – Tips, tricks and debugging...
Developers’ mDay 2021: Andrea Bjelogrlić, Sysbee – Tips, tricks and debugging...
 
Developers’ mDay 2021: Goran Kunjadić, Cyber security, cryptography and DPO e...
Developers’ mDay 2021: Goran Kunjadić, Cyber security, cryptography and DPO e...Developers’ mDay 2021: Goran Kunjadić, Cyber security, cryptography and DPO e...
Developers’ mDay 2021: Goran Kunjadić, Cyber security, cryptography and DPO e...
 
Developers’ mDay 2021: Igor Spasić, Oblac – Jodd, jedna open-source priča
Developers’ mDay 2021: Igor Spasić, Oblac – Jodd, jedna open-source pričaDevelopers’ mDay 2021: Igor Spasić, Oblac – Jodd, jedna open-source priča
Developers’ mDay 2021: Igor Spasić, Oblac – Jodd, jedna open-source priča
 
Developers’ mDay 2021: Mladen Janjetović, Laravel Srbija – Laravel Awesome
Developers’ mDay 2021: Mladen Janjetović, Laravel Srbija – Laravel AwesomeDevelopers’ mDay 2021: Mladen Janjetović, Laravel Srbija – Laravel Awesome
Developers’ mDay 2021: Mladen Janjetović, Laravel Srbija – Laravel Awesome
 
Developers’ mDay 2021: Nikola Krgović, Twin Star Systems – CentOS i šta dalje
Developers’ mDay 2021: Nikola Krgović, Twin Star Systems – CentOS i šta daljeDevelopers’ mDay 2021: Nikola Krgović, Twin Star Systems – CentOS i šta dalje
Developers’ mDay 2021: Nikola Krgović, Twin Star Systems – CentOS i šta dalje
 
Developers’ mDay 2021: Nebojša Kamber, Infostud – SQL vs noSQL
Developers’ mDay 2021: Nebojša Kamber, Infostud – SQL vs noSQLDevelopers’ mDay 2021: Nebojša Kamber, Infostud – SQL vs noSQL
Developers’ mDay 2021: Nebojša Kamber, Infostud – SQL vs noSQL
 
Developers’ mDay 2021: Bogdan Kecman, Oracle – MySQL nekad i sad
Developers’ mDay 2021: Bogdan Kecman, Oracle – MySQL nekad i sadDevelopers’ mDay 2021: Bogdan Kecman, Oracle – MySQL nekad i sad
Developers’ mDay 2021: Bogdan Kecman, Oracle – MySQL nekad i sad
 
Developers’ mDay 2021: Jelena Opačić, mCloud – Dobrodošlica
Developers’ mDay 2021: Jelena Opačić, mCloud – DobrodošlicaDevelopers’ mDay 2021: Jelena Opačić, mCloud – Dobrodošlica
Developers’ mDay 2021: Jelena Opačić, mCloud – Dobrodošlica
 
Developers’ mDay 2019. - Zvonimir Gembec, Sysbee – Developers vs Sysadmins – ...
Developers’ mDay 2019. - Zvonimir Gembec, Sysbee – Developers vs Sysadmins – ...Developers’ mDay 2019. - Zvonimir Gembec, Sysbee – Developers vs Sysadmins – ...
Developers’ mDay 2019. - Zvonimir Gembec, Sysbee – Developers vs Sysadmins – ...
 
Developers’ mDay 2019. - Dijana Milutinović, RNIDS – Kako se kalio domen
Developers’ mDay 2019. -  Dijana Milutinović, RNIDS – Kako se kalio domenDevelopers’ mDay 2019. -  Dijana Milutinović, RNIDS – Kako se kalio domen
Developers’ mDay 2019. - Dijana Milutinović, RNIDS – Kako se kalio domen
 
Developers’ mDay 2019. - Bogdan Kecman, Oracle – MySQL 8.0 – why upgrade
Developers’ mDay 2019. - Bogdan Kecman, Oracle – MySQL 8.0 – why upgradeDevelopers’ mDay 2019. - Bogdan Kecman, Oracle – MySQL 8.0 – why upgrade
Developers’ mDay 2019. - Bogdan Kecman, Oracle – MySQL 8.0 – why upgrade
 
Developers’ mDay 2019. - Rastko Vasiljević, SuperAdmins – Infrastructure as c...
Developers’ mDay 2019. - Rastko Vasiljević, SuperAdmins – Infrastructure as c...Developers’ mDay 2019. - Rastko Vasiljević, SuperAdmins – Infrastructure as c...
Developers’ mDay 2019. - Rastko Vasiljević, SuperAdmins – Infrastructure as c...
 
Developers’ mDay 2019. - Dejan Bosanac, Red Hat – Cloud scale IoT connectivity
Developers’ mDay 2019. - Dejan Bosanac, Red Hat – Cloud scale IoT connectivityDevelopers’ mDay 2019. - Dejan Bosanac, Red Hat – Cloud scale IoT connectivity
Developers’ mDay 2019. - Dejan Bosanac, Red Hat – Cloud scale IoT connectivity
 
Developers’ mDay 2019. - Adrian Smijulj, Webiny – Server-side rendering u Ser...
Developers’ mDay 2019. - Adrian Smijulj, Webiny – Server-side rendering u Ser...Developers’ mDay 2019. - Adrian Smijulj, Webiny – Server-side rendering u Ser...
Developers’ mDay 2019. - Adrian Smijulj, Webiny – Server-side rendering u Ser...
 
Developers’ mDay 2019. - Nikola Krgović, Twin Star Systems – Big Data for Dev...
Developers’ mDay 2019. - Nikola Krgović, Twin Star Systems – Big Data for Dev...Developers’ mDay 2019. - Nikola Krgović, Twin Star Systems – Big Data for Dev...
Developers’ mDay 2019. - Nikola Krgović, Twin Star Systems – Big Data for Dev...
 
Developers’ mDay 2019. - Dragutin Ćirković, mCloud – HTTP/3
Developers’ mDay 2019. - Dragutin Ćirković, mCloud – HTTP/3Developers’ mDay 2019. - Dragutin Ćirković, mCloud – HTTP/3
Developers’ mDay 2019. - Dragutin Ćirković, mCloud – HTTP/3
 
Developers’ mDay u Banjoj Luci - Janko Isidorović, Mainflux – Unified IoT Pl...
Developers’ mDay u Banjoj Luci - Janko Isidorović, Mainflux –  Unified IoT Pl...Developers’ mDay u Banjoj Luci - Janko Isidorović, Mainflux –  Unified IoT Pl...
Developers’ mDay u Banjoj Luci - Janko Isidorović, Mainflux – Unified IoT Pl...
 
Developers’ mDay u Banjoj Luci - Jelena Opačić, mCloud – Dobrodošlica
Developers’ mDay u Banjoj Luci - Jelena Opačić, mCloud – DobrodošlicaDevelopers’ mDay u Banjoj Luci - Jelena Opačić, mCloud – Dobrodošlica
Developers’ mDay u Banjoj Luci - Jelena Opačić, mCloud – Dobrodošlica
 
Developers’ mDay u Banjoj Luci - Duško Bajić, Kotlin User Group Bosnia – Kotl...
Developers’ mDay u Banjoj Luci - Duško Bajić, Kotlin User Group Bosnia – Kotl...Developers’ mDay u Banjoj Luci - Duško Bajić, Kotlin User Group Bosnia – Kotl...
Developers’ mDay u Banjoj Luci - Duško Bajić, Kotlin User Group Bosnia – Kotl...
 

Recently uploaded

FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Product School
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Inflectra
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
Cheryl Hung
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
Product School
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Jeffrey Haguewood
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
Bhaskar Mitra
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
Fwdays
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 

Recently uploaded (20)

FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 

Developers’ mDay u Banjoj Luci - Milan Popović, PHP Srbija – Testimony (about testing)

  • 2. MEME PHP developer Work for Navus Consulting GMBH I like to learn and share knowledge Active member of PHP Srbija
  • 3. What is main property of bad code? IT'S UNTESTABLEIT'S UNTESTABLE
  • 4. KENT BECK'S RULES OF SIMPLEKENT BECK'S RULES OF SIMPLE CODECODE 1. Runs all the tests 2. Contains no duplication 3. Express the intent of programmer 4. Minimizes the number of classes and methods Given in order of importance
  • 5. No so ware engineers release even the tiniest change without testing, except the very confident and the very sloppy. - Kent Beck
  • 6. The degree to which you know how your so ware behaves is the degree to which you have accurately tested it. - Max Kanat-Alexander
  • 7. WHAT DO PEOPLE THINK ABOUTWHAT DO PEOPLE THINK ABOUT TESTING?TESTING?
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13. Time consuming Testing is hard Steep learning curve Don’t make anybody any money
  • 14. WHAT TESTING REALLY IS?WHAT TESTING REALLY IS? Fundamental part of professional so ware development Prove you've done your work An insurance that the system works Reduce number of bugs Help you make better code design - easier to maintain - facilitating change
  • 15. WHAT TESTING REALLY IS?WHAT TESTING REALLY IS? Ensures stable, long lasting application Improve understanding how clients are going to use your code Enhance security Provide free documentation
  • 16. COST OF NOT TESTING OR LATECOST OF NOT TESTING OR LATE TESTINGTESTING Testing is expensive (event up to 40% of project's budget) Not testing is event more expensive Cost of testing increases exponentially if happens later
  • 17. WHY DO SO MANY DEVELOPERSWHY DO SO MANY DEVELOPERS NOT DELIVER TESTS WITH THEIRNOT DELIVER TESTS WITH THEIR CODE?CODE? Habit is not established early The consequence of not writing unit tests is delayed The consequence is o en suffered by other people, not the original author Informational Conformity
  • 18. WHAT IS TO BE TESTED?WHAT IS TO BE TESTED? EVERYTHINGEVERYTHING To be more precise EVERYTHING THAT COULD BREAKEVERYTHING THAT COULD BREAK YOUR APPYOUR APP
  • 19. DDT VS TDD VS TFD VS BDD VSDDT VS TDD VS TFD VS BDD VS WHATEVERWHATEVER
  • 20. IBM & Microso - TDD - 20-40% longer to complete but 40-90% fewer bugs in production
  • 21. By 2022 it will be not be possible to get a professional programming job if you do not practice TDD routinely - Allan Kelly
  • 23. LEVELS, TYPES AND METHODSLEVELS, TYPES AND METHODS OF SOFTWARE TESTINGOF SOFTWARE TESTING
  • 29.
  • 30. 1. Try with writing tests a er writing the code
  • 31. 2. When you get confidence try to write tests before the code
  • 32. 3. Treat test like your code - keep it "clean" Be descriptive about what you are testing Do not duplicate test code Do not make tests complex
  • 33. 4. Number of asserts in a test ought to be minimized
  • 34. 5. Use Virtual Environments
  • 35. 6. Use continuous integration server When I say testing I mean AUTOMATED testing Automated testing is key point for so ware quality and is preferred because of it's repeatability and easy of use Manual testing is time consuming and boring allowed in some complex scenarios Run tests o en
  • 36. 7. Test Boundary Conditions
  • 37. 8. Use test saboteurs Humbug Infection
  • 38. 9. Use test coverage properly A rule of the thumb for test coverage related to cyclomatic complexity is to have test cases equal in number to the cyclomatic complexity value.
  • 39.
  • 40. Test branch coverage not only code coverage sampleMethod() { if (a < 5 and b > 10){ return a + b; } return $a - $b; }
  • 41. 10. Test before refactoring
  • 42. 11. Write unit tests for each bug you are going to fix
  • 43. 12. Think twice before using New Operators - new ClassName()
  • 44. 13. Think twice before using statics - SomeClass::someMethod()
  • 45. 14. Avoid endless "anding" - Breaking SRP
  • 46. 15. Avoid using switch-case o en - use design patterns instead
  • 47. 16. Avoid using too many dependencies - max 4 dependencies
  • 48. 17. Avoid logic in constructor - only assign variables
  • 49. 17. Do not break Law of Demeter $company->getOwner()->getAccount()->getBank()...
  • 50. 18. Do Not Mock What You Do not Own
  • 51. 19. Use data providers /** * @dataProvider getSuccessfulAddData */ public function testSuccessfulAdd($a, $b, $result) { $this->assertEquals($result, $this->calculator->add($a, $b)); } public function getSuccessfulAddData() { return [ ['a' => 1, 'b' => 2, 'result' => 3], ['a' => 2, 'b' => 1, 'result' => 3], ['a' => 0, 'b' => 1, 'result' => 1],
  • 52. 20. Respect 3A of Unit testing Arrange objects, creating and setting them up as necessary. Act on an object Assert that something is as expected
  • 53. 21.
  • 54. 22. Programming by Wishful Thinking
  • 55. 23. Use test doubles properly Dummy Fake Stub Mock Spy
  • 56. 24. Before asserting through loop use assertCount
  • 57. 25. Do not lie about your real dependencies - use DI Don't look for things! Ask for things!
  • 58. 26. Smoke testing Quick check if there are any problems Check if application is running Ping an important API endpoint
  • 59. 27. Add time for testing in your estimates 30% testing 30% implementation 10% logging and metrics 30% refactoring
  • 60. 28. If you provide API use documentation testing Dredd Supports Swagger & API Blueprint
  • 61. 29. Run tests in parallel
  • 62. 30. Weeks of programming can save you hours of planning and writing tests
  • 63.
  • 64. Once you start testing You wont want to write code without tests again You are not good developer if you are not good tester Developers starts producing better code Testing makes developers complacent Writing code that is testable encourages best practices - such as SOLID Quality is everyone’s responsibility — especially ours - developer’s Testing is fun :-)
  • 65.
  • 66.
  • 67.
  • 68.
  • 69.
  • 70.
  • 71.
  • 72.
  • 73.
  • 74.
  • 75. f u cn rd ths, u cn gt a gd jb n s wr tstng
  • 76. RESOURCESRESOURCES Php tests tips Unit test prez Cost of tdd Sebastian Bergmann in Atlanta F.I.R.S.T Principles of Unit Testing First principles Prag prog blog How O en Should You Run Your JUnit Tests? Daed blog Salesforce blog Google testing blog
  • 77. Unit testing blog Testing doubles Martin Fowler about XUnit Notes on designing through mocking Wishful Programming That's Not Yours Testing is dead So ware Testing So ware Testing So ware Testing Concepts
  • 78. IMAGESIMAGES We are busy Vagrant & Docker TDD lifecycle Testing code in production Hard work Steep learning curve Advice True or false Testing pyramid Inverted Testing pyramid Hourglass
  • 79. Kohana testing structure Facts Unit testing mvc Make it brake it