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.

Js Test Driver, JsHamcrest, JsMockito

2,323 views

Published on

This presenation (with some lines in Swedish) was used at JavaForum 2011 October. I presented Js Test Driver, JsHamcrest and JsMockito and how to

Published in: Technology, Business
  • Be the first to comment

Js Test Driver, JsHamcrest, JsMockito

  1. 1. JS Test Driver JsHamcrest JsMockito
  2. 2. https://github.com/FredrikWendt/JsTestDriverPlayground
  3. 3. JS Test Driver Apache Software License 2.0 googlecode svn :-(
  4. 4. JsTestDriver <ul>easily integrates with continuous builds systems and allows running tests on multiple browsers quickly to ease TDD style development </ul>
  5. 5. JS Test Driver
  6. 6. JS Test Driver
  7. 7. JS Test Driver
  8. 8. JS Test Driver
  9. 9. JS Test Driver
  10. 10. Demo 1 - CLI <ul><li>kör sample-app – egen server, egen browser
  11. 11. cd exempel – kör test, fallerar ev visa pom
  12. 12. starta server i terminal – kör test, fallerar
  13. 13. starta Chrome, /capture – kör test, fallerar OK
  14. 14. Inte stabilt när en browser försvinner – iofs OK? </li></ul>
  15. 15. Demo 1 - CLI <ul><li>Parallell exekvering i alla webbläsare
  16. 16. Går att integrera i CI
  17. 17. Kan köras lokalt vid behov (felsökning, debug) </li></ul>
  18. 18. Demo 2 - IDE <ul><li>Plugin till Eclipse
  19. 19. Copyright Google
  20. 20. Apache Software Licence 2.0
  21. 21. Show view, starta server, starta webbläsare
  22. 22. Greeter
  23. 23. Basic 1, 2, 3, 4 </li></ul>
  24. 24. Demo 2 - IDE <ul><li>Skakigt vid syntax-fel – använd jslint4java
  25. 25. Använd version 1.1.1.e under Uncategorized
  26. 26. Nyare versions config-fil stödjer load och test – pluginen gör det INTE! </li></ul>
  27. 27. JsHamcrest <ul><li>BSD-licens
  28. 28. Gör kod läsligare:
  29. 29. assertThat (someThing, 'someValue' ); assertThat (someThing, someTest ());
  30. 30. Basic 5 </li></ul>
  31. 31. JsMockito <ul><li>MIT-licens
  32. 32. aims to try and reproduce the clean & simple API, with a JavaScript twist
  33. 33. Mockning av object/klasser och funktioner
  34. 34. Spionage!
  35. 35. mock , mockFunction
  36. 36. when , thenThrow , spy , verifyZeroInteractions </li></ul>
  37. 37. This work by Fredrik Wendt is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License http://creativecommons.org/licenses/by-nc-sa/3.0/

×