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.

Selenium Workshop

5,173 views

Published on

Nessa apresentação abordamos a importância da automação de testes nos projetos de software, as melhores práticas de automação, as fases de testes e adicionamos exercícios 'mão na massa' no Selenium.

Selenium é uma ferramenta de automação de testes funcionais criada originalmente pela ThoughtWorks, e é hoje, uma das ferramentas de automação mais utilizadas no mundo.

Published in: Technology
  • I think you need a perfect and 100% unique academic essays papers have a look once this site i hope you will get valuable papers, ⇒ www.HelpWriting.net ⇐
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download Full EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download Full doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THIS can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THIS is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THIS Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THIS the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THIS Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download Full EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download Full doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THIS can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THIS is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THIS Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THIS the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THIS Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download Full EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download Full doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THIS can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THIS is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THIS Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THIS the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THIS Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (Unlimited) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://soo.gd/qURD } ......................................................................................................................... Download Full EPUB Ebook here { https://soo.gd/qURD } ......................................................................................................................... Download Full doc Ebook here { https://soo.gd/qURD } ......................................................................................................................... Download PDF EBOOK here { https://soo.gd/qURD } ......................................................................................................................... Download EPUB Ebook here { https://soo.gd/qURD } ......................................................................................................................... Download doc Ebook here { https://soo.gd/qURD } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THIS can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THIS is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THIS Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THIS the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THIS Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

Selenium Workshop

  1. 1. SELENIUM WORKSHOP ThoughtWorks Brasil Belo Horizonte - MG 1
  2. 2. AGENDA ! ! ▫︎Por que automação de testes? ▫︎Introdução ao Selenium ▫︎Entendendo o Selenium ▫︎Exercícios "mão na massa" 2
  3. 3. VANTAGENS DOS TESTES AUTOMATIZADOS ! ▫︎Evitar trabalho repetitivo ! ▫︎Geralmente mais rápido que teste manual ! ▫︎Feedback constante da aplicação ! ▫︎Simular a interação de um usuário real do sistema 3
  4. 4. VANTAGENS DOS TESTES AUTOMATIZADOS ▫︎Não é diretamente acoplada à implementação do código ! ▫︎Auxilia a encontrar bugs e erros de regressão ! ▫︎Fácil de ser implementado em diferentes plataformas e navegadores ! ▫︎Podemos encontrar inclusive problemas de hardware (memória e recursos) através da automação 4
  5. 5. DESVANTAGENS DOS TESTES AUTOMATIZADOS ! ▫︎Manutenção ! ▫︎Velocidade pode ser afetada ! ▫︎Fragilidade (depende de elementos da UI) ! ▫︎Vulnerabilidade - Os testes podem ficar instáveis se, por exemplo, algum componente em Javascript demorar para carregar. 5
  6. 6. NÃO!! 6 DEVO AUTOMATIZAR TUDO?
  7. 7. NÃO AUTOMATIZAR QUANDO: ! ▫︎Haverá mudanças consideráveis na interface do usuário em um futuro bem próximo ! ▫︎Muito pouco tempo para testar ! ▫︎Não é uma ação muito comum e previsível de ser realizada por um usuário real ! ▫︎Cenários extremamente complexos 7
  8. 8. QUADRANTES DO AGILE TESTING 8 Adaptada de: http://lisacrispin.com/2011/11/08/using-the-agile-testing-quadrants
  9. 9. PIRÂMIDE DE TESTE DE SOFTWARE 9 Adaptada de: http://watirmelon.com/2012/01/31/introducing-the-software-testing-ice-cream-cone
  10. 10. PIRÂMIDE INVERTIDA (SORVETE) DE TESTE DE SOFTWARE 10 Adaptado de: http://watirmelon.com/2012/01/31/introducing-the-software-testing-ice-cream-cone
  11. 11. INTRODUÇÃO AO SELENIUM ! ▫︎Iniciada em 2004 por um ThoughtWorker chamado Jason Huggins ! ▫︎Algum tempo depois, Simon Stewart do Google iniciou um projeto chamado WebDriver ! ▫︎Ambos projetos se uniram, dando origem ao Selenium- WebDriver (Selenium 2.0) 11
  12. 12. POR QUE SELENIUM? ! ▫︎Suporta várias linguagens: Java, Ruby, Python, JavaScript, etc… ! ▫︎Suporta vários browsers: Chrome, Firefox, Safari, IE, Opera, Headless, Android, iOS etc… ! ▫︎É open-source! 12
  13. 13. ALGUMAS OUTRAS VARIAÇÕES... ! ! ▫︎Selenium IDE: ferramenta record & playback apenas para testes simples/básicos. Não recomendado para automação séria! :) ! ▫︎Selenium-Grid: Útil para executar testes em paralelo em múltiplas máquinas remotas. 13
  14. 14. O QUE É DOM (DOCUMENT OBJECT MODEL) ? 14 ANTES DE COMEÇARMOS…
  15. 15. DOM - DATA OBJECT MODEL 15
  16. 16. COMO CAPTURAR ELEMENTOS NO DOM? ! ! ! ▫︎Chrome Dev Tools ! ▫︎Firebug 16
  17. 17. ALGUNS ELEMENTOS COMUNS... 17
  18. 18. ENTENDENDO O SELENIUM 18
  19. 19. ENTENDENDO O SELENIUM 19 Asserções
  20. 20. MÃO NA MASSA! 20
  21. 21. ATIVIDADES ! ▫︎Instalação e configuração (Eclipse + Selenium-WebDriver + JUnit + Hamcrest) ▫︎Automatizando do zero ▫︎https://github.com/ThoughtWorksInc/twseleniumworkshop/blob/master/test/ twseleniumworkshop/Exercicio1.java ▫︎https://github.com/ThoughtWorksInc/twseleniumworkshop/blob/master/test/ twseleniumworkshop/Exercicio2.java ▫︎https://github.com/ThoughtWorksInc/twseleniumworkshop/blob/master/test/ twseleniumworkshop/Exercicio3.java ▫︎https://github.com/ThoughtWorksInc/twseleniumworkshop/blob/master/test/ twseleniumworkshop/Exercicio4.java ▫︎https://github.com/ThoughtWorksInc/twseleniumworkshop/tree/master/test/ twseleniumworkshop/PageObject 21
  22. 22. PRÓXIMOS PASSOS ! ▫︎Page Object Design Pattern ! ▫︎Headless browser ! ▫︎Cucumber/BDD ! ▫︎Mobile (Android) 22
  23. 23. LIVROS/MATERIAIS RECOMENDADOS ! ▫︎Selenium: ▫︎Selenium API ▫︎Selenium WebDriver Practical Guide ▫︎Selenium Simplified ! ▫︎Teste de Software e outras ferramentas: ▫︎Agile Testing: A Practical Guide for Testers and Agile Teams ▫︎The Cucumber Book 23
  24. 24. 24 É isso aí, galera! Obrigado!!

×