Hey you! Why do you not writing tests? Maybe you don’t know why you need to write them? Maybe you have doubts about who should write tests? Or your manager doesn’t give you time to write tests? Or you just don’t know how to write tests or choose the right technologies, or how to choose between UI, integration or unit test for your case? Come to my talk, and we will figure out that together!
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Andrii Shumada "No excuses for not writing tests"
1. No excuses for not
writing tests
Andrii Shumada
Ciklum/WalkMe
2020
2. They take time to write
Why do you not write test?
Management asks for
features, not tests
I don’t know how to write
tests
I don’t know why I need to
write test
3. Agenda
1. What are the “tests” or “autotests”
2. Why do we need to write [auto]tests
3. Kinds of tests
4. What technologies I recommend for writing tests
5. F.A.Q.
19. Flow 1: No tests
1. Write or adjust code
2. Restart app
[okay, maybe you have
live reload]
3. Repeat user flow click
by click
4. Check result
5. Repeat from step 1
Flow 2: TDD
1. Write tests
2. Write or adjust code
3. Restart test
4. Repeat from step 2
29. When use Selenium (Webdriver.io)
- Your app has problems in different browsers (IE, Safari)
- Your manager is VERY afraid, that something will not work in particular
browser
- Without automation your QA’s are always doing regression tests in different
browsers
Pros:
- Supports all major
browsers
Cons:
- Needs Java runtime
- More complicated setup
31. When use Puppeteer
- In all other cases
- You don’t need Java
Runtime
- Faster setup
- Works faster
Pros Cons
- Supports only
Chromium and
Firefox
(experimental)
33. Вибір тест фреймворку Mocha/Jest/Tap/Cucumber
Mocha:
- Mature
- Stable
- No assertion framework
Jest:
- Mature
- Stable
- Bundled with CreateReactApp
Tap, Cucumber, Jasmine:
- less functional
- Less maintable
- Require more work from development
34. My choice
Mocha + Chai, because it’s stable, functional
and works
If you just starting writing tests - stick to Jest,
it’a a bit faster
37. Which test to write,
unit, integration, UI
UI
Integration
Unit
Better emulates
User experience Harder to write and
maintain
38. Which test to write,
unit, integration, UI
UI
Unit
Integration
Integrations tests work as a contract between frontend and
backend, your API should be more stable than
implementation behind them
39. Tests as a part of CI CD
- Always run tests on CI
- Only CI will guarantee, that tests keep green on master
- Make a CI process that merges master into your branch, run tests and after
pushes to origin/master
41. Business is not giving time to write tests..
And business has right!
Just tests are not bringing value as tests!
42. Eighter show, how much money they lose without tests or just include tests in
code writing time! Tests are also code
Business understands only money!
43. Who needs to write tests - AutomationQA or developer
If you have dedicated AutomationQA - then probably Automation QA with help of
developers
Otherwise - developers should write tests.