3. Agenda
What is software testing
Why we don’t like to write tests
Why it might be very helpful for us
Example of successful tests implementation
goo.gl/9zC48K
8. It’s boring
We do not have enough time for writing tests
We do not have a budget for writing testing
QA should do that
We don't use TDD, so that's why there are no unit tests
… and much more!
goo.gl/9zC48K
9. Usually we start writing tests when:
It was a specific task
There is no interesting features to do :)
Project is almost done
There was a huge fuck-up recently
goo.gl/9zC48K
11. We should write tests because
It will increase stability of the app
Extending the app will be less risky
Architecture will be better
Code will be more understandable
It will make your customers and users happier
goo.gl/9zC48K
14. Common ways of testing ReactJS Components
ReactTestUtils
Jest (Facebook)
Enzyme (Airbnb)
15. What is Enzyme?
Enzyme is a JavaScript Testing utility
for React that makes it easier to
assert, manipulate, and traverse your
React Components' output.
goo.gl/9zC48K
16. Shallow render Full DOM render Static render
Enzyme
Renders your
component as a
single unit, without
impacting of childs
When you need to
test interaction with
DOM API, or
component lifecycle
Renders React
Component to static
HTML
30. Functional and Integration testing
Integration testing - combines unit tests, and checks the
this combination works as expected
Functional (Acceptance) testing - tests which are written to
see whether the application's functionality satisfies the
specification
33. Webdriver
WebDriver is a remote control interface that enables
introspection and control of user agents. It provides a
platform- and language-neutral wire protocol as a way for out-
of-process programs to remotely instruct the behaviour of
web browsers.
44. Conclusion
Frontend tests are really important and useful
The cost is not really big, profit is much bigger
It’s easy to write them with modern approaches