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.

Javascript testing IAD2010

1.350 visualizações

Publicada em

Italian Agile Day 2010 Presentation about Javascript testing

Publicada em: Tecnologia
  • D0WNL0AD FULL ▶ ▶ ▶ ▶ http://1lite.top/7CFRC ◀ ◀ ◀ ◀
    Tem certeza que deseja  Sim  Não
    Insira sua mensagem aqui
  • Get Now to Read eBook === http://bestadaododadj.justdied.com/8426348645-el-grito-de-la-grulla-ala-delta-serie-verde.html
    Tem certeza que deseja  Sim  Não
    Insira sua mensagem aqui

Javascript testing IAD2010

  1. 1. The secret art of Agile Javascripting Luca Grulla Italian Agile Day, Genova, 19/11/10
  2. 2. Our background Large public facing websites Significant javascript codebase with complex DOM interaction Heavy use of Ajax Large amount of business logic Long life expectancy
  3. 3. Disclaimer This presentation is technology agnostic Each tool used is replaceable It is not about how to use jQuery
  4. 4. Technology Stack • JQuery • JSTestDriver • Ewloe • JavascriptLint
  5. 5. It used to be so simple…
  6. 6. Rich clients
  7. 7. We want unit tests
  8. 8. Scenario Login form Need to validate user credentials Need to execute a server call via ajax POST Based on the result we need to show a welcome or an error message
  9. 9. So what is wrong with this code ?
  10. 10. We want to test it!
  11. 11. Domain abstraction
  12. 12. Abstraction around integration points
  13. 13. HTTP DOM Presentation Logic Business Logic
  14. 14. Our approach Javascript is a first class language create abstractions: business logic presentation logic integrations …but not limited to a specific pattern !! Keep your presentation logic class as skinny as possible in order to express intents Favour interaction tests over integration tests
  15. 15. Tools Considerations ….whatever you like but has to be pluggable in your Continuous Integration !!
  16. 16. Questions ?
  17. 17. Thank You ! Luca Grulla luca.grulla@thoughtworks.com http://www.lucagrulla.it/blog http://www.github.com/lucagrulla
  18. 18. References Ewloe http://github.com/gurrie/ewloe