Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
© 2011 IBM Corporation
7 Dicas para Acelerar os Testes com
Resultados Efetivos
12 de Julho de 2013
Felipe Freire – pfreire...
© 2012 IBM Corporation
Enabling Product and Service Innovation | Rational
Sobre a a apresentação – Objetivo
Dar armas ao t...
© 2012 IBM Corporation
Enabling Product and Service Innovation | Rational
Agenda
 Introdução
 Dicas
 Dê foco aos testes...
© 2012 IBM Corporation
Enabling Product and Service Innovation | Rational
4
Speed Value
of digital content in 2012, up 50%...
© 2012 IBM Corporation
Enabling Product and Service Innovation | Rational
5
Qualidade de Software: Problema de custo em to...
© 2012 IBM Corporation
Enabling Product and Service Innovation | Rational
6
Desafios de entregar no prazo com qualidade
34...
© 2012 IBM Corporation
Enabling Product and Service Innovation | Rational
Piores práticas – experiência pessoal
1. Deixar ...
© 2012 IBM Corporation
Enabling Product and Service Innovation | Rational
1) Dê foco aos testes
 O esforço de testes pode...
© 2012 IBM Corporation
Enabling Product and Service Innovation | Rational
© 2012 IBM Corporation
Enabling Product and Service Innovation | Rational
© 2012 IBM Corporation
Enabling Product and Service Innovation | Rational
2) Antecipe a execução dos testes
 Desenvolvime...
© 2012 IBM Corporation
Enabling Product and Service Innovation | Rational
© 2012 IBM Corporation
Enabling Product and Service Innovation | Rational
Testes de Sistema
Requisitos
Teste
Unitário
UAT
...
© 2012 IBM Corporation
Enabling Product and Service Innovation | Rational
Requisitos
Teste
Unitário
Performance
UAT
OAT
Te...
© 2012 IBM Corporation
Enabling Product and Service Innovation | Rational
3) Versione tudo – inclusive a infraestrutura
© 2012 IBM Corporation
Enabling Product and Service Innovation | Rational
Troque o seu servidor por uma nuvem
 Exemplo: 3...
© 2012 IBM Corporation
Enabling Product and Service Innovation | Rational
4) Flexibilize os ambientes de testes
Cloud
De...
© 2012 IBM Corporation
Enabling Product and Service Innovation | Rational
A esteira de entregas
Implantar
Ambiente de exec...
© 2012 IBM Corporation
Enabling Product and Service Innovation | Rational
E depois que o software é construído?
19
Instruç...
© 2012 IBM Corporation
Enabling Product and Service Innovation | Rational
Testing Tradeoffs
Cost
Fidelity
Traditional
Stag...
© 2012 IBM Corporation
Enabling Product and Service Innovation | Rational
21
DevOps - checklist
• Do you use source contro...
© 2012 IBM Corporation
Enabling Product and Service Innovation | Rational
Define
constrained
systems and
services for
virt...
© 2012 IBM Corporation
Enabling Product and Service Innovation | Rational
Incremental Integration TestingIncremental Integ...
© 2012 IBM Corporation
Enabling Product and Service Innovation | Rational
6) Automatize corretamente
© 2012 IBM Corporation
Enabling Product and Service Innovation | Rational
Há retorno no investimento em automação dos test...
© 2012 IBM Corporation
Enabling Product and Service Innovation | Rational
Ferramentas substituem testadores?
 “Podemos re...
© 2012 IBM Corporation
Enabling Product and Service Innovation | Rational
Gerentes: o que buscar na automação dos testes
...
© 2012 IBM Corporation
Enabling Product and Service Innovation | Rational
7) Mobile – testar múltipals configurações
Clien...
© 2012 IBM Corporation
Enabling Product and Service Innovation | Rational
© 2012 IBM Corporation
Enabling Product and Service Innovation | Rational
© 2012 IBM Corporation
Enabling Product and Service Innovation | Rational
© 2012 IBM Corporation
Enabling Product and Service Innovation | Rational
Resumo
1. Dê foco aos testes
2. Antecipe a execu...
© 2012 IBM Corporation
Enabling Product and Service Innovation | Rational
Collaborative Lifecycle
Management
Delivery
Pipe...
© 2012 IBM Corporation
Enabling Product and Service Innovation | Rational
Links
 Jazz.Net
 6 Ways for Enterprises to Ado...
