why it is not working

39
Почему это не работает? или Записки консультанта Февраль 2012 Алексей Резчиков

Upload: automated-testinginfo

Post on 20-Jun-2015

3.457 views

Category:

Documents


2 download

DESCRIPTION

Основные ошибки внедрения ATDD, BDD, CI, CD на проектах, Резчиков Алексей Каждый новый проект, к которому Алексей подключается в качестве консультанта, уже имеет свою историю внедрения автоматизации тестирования, CI и CD. Истории очень разные, каждая интересна по-своему, каждая рассказывает об ошибках. О самых распространенных из них, а также о том, как их не допустить, Алексей расскажет в своем докладе.

TRANSCRIPT

Page 1: Why it is not working

Почему это не работает? или

Записки консультанта

Февраль 2012

Алексей Резчиков

Page 2: Why it is not working

Обо мне

Консультант по Testing Automation, Continuous Integration и Continuous Delivery

Java разработчик и тимлид уже более 6-ти лет

В разное время работал project, resource, development и competency manager

Последователь XP/Agile/Lean

Евангелист Spring Framework в рамках SpringByExample.com.ua

@twincengray #atdays

2

Page 3: Why it is not working

Куда мы идем?

@twincengray #atdays 3

Page 4: Why it is not working

@twincengray #atdays 4

Реалии индустрии

Page 5: Why it is not working

Сказки

Сказка ложь, да в ней намек… (с)

Народная мудрость

@twincengray #atdays 5

Page 6: Why it is not working

Сказка №1

Site builder

Разрабатывается много лет, много унаследованного кода и архитектуры

Большая текучка кадров

@twincengray #atdays 6

Page 7: Why it is not working

Проблема и решение

Проблема: Качество и своевременность поставки Предлагаемое решение: Внедрение автоматизации тестирования

@twincengray #atdays

7

Page 8: Why it is not working

А на самом деле…

На самом деле проблема оказалась в отсутствии структурированных требований и невозможности регрессионного тестирования

@twincengray #atdays 8

Page 9: Why it is not working

Сказка №2 Распределенное клиент-серверное приложение

Сервер и клиент тоже веб-приложения

Отраслевые особенности

Работающий процесс Continuous Deployment

@twincengray #atdays 9

Page 10: Why it is not working

Проблема и решение Проблема:

Нет возможности поставлять продукт быстро из-за большого объема ручного тестирования

Предложенное решение:

Внедрение автоматизированного тестирования и CI

@twincengray #atdays 10

Page 11: Why it is not working

А на самом деле…

Отсутствие низкоуровневых тестов не позволяет, даже при наличии UI тестов оперативно найти и устранить неисправность

@twincengray #atdays 11

Page 12: Why it is not working

«Хорошо, но плохо» Это про внедрение автоматизации.

Из моего опыта только единицы заказчиков могут конкретно ответить на вопрос зачем им автоматизация

Остальные не готовы за это платить

@twincengray #atdays 12

Page 13: Why it is not working

5 почему (почему не работает)

@twincengray #atdays 13

Why?

Why?

Why?

Why?

Why?

Page 14: Why it is not working

Соответствие цели внедрения средствам (практикам внедрения)

Правильное понимание/постановка цели внедрения

Правильное определение проблемы, которую будет решать внедрение той или иной практики

Осознание наличия проблемы

Правильная постановка и понимание целей проекта (продукта)

@twincengray #atdays 14

Page 15: Why it is not working

Мы поговорим про

Соответствие цели внедрения средствам (практикам внедрения)

Правильное понимание/постановка цели внедрения

Правильное определение проблемы, которую будет решать внедрение той или иной практики

@twincengray #atdays 15

Page 16: Why it is not working

Понятия/практики (buzzwords)

ATDD – Acceptance Test Driven Development

BDD – Behavior Driven Development

CI – Continuous Integration

CD – Continuous Delivery

@twincengray #atdays 16

Page 17: Why it is not working

«Топографический кретинизм»

@twincengray #atdays 17

Page 18: Why it is not working

