10. 2014-02-21 Apple released a security update for its implementation of
SSL/TLS in many versions of its operating system.
11.
12. Between August 2000 and March 2001,
patients receiving radiation treatment for prostate cancer.
Unknown to the operators, the bug resulted in overexposures to patients.
17 deaths.
13. It was big scandal.
Accelerating bug.
89 deaths and 57 injured
14. The failure of a warning system caused a Spanair jet
to crash at Madrid airport killing 154 people
21. “ Even though developers follow TDD principle, without design
principles and patterns in the first place, software testing is still a
challenge task. This brings us into the search of design pattern which
eases software testing in general. One of the design patterns, which
associates with software testing, is Dependency Injection.
Dependency injection is claimed to increase testability of software
because by following the dependency injection pattern, external
resources such as database and web service can be mocked or faked
to allow testing software components in isolation from one another. ”
32. So why exactly does it happen? What makes tests brittle?
The reason is mocks.
Test suites with a large number of mocked dependencies require a lot of maintenance.
The more dependencies your code has, the more effort it takes to test it and fix the tests
as your code base evolves.
Did you notice that, in order to make your code testable, you need to mess it up first?
And the tests look like a big ball of mud that is hard to understand and maintain?
Unit Tests report too many false positives
They are too fragile.
After a time, developers start ignoring them.
33.
34.
35.
36.
37.
38. let tryAccept (capacity, getReservationsFn, reservation) =
let reservedSeats = getReservationsFn(reservation.Date)
|> List.sumBy (fun x -> x.Quantity)
if reservedSeats + reservation.Quantity <= capacity
then Some <| { reservation with IsAccepted = true }
else None