igor khrol - how to make tests fast and to increase the efficiency of development
TRANSCRIPT
![Page 1: Igor Khrol - How to make tests fast and to increase the efficiency of development](https://reader031.vdocument.in/reader031/viewer/2022030312/58ed710d1a28ab6c458b45f9/html5/thumbnails/1.jpg)
Как сделать тесты быстрыми и повысить
эффективность разработки?
Игорь Хрол, Toptal
![Page 2: Igor Khrol - How to make tests fast and to increase the efficiency of development](https://reader031.vdocument.in/reader031/viewer/2022030312/58ed710d1a28ab6c458b45f9/html5/thumbnails/2.jpg)
Обо мне• Игорь Хрол
• Инженер по тестированию в Toptal (www.toptal.com)
• ~10 лет в тестировании
• Инженер, менеджер, архитектор, консультант, тренер
• www.khroliz.com
![Page 3: Igor Khrol - How to make tests fast and to increase the efficiency of development](https://reader031.vdocument.in/reader031/viewer/2022030312/58ed710d1a28ab6c458b45f9/html5/thumbnails/3.jpg)
– Герман Греф, президент и председатель правления Сбербанка России
“В прошлом году мы сделали 40 тыс. изменений нашей системы. Если посмотреть на другие банки, мы в шоколаде. Но, если смотреть на Amazon, Google, мы ужасно
отстаем. Amazon делает 10 тыс. изменений своей системы в день.”
![Page 4: Igor Khrol - How to make tests fast and to increase the efficiency of development](https://reader031.vdocument.in/reader031/viewer/2022030312/58ed710d1a28ab6c458b45f9/html5/thumbnails/4.jpg)
– Герман Греф, президент и председатель правления Сбербанка России
“В прошлом году мы сделали 40 тыс. изменений нашей системы. Если посмотреть на другие банки, мы в шоколаде. Но, если смотреть на Amazon, Google, мы ужасно
отстаем. Amazon делает 10 тыс. изменений своей системы в день.”
“Если мы сейчас меняем какую-то часть своей платформы, нам нужно два-три месяца
тестировать. Непонятно, где и что вылезет при этом. Это катастрофа.”
![Page 5: Igor Khrol - How to make tests fast and to increase the efficiency of development](https://reader031.vdocument.in/reader031/viewer/2022030312/58ed710d1a28ab6c458b45f9/html5/thumbnails/5.jpg)
Регрессионная спираль смерти(с) Максим Дорофеев
![Page 6: Igor Khrol - How to make tests fast and to increase the efficiency of development](https://reader031.vdocument.in/reader031/viewer/2022030312/58ed710d1a28ab6c458b45f9/html5/thumbnails/6.jpg)
Что делать?
![Page 7: Igor Khrol - How to make tests fast and to increase the efficiency of development](https://reader031.vdocument.in/reader031/viewer/2022030312/58ed710d1a28ab6c458b45f9/html5/thumbnails/7.jpg)
Автоматизация!
![Page 8: Igor Khrol - How to make tests fast and to increase the efficiency of development](https://reader031.vdocument.in/reader031/viewer/2022030312/58ed710d1a28ab6c458b45f9/html5/thumbnails/8.jpg)
Давайте считать
![Page 9: Igor Khrol - How to make tests fast and to increase the efficiency of development](https://reader031.vdocument.in/reader031/viewer/2022030312/58ed710d1a28ab6c458b45f9/html5/thumbnails/9.jpg)
Давайте считать
• “2-3 месяца тестировать”
![Page 10: Igor Khrol - How to make tests fast and to increase the efficiency of development](https://reader031.vdocument.in/reader031/viewer/2022030312/58ed710d1a28ab6c458b45f9/html5/thumbnails/10.jpg)
Давайте считать
• “2-3 месяца тестировать”
• Допустим, 3 тестировщика
![Page 11: Igor Khrol - How to make tests fast and to increase the efficiency of development](https://reader031.vdocument.in/reader031/viewer/2022030312/58ed710d1a28ab6c458b45f9/html5/thumbnails/11.jpg)
Давайте считать
• “2-3 месяца тестировать”
• Допустим, 3 тестировщика
• 3 человека * 160 часов * 2,5 месяца = 1200 часов
![Page 12: Igor Khrol - How to make tests fast and to increase the efficiency of development](https://reader031.vdocument.in/reader031/viewer/2022030312/58ed710d1a28ab6c458b45f9/html5/thumbnails/12.jpg)
Что у роботов?
![Page 13: Igor Khrol - How to make tests fast and to increase the efficiency of development](https://reader031.vdocument.in/reader031/viewer/2022030312/58ed710d1a28ab6c458b45f9/html5/thumbnails/13.jpg)
Что у роботов?• 1200 часов ручного труда
![Page 14: Igor Khrol - How to make tests fast and to increase the efficiency of development](https://reader031.vdocument.in/reader031/viewer/2022030312/58ed710d1a28ab6c458b45f9/html5/thumbnails/14.jpg)
Что у роботов?• 1200 часов ручного труда
• Допустим, тесты в 10 раз быстрее
![Page 15: Igor Khrol - How to make tests fast and to increase the efficiency of development](https://reader031.vdocument.in/reader031/viewer/2022030312/58ed710d1a28ab6c458b45f9/html5/thumbnails/15.jpg)
Что у роботов?• 1200 часов ручного труда
• Допустим, тесты в 10 раз быстрее
• 120 часов…
![Page 16: Igor Khrol - How to make tests fast and to increase the efficiency of development](https://reader031.vdocument.in/reader031/viewer/2022030312/58ed710d1a28ab6c458b45f9/html5/thumbnails/16.jpg)
Что у роботов?• 1200 часов ручного труда
• Допустим, тесты в 10 раз быстрее
• 120 часов…
• Возьмём 10 серверов
![Page 17: Igor Khrol - How to make tests fast and to increase the efficiency of development](https://reader031.vdocument.in/reader031/viewer/2022030312/58ed710d1a28ab6c458b45f9/html5/thumbnails/17.jpg)
Что у роботов?• 1200 часов ручного труда
• Допустим, тесты в 10 раз быстрее
• 120 часов…
• Возьмём 10 серверов
• 12 часов!
![Page 18: Igor Khrol - How to make tests fast and to increase the efficiency of development](https://reader031.vdocument.in/reader031/viewer/2022030312/58ed710d1a28ab6c458b45f9/html5/thumbnails/18.jpg)
2-3 месяца vs 12 часов
![Page 19: Igor Khrol - How to make tests fast and to increase the efficiency of development](https://reader031.vdocument.in/reader031/viewer/2022030312/58ed710d1a28ab6c458b45f9/html5/thumbnails/19.jpg)
2-3 месяца vs 12 часов
Хороший результат?
![Page 20: Igor Khrol - How to make tests fast and to increase the efficiency of development](https://reader031.vdocument.in/reader031/viewer/2022030312/58ed710d1a28ab6c458b45f9/html5/thumbnails/20.jpg)
Типы проектов по длине цикла
![Page 21: Igor Khrol - How to make tests fast and to increase the efficiency of development](https://reader031.vdocument.in/reader031/viewer/2022030312/58ed710d1a28ab6c458b45f9/html5/thumbnails/21.jpg)
Типы проектов по длине цикла
• Недели-месяцы
![Page 22: Igor Khrol - How to make tests fast and to increase the efficiency of development](https://reader031.vdocument.in/reader031/viewer/2022030312/58ed710d1a28ab6c458b45f9/html5/thumbnails/22.jpg)
Типы проектов по длине цикла
• Недели-месяцы
• Дни-недели
![Page 23: Igor Khrol - How to make tests fast and to increase the efficiency of development](https://reader031.vdocument.in/reader031/viewer/2022030312/58ed710d1a28ab6c458b45f9/html5/thumbnails/23.jpg)
Типы проектов по длине цикла
• Недели-месяцы
• Дни-недели
• Часы-дни
![Page 24: Igor Khrol - How to make tests fast and to increase the efficiency of development](https://reader031.vdocument.in/reader031/viewer/2022030312/58ed710d1a28ab6c458b45f9/html5/thumbnails/24.jpg)
12 часов
Тесты не используются разработчиками
![Page 25: Igor Khrol - How to make tests fast and to increase the efficiency of development](https://reader031.vdocument.in/reader031/viewer/2022030312/58ed710d1a28ab6c458b45f9/html5/thumbnails/25.jpg)
Что делать? Какие должны быть автотесты?
• Время выполнения - максимум 10 минут
• Запуск локально на машине разработчика
![Page 26: Igor Khrol - How to make tests fast and to increase the efficiency of development](https://reader031.vdocument.in/reader031/viewer/2022030312/58ed710d1a28ab6c458b45f9/html5/thumbnails/26.jpg)
Что это за тесты-то такие?
?!
![Page 27: Igor Khrol - How to make tests fast and to increase the efficiency of development](https://reader031.vdocument.in/reader031/viewer/2022030312/58ed710d1a28ab6c458b45f9/html5/thumbnails/27.jpg)
Модульные тесты Unit-тесты
![Page 28: Igor Khrol - How to make tests fast and to increase the efficiency of development](https://reader031.vdocument.in/reader031/viewer/2022030312/58ed710d1a28ab6c458b45f9/html5/thumbnails/28.jpg)
Модульные тесты Unit-тесты
• Время выполнения одного - доли секунд
![Page 29: Igor Khrol - How to make tests fast and to increase the efficiency of development](https://reader031.vdocument.in/reader031/viewer/2022030312/58ed710d1a28ab6c458b45f9/html5/thumbnails/29.jpg)
Модульные тесты Unit-тесты
• Время выполнения одного - доли секунд
• Короткие: быстро писать
![Page 30: Igor Khrol - How to make tests fast and to increase the efficiency of development](https://reader031.vdocument.in/reader031/viewer/2022030312/58ed710d1a28ab6c458b45f9/html5/thumbnails/30.jpg)
Модульные тесты Unit-тесты
• Время выполнения одного - доли секунд
• Короткие: быстро писать
• Редко падают без причины
![Page 31: Igor Khrol - How to make tests fast and to increase the efficiency of development](https://reader031.vdocument.in/reader031/viewer/2022030312/58ed710d1a28ab6c458b45f9/html5/thumbnails/31.jpg)
Модульные тесты Unit-тесты
• Время выполнения одного - доли секунд
• Короткие: быстро писать
• Редко падают без причины
• В случае падения - быстрый анализ результата
![Page 32: Igor Khrol - How to make tests fast and to increase the efficiency of development](https://reader031.vdocument.in/reader031/viewer/2022030312/58ed710d1a28ab6c458b45f9/html5/thumbnails/32.jpg)
Недостатки
![Page 33: Igor Khrol - How to make tests fast and to increase the efficiency of development](https://reader031.vdocument.in/reader031/viewer/2022030312/58ed710d1a28ab6c458b45f9/html5/thumbnails/33.jpg)
Недостатки
• Не повторяет действий пользователя на 100%
![Page 34: Igor Khrol - How to make tests fast and to increase the efficiency of development](https://reader031.vdocument.in/reader031/viewer/2022030312/58ed710d1a28ab6c458b45f9/html5/thumbnails/34.jpg)
Недостатки
• Не повторяет действий пользователя на 100%
• Требуется знание технологий
![Page 35: Igor Khrol - How to make tests fast and to increase the efficiency of development](https://reader031.vdocument.in/reader031/viewer/2022030312/58ed710d1a28ab6c458b45f9/html5/thumbnails/35.jpg)
Недостатки
• Не повторяет действий пользователя на 100%
• Требуется знание технологий
• Зачастую невозможно использовать с уже написанным кодом
![Page 36: Igor Khrol - How to make tests fast and to increase the efficiency of development](https://reader031.vdocument.in/reader031/viewer/2022030312/58ed710d1a28ab6c458b45f9/html5/thumbnails/36.jpg)
Пирамида автоматизации тестирования
UI
API
Unit
http://martinfowler.com/bliki/TestPyramid.html
![Page 37: Igor Khrol - How to make tests fast and to increase the efficiency of development](https://reader031.vdocument.in/reader031/viewer/2022030312/58ed710d1a28ab6c458b45f9/html5/thumbnails/37.jpg)
Почему мало/не используется?
![Page 38: Igor Khrol - How to make tests fast and to increase the efficiency of development](https://reader031.vdocument.in/reader031/viewer/2022030312/58ed710d1a28ab6c458b45f9/html5/thumbnails/38.jpg)
Разработчики становятся ответственными за
тестирование
![Page 39: Igor Khrol - How to make tests fast and to increase the efficiency of development](https://reader031.vdocument.in/reader031/viewer/2022030312/58ed710d1a28ab6c458b45f9/html5/thumbnails/39.jpg)
Разработчики становятся ответственными за
тестирование
Нужно менять культуру разработки
![Page 40: Igor Khrol - How to make tests fast and to increase the efficiency of development](https://reader031.vdocument.in/reader031/viewer/2022030312/58ed710d1a28ab6c458b45f9/html5/thumbnails/40.jpg)
Тестировщики не обладают нужными
навыками
![Page 41: Igor Khrol - How to make tests fast and to increase the efficiency of development](https://reader031.vdocument.in/reader031/viewer/2022030312/58ed710d1a28ab6c458b45f9/html5/thumbnails/41.jpg)
Тестировщики не обладают нужными
навыками
Нужны другие тестировщики
![Page 42: Igor Khrol - How to make tests fast and to increase the efficiency of development](https://reader031.vdocument.in/reader031/viewer/2022030312/58ed710d1a28ab6c458b45f9/html5/thumbnails/42.jpg)
Как это выглядит?
![Page 43: Igor Khrol - How to make tests fast and to increase the efficiency of development](https://reader031.vdocument.in/reader031/viewer/2022030312/58ed710d1a28ab6c458b45f9/html5/thumbnails/43.jpg)
Как это выглядит?• Unit-тесты
• Ruby - 5 минут
• Scala - 70 секунд
• JavaScript - 30 секунд
![Page 44: Igor Khrol - How to make tests fast and to increase the efficiency of development](https://reader031.vdocument.in/reader031/viewer/2022030312/58ed710d1a28ab6c458b45f9/html5/thumbnails/44.jpg)
Как это выглядит?• Unit-тесты
• Ruby - 5 минут
• Scala - 70 секунд
• JavaScript - 30 секунд
• Интеграционные тесты - 10-15 минут
![Page 45: Igor Khrol - How to make tests fast and to increase the efficiency of development](https://reader031.vdocument.in/reader031/viewer/2022030312/58ed710d1a28ab6c458b45f9/html5/thumbnails/45.jpg)
Как это выглядит?• Unit-тесты
• Ruby - 5 минут
• Scala - 70 секунд
• JavaScript - 30 секунд
• Интеграционные тесты - 10-15 минут
• Результат всех тестов - через 30 минут