«Синдром серебряной пули»

@twincengray #atdays 18

Page 19: Why it is not working

Полумеры

- А, сто рублей, не спасут отца русской демократии?

@twincengray #atdays 19

Page 20: Why it is not working

Детские болезни

@twincengray #atdays 20

Page 21: Why it is not working

ATDD: Непонимание что такое критерии приемки

@twincengray #atdays 21

Page 22: Why it is not working

ATDD: Когда нужно BDD и наоборот

@twincengray #atdays 22

Page 23: Why it is not working

ATDD: Критерии приемки пишутся не всей командой

@twincengray #atdays 23

Page 24: Why it is not working

BDD: Cоставление GWT

@twincengray #atdays 24

Page 25: Why it is not working

D|DefaultListableBeanFactory |Returning cached instance of singleton bean 'org.springframework.context.annotation.internalAutowiredAnnotationProcessor' D|DefaultListableBeanFactory |Returning cached instance of singleton bean 'org.springframework.context.annotation.internalRequiredAnnotationProcessor' D|DefaultListableBeanFactory |Returning cached instance of singleton bean 'org.springframework.context.annotation.internalCommonAnnotationProcessor' D|DefaultListableBeanFactory |Returning cached instance of singleton bean 'org.springframework.context.annotation.internalPersistenceAnnotationProcessor' D|DefaultListableBeanFactory |Creating shared instance of singleton bean 'sendMailTextConfig' D|DefaultListableBeanFactory |Creating instance of bean 'sendMailTextConfig' D|InjectionMetadata |Found injected element on class [com.technorati.portal.service.SendMailTextConfig$$EnhancerByCGLIB$$33a64e76]: AutowiredFieldElement for private org.springframework.core.env.Environment com.technorati.portal.service.SendMailTextConfig.environment D|DefaultListableBeanFactory |Eagerly caching bean 'sendMailTextConfig' to allow for resolving potential circular references D|InjectionMetadata |Processing injected method of bean 'sendMailTextConfig': AutowiredFieldElement for private org.springframework.core.env.Environment com.technorati.portal.service.SendMailTextConfig.environment D|DefaultListableBeanFactory |Returning cached instance of singleton bean 'environment' D|AutowiredAnnotationBeanPostProcessor |Autowiring by type from bean name 'sendMailTextConfig' to bean named 'environment' D|DefaultListableBeanFactory |Finished creating instance of bean 'sendMailTextConfig' D|DefaultListableBeanFactory |Returning cached instance of singleton bean 'org.springframework.context.annotation.ConfigurationClassPostProcessor.importAwareProcessor' D|DefaultListableBeanFactory |Creating shared instance of singleton bean 'sendMailService' D|DefaultListableBeanFactory |Creating instance of bean 'sendMailService' D|DefaultListableBeanFactory |Returning cached instance of singleton bean 'sendMailTextConfig' D|DefaultListableBeanFactory |Creating shared instance of singleton bean 'freemarkerConfiguration' D|DefaultListableBeanFactory |Creating instance of bean 'freemarkerConfiguration' D|DefaultListableBeanFactory |Returning cached instance of singleton bean 'sendMailTextConfig' D|DefaultListableBeanFactory |Eagerly caching bean 'freemarkerConfiguration' to allow for resolving potential circular references D|DefaultListableBeanFactory |Finished creating instance of bean 'freemarkerConfiguration' D|DefaultListableBeanFactory |Creating shared instance of singleton bean 'templatesMap' D|DefaultListableBeanFactory |Creating instance of bean 'templatesMap' D|DefaultListableBeanFactory |Returning cached instance of singleton bean 'sendMailTextConfig' D|DefaultListableBeanFactory |Eagerly caching bean 'templatesMap' to allow for resolving potential circular references D|DefaultListableBeanFactory |Finished creating instance of bean 'templatesMap' D|DefaultListableBeanFactory |Creating shared instance of singleton bean 'mailSender' D|DefaultListableBeanFactory |Creating instance of bean 'mailSender' D|DefaultListableBeanFactory |Returning cached instance of singleton bean 'sendMailTextConfig' D|DefaultListableBeanFactory |Eagerly caching bean 'mailSender' to allow for resolving potential circular references D|DefaultListableBeanFactory |Finished creating instance of bean 'mailSender' D|InjectionMetadata |Found injected element on class [com.technorati.portal.service.SendMailService]: ResourceElement for private java.util.Map com.technorati.portal.service.SendMailService.templatesMap D|InjectionMetadata |Found injected element on class [com.technorati.portal.service.SendMailService]: AutowiredFieldElement for private org.springframework.mail.MailSender com.technorati.portal.service.SendMailService.mailSender D|InjectionMetadata |Found injected element on class [com.technorati.portal.service.SendMailService]: AutowiredFieldElement for private freemarker.template.Configuration com.technorati.portal.service.SendMailService.freemarkerConfiguration D|InjectionMetadata |Found injected element on class [com.technorati.portal.service.SendMailService]: AutowiredFieldElement for private java.lang.String com.technorati.portal.service.SendMailService.emailFrom D|DefaultListableBeanFactory |Eagerly caching bean 'sendMailService' to allow for resolving potential circular references D|InjectionMetadata |Processing injected method of bean 'sendMailService': ResourceElement for private java.util.Map com.technorati.portal.service.SendMailService.templatesMap D|DefaultListableBeanFactory |Returning cached instance of singleton bean 'templatesMap' D|InjectionMetadata |Processing injected method of bean 'sendMailService': AutowiredFieldElement for private org.springframework.mail.MailSender com.technorati.portal.service.SendMailService.mailSender D|DefaultListableBeanFactory |Returning cached instance of singleton bean 'mailSender' D|AutowiredAnnotationBeanPostProcessor |Autowiring by type from bean name 'sendMailService' to bean named 'mailSender' D|InjectionMetadata |Processing injected method of bean 'sendMailService': AutowiredFieldElement for private freemarker.template.Configuration com.technorati.portal.service.SendMailService.freemarkerConfiguration D|DefaultListableBeanFactory |Returning cached instance of singleton bean 'freemarkerConfiguration' D|AutowiredAnnotationBeanPostProcessor |Autowiring by type from bean name 'sendMailService' to bean named 'freemarkerConfiguration' D|InjectionMetadata |Processing injected method of bean 'sendMailService': AutowiredFieldElement for private java.lang.String com.technorati.portal.service.SendMailService.emailFrom D|DefaultListableBeanFactory |Finished creating instance of bean 'sendMailService'

