Presentation from https://heisenbug-piter.ru/en/talks/2018/spb/kkw6oivsoywayacggksmk/
Once upon a time, we got a requirement to finish all testing in 2 days despite the number of tests to run. That number grew, and grew, and grew, and now there are tens of millions of them. So this is a story about building a dam against the never-ending flood which turned out to be not that scary. You are very welcome to join and see it for yourself.
11. Windows 7
Windows 8
MacOS Mavericks
RHEL 6.5
RHEL 7
SLES11.3
Ubuntu 14.04
11
Windows 2008r2
Windows 2012
Windows 2012r2
RHEL 6.4
Ubuntu 12.04
Tests:
2000000
Binaries:
48
Zulu 7
2015
Zulu 8
12. Zulu 9
12
Binaries:
110
Tests:
10 000 000
Zulu 6
Windows 2008
Windows 2012
Windows 2012r2
Windows 2016
Windows 7
Windows 8
Windows 10
MacOS Yosemite
MacOS ElCapitan
MacOS Sierra
RHEL 6
RHEL 7
Ubuntu 14.04
Ubuntu 16.04
SLES 11
SLES 12
Debian 7
Debian 8
Zulu 7
Zulu 8
2017
13. Zulu 11
13
Zulu 10
Binaries:
185
Tests:
60 000 000
Zulu 9
Zulu 6
Zulu 7
Zulu 8
fall 2018
MacOS Yosemite
MacOS ElCapitan
MacOS Sierra
MacOS HighSierra
RHEL 6
RHEL 7
Ubuntu 14.04
Ubuntu 16.04
Ubuntu 18.04
SLES 11
SLES 12
Debian 7
Debian 8
Solaris 10 x86
Solaris 11 x86
Solaris 10 Sparc
Solaris 11 Sparc
Windows 7
Windows 8
Windows 10
Windows 2008
Windows 2012
Windows 2016
Alpine Linux
Windriver Linux
14. 48 hours
Turned out that for security reasons for
some releases we need to do it in
15. Plan
1. why do we have so many tests?
2. how to run tests faster?
3. how to run tests in cloud?
4. how to run tests without losing
results?
16. Measuring is the Key
1. review a test run
2. understand what to measure
3. automate measurements
4. test run a test run
5. compare results with previous one
6. improve
7. GOTO 4
16
Workflow:
20. Intermittent Failures or Flaky Tests
20
Problems:
requires manual review
impossible to scale
time waste
Not a product, but test or configuration issues.
24. How to address intermittent failures?
write tests better ( doesn’t work for
certification suites )
fine tune systems for fragile tests
tests rerun*
24
27. 27
rerunning test until it pass may hide bugs
but sometimes you can’t avoid it for flacky
tests — in this case:
track what do you rerun
“soften” rerun conditions:
better machines
no concurrency
longer timeouts
PASSED
NOT A
PASSED
PASSED
Test Rerun fallacy
29. Reviewing Failures: Better Logs
Good Tests produces concise and easy-to-read logs:
Failures are easy to detect
Error details are in one place
Preferrably in red (LogParser, AnsiColor jenkins plugins)
Important wall-of-texts are collapsible (Collapsing Console
Sections), e.g.:
environment logs
directory listenings
unzip content
31. скачать продукт и тесты
подготовить environment
прогнать тесты
сохранить результаты
скачать продукт и тесты
подготовить environment
подложить результаты
ждать человека
Test Execution Failure Reproduction
Инфраструктура для воспроизведения
32. Разбор падений — что ещё?
Унификация — все сьюты выдают результаты в одном и
том же формате
Автолинковка к баг трекеру
Ссылки на необходимые артефакты
34. Простые ошибки
по нашей статистике причина большого процента
респинов — простые ошибки, например
собрано не то: неверное пространство или бранч
неверный брендинг, лицензия, пэкеджинг
инфраструктурная проблема
35. Smoke Tests
Smoke Tests — быстро проходят, проверяют базовые вещи
чем раньше найдена ошибка, тем дешевле её пофиксить
если smoke сьюта разрастается, то есть альтернатива
запускать её параллельно основному тестированию
36. План
1. откуда столько тестов?
2. как гонять тесты быстрее
*** вы находитесь здесь ***
3. как гонять тесты в облаке
4. как гонять тесты и не терять
результаты
47. Инфраструктура для воспроизведения
создать машину в AWS
скачать продукт и тесты
подготовить environment
прогнать тесты
сохранить результаты
создать машину в AWS
скачать продукт и тесты
подготовить environment
подложить результаты
ждать человека
Test Execution Failure Reproduction
49. Стоимость прогонов
полезно паковать небольшие сьюты в сеты
балансировка мощностью машин
опции: Spot Instances, Locations, Scheduled Instances
контроль машинного времени
59. Test Count Integrity
Проблема: у больших сьют непостоянное количество тестов:
exclude lists, know-failures lists, etc
платформенно зависимые тесты
конфигурационно зависимые тесты
плохо написанные тесты
65. Test Count Integrity — что делать?
вручную вести таблицу количества тестов в сьютах тяжело:
ручная работа
ненадёжно при больших объёмах
мы написали статистическую метрику:
ищет несколько недавних аналогичных прогонов
сравнивает с текущим результатом
69. Test Run Monitoring
Monitors Jobs Execution status
Provides Release Dashboard
Tracks durations
Tracks test count
3rd party products?
TestFlow, qTest, Zephyr, …
70. Test Run Planning — Level 1: up to 10 binaries
Jenkins dependencies are enough
build
test platform 1
smoke test
test platform 2
promote
71. Test Run Planning — Level 2: dozens of binaries
Tag Based Tool:
Major Version: zulu7, zulu8, …
Bitness: 64, 32
Platform: Linux, Windows, Mac, Solaris
form-factor: JDK, JRE, CP3, headless, …
Platform
1
Platform
2
Platform
3
Suite 1
Suite 2
Suite 3
Suite 4
72. Test Run Planning — Level 3: hundreds!
It’ve started to pretty hard to
add or remove:
platforms
test suites
binary properites
What can be done:
Rules Based Tool
Script Generation
3rd party tool?
75. Talking to customers
Test Count ≠ Product Quality
Quality of QA processes is not well-developed science
QA can’t cover everything
most important issues come from customers
asking customers “how do they use your product? “ helps
to prevent them