23 January 2017

What I learn from 010: talk "Testable Software Architecture" by Aslak Hellesøy

BDDX ’2016 in London TESTABLE SOFTWARE ARCHITECTURE


Aslak Hellesøy is creator of Cucumber. Cucumber is a collaboration and communication tool .It helps create living documentation. It is used as regression test but this is side effect.
This is what I learn from this talk:
  1. Test should inspire confidence. In order to be confident about tests:
    1. They shouldn’t be any false positive or false negative. They can fail only, when system is broken).
    2. They must be lighting fast. 
      1. Fast feedback (you should not wait more than than 1 hour for test to complete. If test takes hours , there is an architecture problem.
      2. Remove all IO file/network  . No DB, No HTTP. No external architecture.
    3. Low cost (as Ken Beck said :  “I pay to write code (solving problems ), so I don’t want spend time to maintain tests. 
    4. They need be consistent and you cannot depend on third party ,
  2. You must have decoupled architecture to get confidence through tests. Decoupled architecture allowed you to swap elements. In testing you can swap real thing with fake. TDD helps you to write decoupled architecture.
  3. Low cost tests
    1. Cost of writing test.
    2. Cost of maintain test.
    3. Test should gives you precision what , why and where went wrong.
    4. If you CANNOT do above things if you do it through UI , because in the system UI changing all the time  . UI tests doesn’t give précised diagnose what went wrong. It is take long time to fix them.
  4. (I need to do more research about it) Fakes with Port and Adapter patterns. Use Adapter pattern for fake service. Fake service should be tested by contract that need be passed in real and fake implementation.
  5. What’s QA role ? Programmers writes tests  after QA design tests. QA do not write tests). Test are written before the production code. QA is involved from start by writing acceptance criteria based on requirements from BA and PO says. QA focus on prevent defects not finding them in later stage.
  6. Acceptance and regression tests should be automated because machine can do boring repeatable task, while QA could do more valuable things and perform  manual exploring tests.

It was an awesome talk. I learn more about QA role and how I as developer should fit to testing part of developing lifecycle.

No comments:

Post a Comment