BDD: «Где упал мой тест?»

@twincengray #atdays 25

Page 26: Why it is not working

BDD: Инструментальные проблемы

@twincengray #atdays 26

Page 27: Why it is not working

CI

@twincengray #atdays 27

Page 28: Why it is not working

CI: «Демократия»

@twincengray #atdays 28

Page 29: Why it is not working

CD: Путанница Cont. deployment и CD

@twincengray #atdays 29

Page 30: Why it is not working

CD

@twincengray #atdays 30

Page 31: Why it is not working

CD: А где ваш Configuration Management?

@twincengray #atdays 31

Page 32: Why it is not working

Технические риски

@twincengray #atdays 32

Page 33: Why it is not working

Недостаток опыта по технологии

@twincengray #atdays 33

Page 34: Why it is not working

Недостаток опыта в тестировании

@twincengray #atdays 34

Page 35: Why it is not working

Избегание CI

@twincengray #atdays 35

Page 36: Why it is not working

Тестирование на слишком высоком уровне

@twincengray #atdays 36

End-to-end/GUI

Integration

Unit

Page 37: Why it is not working

Отсутствие или неполная регрессия

@twincengray #atdays 37

Page 38: Why it is not working

Итоги

Начинать с начала

«Серебряной пули» нет

Individuals and interactions…

It’s all about the money

@twincengray #atdays 38

Page 39: Why it is not working

Вопросы?

@twincengray #atdays 39

@twincengray @ua_spring

[email protected]

SpringByExample.com.ua

mcgray.com.ua