This document discusses testing from a developer perspective. It recommends writing tests first before coding to document intentions and allow for safe refactoring. Various testing frameworks are described, including xUnit frameworks, behavior driven development (BDD) frameworks that describe expected behavior, and BDD frameworks that use Given/When/Then syntax. It also discusses the importance of UI/UX testing tools like Selenium. The key takeaways are: 1) write tests first to guide development, 2) xUnit and BDD frameworks provide different approaches to testing code, 3) UI testing tools are needed to test applications at a user interface level.
8. Test After
White Box Testing!
It is better than nothing!!
And sometimes even necessary:!
Regression Test!
Integration Test!
Acceptance Test (UI/UX Test)
9. Test because
you have a
test phase
!
Just don‘t do that!!
Code have to be written
with Test in mind!
Black Box Test = QA
10. Test to
explore
!
Example driven
development!
Update safely to newer
versions
11. What do we
need for
testing?
DSL to define the test!
Runner to execute the test!
Reports to visualize
results
15. What we should keep
in mind using xUnit
Test Methods should be atomic, as we don‘t
know the order they will be executed!
Test methods should be simple. No
Conditions and no loops!
Method and class names are used for
reporting!
Consider to use mocking and matching
frameworks to make tests more concise
16. What‘s mocking all
about?
Unit testing is all about isolation!
We wan‘t to test a boss who depend on
his assistant!
We provide him a spy assistant and
monitor how he interacts!
Dependency Injection is the concept that
let us do isolation in non dynamic
language
18. And what was it
with matching?
Matchers let us express expectations
in a very concise way!
Matchers will generate a pretty
report when expectation is not
fulfilled!
Matching framework let us define
our own matchers
20. What‘s wrong with
xUnit
xUnit Frameworks are the basis for
Test Driven Development!
Perfect from technical perspective!
But hard to use for communication
(remember: „document your
intensions“)
21. Behavior
Driven
Development
It‘s all about
Communication!
don‘t test!
specify your code
Dan North
22. BDD Frameworks
There are two main flavors behind
BDD Frameworks:!
Describe what you expect it
should do (RSpec family)!
Given/When/Then (Cucumber
family)
23. describe what you
expect it should do
Internal DSL which let you write
executable or pending specifications!
Good fit for Unit testing!
Comes with mocking and matching
solutions inside!
Let you define nonlinear context
creation
30. Let‘s sum up on
Testing Frameworks
xUnit Frameworks (with handy
helpers)!
Describe what you expect it should do!
Given/When/Then!
And as always there is one more
thing, UX/UI Testing
32. UX / UI Testing
Launch the application in the runtime!
Select UI element!
Perform actions!
Wait for UI component to appear!
Assert visual or structural
appearance