maio 2016 - it's not just about tests

37
IT'S NOT JUST ABOUT TESTS RAPHAEL AMORIM

Upload: grupo-de-testes-carioca

Post on 12-Apr-2017

25 views

Category:

Software


0 download

TRANSCRIPT

IT'S NOT JUST ABOUT TESTSRAPHAEL AMORIM

WHAT’S SOFTWARE TEST?

FIRST THINGS FIRST

1. SOFTWARE TESTING IS A PROCESS OF EXECUTING A PROGRAM OR APPLICATION WITH THE INTENT OF FINDING THE SOFTWARE BUGS.

2. PROCESS OF VALIDATING AND VERIFYING THAT A SOFTWARE PROGRAM OR APPLICATION OR PRODUCT.

3. IN SHORT: THERE ARE SEVERAL TYPES/METHODOLOGIES OF SOFTWARE TESTING.

3. IN SHORT: THERE ARE SEVERAL TYPES/ METHODOLOGIES OF SOFTWARE TESTING.

E.G: UNIT TESTS, INTEGRATION TESTS, OPERATIONAL ACCEPTANCE TESTS…

BUT WHY TEST MY SOFTWARE ?

IT'S NOT JUST ABOUT TESTS

WHY SOFTWARE TESTS?

▸ To ensure that what we create does what it’s supposed to do.

IT'S NOT JUST ABOUT TESTS

WHY SOFTWARE TESTS?

▸ To ensure that what we create does what it’s supposed to do.

▸ “Something that works when one person is using it may not work when hundreds of people are using it”.

IT'S NOT JUST ABOUT TESTS

WHY SOFTWARE TESTS?

▸ To ensure that what we create does what it’s supposed to do.

▸ “Something that works when one person is using it may not work when hundreds of people are using it”.

▸ We owe it to our users and ourselves to deliver the best application we can.

IT'S NOT JUST ABOUT TESTS

WHY SOFTWARE TESTS?

▸ To ensure that what we create does what it’s supposed to do.

▸ “Something that works when one person is using it may not work when hundreds of people are using it”.

▸ We owe it to our users and ourselves to deliver the best application we can.

▸ Tests means Quality.

WE'LL NOT TALK ABOUT TESTS.

WE'LL TALK ABOUT DEVELOPMENT PROCESS.

TEST DRIVEN DEVELOPMENT

SOFTWARE DEVELOPMENT PROCESS

HOWEVER, TDD IS NOT THE "ONLY ONE" ( BDD, CDD, DDD, MDD, FDD, ATDD,

AND THE OTHER DOUBLE D’S )

IT’S NOT JUST ABOUT TESTS

TDD CYCLE

“ FOLK WISDOM IN SOFTWARE DEVELOPMENT TEACHES THAT INTERFACES SHOULDN'T BE UNDULY INFLUENCED BY IMPLEMENTATIONS. WRITING A TEST FIRST IS A CONCRETE WAY TO ACHIEVE THIS SEPARATION. ”

Kent Beck, Extreme Programming Explained: Embrace Change

IT'S NOT JUST ABOUT TESTS

“ IF IT'S HARD TO BE TESTED, SORRY YOUR CODE DESIGN IS WRONG. ”

Raphael Amorim, Random Tweet

IT'S NOT JUST ABOUT TESTS

TEST DRIVEN DEVELOPMENT

“ The Bad Parts ”

EXTRA DEVELOPMENT REQUIRED

MISUSE OF MOCK OBJECTS

MISUSE OF MOCK OBJECTS

http://martinfowler.com/articles/mocksArentStubs.htmlMocks Aren’t Stubs

http://blog.testdouble.com/posts/2014-01-25-the-failures-of-intro-to-tdd.html The Failures of "Intro to TDD"

TEST DRIVEN DEVELOPMENT

“ The Good Parts ”

NO MORE BUGS INTO PRODUCTION

ALMOST NO BUGS INTO PRODUCTION

Back to Reality:

TEST DRIVEN DEVELOPMENT

“ The AWESOME Parts ”

GREAT API DESIGN

++DOCUMENTATION

HIGH SPEED DEBUGGING

ENCOURAGES SOLID DESIGN

TDD IS NOT FOR EVERYONE

TDD IS NOT FOR EVERYONEhttp://claysnow.co.uk/to-tdd-or-not-to-tdd/

To TDD or not to TDD? That is not the question

“ TDD IS NOT EASY, IT TAKES TIME TO LEARN AND GET RIGHT AND THERE IS A RISK THAT IT COULD BE A TIME SINK FOR A PROJECT IF THE ENTIRE DEVELOPMENT TEAM DOES NOT BUY INTO ITS USAGE. ”

Bradley Braithwaite, TDD: It's not just about the Tests

IT'S NOT JUST ABOUT TESTS

WHERE TO START

IT'S NOT JUST ABOUT TESTS

▸ The ThreeRules Of Tdd ( http://butunclebob.com/ArticleS.UncleBob.TheThreeRulesOfTdd )

▸ Test Driven Development: By Example( http://www.amazon.com/Test-Driven-Development-By-Example/dp/0321146530 )

▸ Growing Object-Oriented Software, Guided by Tests( http://www.amazon.com/Growing-Object-Oriented-Software-Guided-Tests/dp/0321503627 )

▸ Test-Driven Development: A Practical Guide: A Practical Guide( http://www.amazon.com/Test-Driven-Development-Practical-Guide/dp/0131016490 )

IT'S NOT JUST ABOUT TESTS

▸ TDD no Mundo Real (PT-BR)( http://tddnomundoreal.com.br/ )

“ THANK YOU! ” - @RAPHAMUNDI

IT'S NOT JUST ABOUT TESTS

REFERENCES

▸ Extreme Programming Explained: Embrace Change, 2000 - Kent Beck.

▸ TDD: It's not just about the Tests, 2012 - Bradley Braithwaite

▸ 5 Reasons We Need Software Testing, 2014 - Cullyn Thomson