Upcoming SlideShare
Loading in …5
×

TDC 2013 7 Dicas para acelerar os testes

1,439 views

Published on

Apresentação realizada no TDC 2013, na trilha de testes contendo dicas de como utilizar técnicas e ferramentas atuais para acelerar os testes de software e obter resultados mais efetivos.

Published in: Technology
  • Be the first to comment

TDC 2013 7 Dicas para acelerar os testes

  1. 1. © 2011 IBM Corporation 7 Dicas para Acelerar os Testes com Resultados Efetivos 12 de Julho de 2013 Felipe Freire – pfreire@br.ibm.com IBM Software, Rational TDC 2013 @pfelipebr
  2. 2. © 2012 IBM Corporation Enabling Product and Service Innovation | Rational Sobre a a apresentação – Objetivo Dar armas ao testador para mudar a organização  Compartilhar experiências com testes (dicas)  Experiência IBM em clientes globais  Eventos de testes  STAREAST / STARWEST  BRATESTE  Ajudar a trazer novas idéias para sua empresa
  3. 3. © 2012 IBM Corporation Enabling Product and Service Innovation | Rational Agenda  Introdução  Dicas  Dê foco aos testes  Antecipe a execução dos testes  Versione tudo (release)  Cloud – Flexibilize os ambientes de testes  Virtualize os serviços e ambientes de testes  Automatize corretamente  Mobile – testar múltipals configurações  Encerramento 3
  4. 4. © 2012 IBM Corporation Enabling Product and Service Innovation | Rational 4 Speed Value of digital content in 2012, up 50% from 2011 New Insights 1.1.Technology factorsTechnology factors 2. People skills 3. Market factors 4. Macro-economic factors Factors impacting organizations: Technology is the key to success, according to CEOs … IBM Global CEO Study 1 5. Regulatory concerns 6. Globalization 7. Socio-economic factors 8. Environmental issues 9. Geopolitical factors
  5. 5. © 2012 IBM Corporation Enabling Product and Service Innovation | Rational 5 Qualidade de Software: Problema de custo em todas as indústrias  Softwares são culpados por mais problemas de negócio do que qualquer outro produto feito pelo homem  A baixa qualidade dos softwares tornou-se um dos tópicos mais caros da história humana – > $150 bilhões por ano nos EUA. – > $500 bilhões por ano no mundo.  Projetos cancelados devido a baixa qualidade são > 15% mais custosos do que projetos bem sucedidos de mesmo tipo e tamanho.. Source: Capers Jones, 2011 Based on 675 companies, 35 government/military groups, 13,500 projects, 50-75 new projects/month, 24 countries, 15 lawsuites
  6. 6. © 2012 IBM Corporation Enabling Product and Service Innovation | Rational 6 Desafios de entregar no prazo com qualidade 34% de todos os novos projetos de TI implantam com atraso** experimenta atrasos na integração, configuração ou teste da aplicação 41% experimentam atrasos para identificação de problemas e ajustes em produção 45% das aplicações sofrem roll-back por problemas de qualidade 51% tempo médio para entregar uma mudança simples 4-6 Semanas tempo médio para isolar um defeito 3-4 SemanasGAP GAP ProduçãoDesenvolvimento Testes 1. Dificuldade em atender às requisições de desenvolvimento e testes para configuração de ambientes – infraestrutura, middleware e aplicações 2. Defeitos em aplicações e problemas de desempenho causam 50% dos rollbacks
  7. 7. © 2012 IBM Corporation Enabling Product and Service Innovation | Rational Piores práticas – experiência pessoal 1. Deixar os testes para o final do projeto 1. Dois ciclos de testes são o suficiente 1. Qualquer um pode criar e executar os testes 1. Todos os testes devem ser detalhados e muito bem estruturados 1. Buscar 100% de automação 1. Executar o maior número de testes possíveis 1. Todos os defeitos encontrados devem ser corrigidos 1. Ignorar configurações para os testes 7 http://www.slideshare.net/pfelipe/ibm-rational-piores-prticas-em-testes
  8. 8. © 2012 IBM Corporation Enabling Product and Service Innovation | Rational 1) Dê foco aos testes  O esforço de testes pode beirar o infinito! – Testar todas as variáveis, cenários, configurações…  Onde os testes são mais importantes? – Histórico de outros projetos similares  onde deu problema? – Risco: quaiscaracterísticas do sistema são mais críticas?  Abordagem dos testes Na média, desenvolvedores profissionais cometem de 15 a 50 erros a cada mil linhas de código criadas. Code Complete (2nd edition) http://cc2e.com CoQ = Technical Debt (Agile)
  9. 9. © 2012 IBM Corporation Enabling Product and Service Innovation | Rational
  10. 10. © 2012 IBM Corporation Enabling Product and Service Innovation | Rational
  11. 11. © 2012 IBM Corporation Enabling Product and Service Innovation | Rational 2) Antecipe a execução dos testes  Desenvolvimento iterativo / ágil – Entregas parciais – Oportunidade de verificar a qualidade antecipadamente – Ciclos de testes alinhados com as iterações / sprints  “Boas equipes desenvolvem bons softwares"
  12. 12. © 2012 IBM Corporation Enabling Product and Service Innovation | Rational
  13. 13. © 2012 IBM Corporation Enabling Product and Service Innovation | Rational Testes de Sistema Requisitos Teste Unitário UAT OAT Performance Barreiras da Qualidade Ambiente Tradicional Big Bang × Múltiplos defeitos identificados de uma vez × Maior risco × Mais caro
  14. 14. © 2012 IBM Corporation Enabling Product and Service Innovation | Rational Requisitos Teste Unitário Performance UAT OAT Testes Integrados Teste de Integração Sys Tests  Acelera o teste  Reduz custo  Diminui o risco
  15. 15. © 2012 IBM Corporation Enabling Product and Service Innovation | Rational 3) Versione tudo – inclusive a infraestrutura
  16. 16. © 2012 IBM Corporation Enabling Product and Service Innovation | Rational Troque o seu servidor por uma nuvem  Exemplo: 300 servidores para as equipes de desenvolvimento – Cada equipe tem os seus servidores – Hardware obsoleto – Sem controle – Testes e desenvolvimento rodando na mesma máquina
  17. 17. © 2012 IBM Corporation Enabling Product and Service Innovation | Rational 4) Flexibilize os ambientes de testes Cloud DevOps ↪Common Source Control ↪Automated Builds (Build Definitions) ↪Continuous Integration (CI) ↪Automated Delivery ↪Continuous Delivery to Test (CD) ↪Continuous Delivery to Production-like Systems (Infrastructure as Code) ↪Continuous Delivery thru Prod (Cloud based)
  18. 18. © 2012 IBM Corporation Enabling Product and Service Innovation | Rational A esteira de entregas Implantar Ambiente de execução do sistema Repositório de Controle de fontes Artefatos fontes .jsp .java .html chef recipes .sh Artefatos entregáveis Build, Empacota, Testes unitários Binários Configuração da plataforma Biblioteca 18
  19. 19. © 2012 IBM Corporation Enabling Product and Service Innovation | Rational E depois que o software é construído? 19 Instruções de Instalação Red Hat Linux Nanana na nana na nanana. Na nanana na nana. Nana nanana nananan na nana na nana nanana na na nanana. Apache Web Server Nanana na nana na nanana. Na nanana na nana. Nana nanana nananan na nana na nana nanana na na nanana. CLOUD deploy.rb cookbook_file "/home/jazz/.jrubyrc" do # handle segfaults that occur when using JRuby w/ the IBM JDK # see: http://jira.codehaus.org/browse/JRUBY-5700 source "jrubyrc" mode "0644" end env_options = { # ensure that build scripts can easily access Java and Jruby from the normal path 'ANT_HOME' => node[:ant][:ant_home], 'JAVA_HOME' => node[:java][:java_path], 'PATH' => "#{node[:java][:java_path]}/bin:#{node[:jruby] [:install_dir]}/jruby/bin:#{ENV["PATH"]}" } # install external gem libs %w{cucumber httpclient rake net-ssh net-scp httpclient jruby-openssl json- jruby rubyzip}.each do |gem_name| execute "install_#{gem_name}" do action :run command "#{node[:jruby][:install_dir]}/jruby/bin/jgem install #{gem_name}" environment(env_options) end deploy.rb cookbook_file "/home/jazz/.jrubyrc" do # handle segfaults that occur when using JRuby w/ the IBM JDK # see: http://jira.codehaus.org/browse/JRUBY-5700 source "jrubyrc" mode "0644" end env_options = { # ensure that build scripts can easily access Java and Jruby from the normal path 'ANT_HOME' => node[:ant][:ant_home], 'JAVA_HOME' => node[:java][:java_path], 'PATH' => "#{node[:java][:java_path]}/bin:#{node[:jruby] [:install_dir]}/jruby/bin:#{ENV["PATH"]}" } # install external gem libs %w{cucumber httpclient rake net-ssh net-scp httpclient jruby-openssl json- jruby rubyzip}.each do |gem_name| execute "install_#{gem_name}" do action :run command "#{node[:jruby][:install_dir]}/jruby/bin/jgem install #{gem_name}" environment(env_options) end
  20. 20. © 2012 IBM Corporation Enabling Product and Service Innovation | Rational Testing Tradeoffs Cost Fidelity Traditional Staging Environment Testing in Cloud-based Continuous Delivery Testing in Cloud-based Continuous Delivery with Service Simulation Traditional UAT without DevOps Typical JUnit Tests Build Verification Tests
  21. 21. © 2012 IBM Corporation Enabling Product and Service Innovation | Rational 21 DevOps - checklist • Do you use source control? • Can you deploy a system in one step? • Do you deploy your applications daily and verify them? • Do you have an issue tracking system for operations, linked to a bug database used for development? • Do you validate platform software against expected KPIs, before deploying your application? • Do you have well defined delivery pipeline? • Do you have agreed upon patterns for applications and platforms? • Can your developers launch, use, and destroy representative environments on demand? • Do you provide Infrastructure and Platform as a Service for your development teams? • Do you have automated tests to validate your application function and security? • Do your new operation engineers understand how to automate system administration? • Do your operations and development teams collaborate regularly? *Based on “The Joel Test: 12 Steps to Better Code” http://www.joelonsoftware.com/articles/fog0000000043.html
  22. 22. © 2012 IBM Corporation Enabling Product and Service Innovation | Rational Define constrained systems and services for virtualization Integration OperabilityUser AcceptanceSystem IntegrationSystemUnit Integration OperabilityUser AcceptanceSystem IntegrationSystemUnit Performance Developer uses virtual services to unit test code on their workstation – no elaborate environment required Development and Test teams uses virtual services for early stage advanced testing The full system or components of the system can be performance tested early in the cycle. Virtual services can be used when components are not available Later in the cycle, final pre- production versions of services are swapped in as they become available. Final testing is done against real services 5) Virtualização de serviços e aplicações benefícios para todo o ciclo
  23. 23. © 2012 IBM Corporation Enabling Product and Service Innovation | Rational Incremental Integration TestingIncremental Integration Testing Actual Service/App Virtual Service/App Test Virtualization is an enabler for continuous Integration Testing Services, applications, systems are introduced into the continuous integration cycle in a prioritized, controlled fashion. Test Virtualization Solution is a key enabler for Continuous Integration Testing
  24. 24. © 2012 IBM Corporation Enabling Product and Service Innovation | Rational 6) Automatize corretamente
  25. 25. © 2012 IBM Corporation Enabling Product and Service Innovation | Rational Há retorno no investimento em automação dos testes?  Testes executados com maior frequencia  Testes levam menos tempo para executar  Leva menos esforço humano para executar os testes  Podemos cobrir mais características do sistema  Podemos executar o equivalente a dias/semanas de testes em poucos minutos / horas
  26. 26. © 2012 IBM Corporation Enabling Product and Service Innovation | Rational Ferramentas substituem testadores?  “Podemos reduzir o número de testadores uma vez que utilizarmos ferramentas de automação?” – Quem são seus testadores? • Seres “não-pensantes”, ou • Investigadores inteligentes? – Precisamos de mais skills, não menos – Automação pode liberar o testador para realizar mais designs de testes e exploração • E assim achar mais defeitos  Ferramentas não substituem testadores, só suportam eles!
  27. 27. © 2012 IBM Corporation Enabling Product and Service Innovation | Rational Gerentes: o que buscar na automação dos testes  Benefícios da automação devem ser crescentes – ex: número de testes, cobertura  Custos devem ser cada vez menores – Custo de construção para novos testes, manutenção (por teste), análise de falhas  Sinais de problemas na arquitetura do testware – testadores não-técnicos conseguem escrever e executar testes automatizados? – Me mostre um teste automatizado rodando – Vamos mudar para outra ferramenta? (observe a reação)
  28. 28. © 2012 IBM Corporation Enabling Product and Service Innovation | Rational 7) Mobile – testar múltipals configurações Client Tier Devices Mobile-specific challenges: Lots of device targets Provisioning rules and artifacts Curated app stores Dependent upon backend service versions
  29. 29. © 2012 IBM Corporation Enabling Product and Service Innovation | Rational
  30. 30. © 2012 IBM Corporation Enabling Product and Service Innovation | Rational
  31. 31. © 2012 IBM Corporation Enabling Product and Service Innovation | Rational
  32. 32. © 2012 IBM Corporation Enabling Product and Service Innovation | Rational Resumo 1. Dê foco aos testes 2. Antecipe a execução dos testes 3. Versione tudo (release) 4. Cloud – Flexibilize os ambientes de testes 5. Virtualize os serviços e ambientes de testes 6. Automatize corretamente 7. Mobile
  33. 33. © 2012 IBM Corporation Enabling Product and Service Innovation | Rational Collaborative Lifecycle Management Delivery Pipeline Delivery Pipeline OSLC Configuration Automation Configuration Automation OSLC Continuous Integration Continuous Integration OSLC Quality Management Quality Management OSLC Provisioning Automation Provisioning Automation OSLC Cloud Pull configurations Track work Trigger deployment Deploy service Track quality Track work Trigger Delivery Update configuration s Pull changes Continuous Delivery Change Management Change Management OSLC OSLC Requirement Management Requirement Management Trigger tests Service Simulation & Testing Service Simulation & Testing OSLC Configure endpoints Start stubs Application Monitoring Application Monitoring OSLC Monitor application Configure agents Link defect Track incident Incident Management Incident Management OSLC Deployment Design Deployment Design OSLC Generate automation
  34. 34. © 2012 IBM Corporation Enabling Product and Service Innovation | Rational Links  Jazz.Net  6 Ways for Enterprises to Adopt DevOps blog – http://ibm.co/xq71xY  Understanding and Adopting DevOps (Series on my Blog) – http://bit.ly/MyDevOps  Blog da Rational Brasil – O Mundo depende de software – https://www.ibm.com/developerworks/mydeveloperworks/blogs/rationalbrasil/  Dorothy Graham Independent Test Consultant - www.DorothyGraham.co.uk Felipe Freire (@pfelipebr) pfreire@br.ibm.com

×