O slideshow foi denunciado.
Utilizamos seu perfil e dados de atividades no LinkedIn para personalizar e exibir anúncios mais relevantes. Altere suas preferências de anúncios quando desejar.

Geb+spock: let your functional tests live long and prosper

1.018 visualizações

Publicada em

Functional testing, as any other testing, is important to ensure the health of our apps. However, functional tests are often tricky, too susceptible to change, and their maintenance ends up being a nightmare. Are we hopeless then? Not at all! Luckily, there are tools to ease this task like Geb and Spock, which help us to create well structured, comprehensive, and easy to maintain tests. In this talk we will review these tools, showing different options for creating the tests.

Publicada em: Software
  • Seja o primeiro a comentar

Geb+spock: let your functional tests live long and prosper

  1. 1. Geb+Spock: let your functional tests live long and prosper Esther Lozano @esloho
  2. 2. Hello! I’m Esther 2009 2015 @esloho esloho@gmail.com https://github.com/esloho
  3. 3. Functional tests
  4. 4. Spock Testing and specification framework for Java and Groovy applications Open source (Apache License 2.0) Beautiful and highly expressive tests Given-When-Then structure JUnit integration (via Sputnik runner)
  5. 5. Geb Groovy developer tool for browser automation (on top of WebDriver) Open source (Apache License 2.0) jQuery-ish navigation API Page Object Pattern Optimized for Spock but works with JUnit, TestNG and Cucumber-JVM
  6. 6. Page Object Models and encapsulates web content Popularized by WebDriver Reduces amount of duplicated code Improves reusability and maintainability First class support in Geb via Page and Module constructs
  7. 7. Demo time!
  8. 8. And more! JavaScript interface (js object to access methods and global variables) JQuery adapter gives you the jQuery object (useful for simulating events) Interaction DSL (on top of WebDriver’s Actions) Remote browser (since it’s supported by Selenium)
  9. 9. References Official Spock documentation http://spockframework.github.io/spock/docs/1.0/ Official Geb documentation (awesome!) http://www.gebish.org/manual/current/ Taming Functional Web Testing https://www.youtube.com/watch?v=SNMgf6ndoeU Tutorial (in spanish) http://www.adictosaltrabajo.com/tutoriales/tests-funcionales-con- spock-y-geb-para-una-aplicacion-spring-boot/ Demo code https://github.com/esloho/functional-testing-with-spock
  10. 10. @esloho esloho@gmail.com https://github.com/esloho Questions?

×