Your SlideShare is downloading. ×
Jasmine presentation Selenium Camp 2013
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Jasmine presentation Selenium Camp 2013

1,989
views

Published on

Presentation given by Dima Kovalenko at Jasmine Camp 2013

Presentation given by Dima Kovalenko at Jasmine Camp 2013

Published in: Technology

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,989
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
19
Comments
0
Likes
1
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Francois Reynoud Selenium Grid
  • 2. Less Selenium, more unit testing (With Jasmine) Dima Kovalenko @dimacus
  • 3. What do you use for “in browser” testing?
  • 4. Selenium has some issues 
  • 5. Selenium Issues• Reliability / Stability
  • 6. Stability
  • 7. Selenium Stability Last 2 months
  • 8. Selenium Stability Last 12 months
  • 9. Selenium Issues• Reliability / Stability• Speed
  • 10. Build Time – 400 Selenium on 3 machines 6 parallel cores
  • 11. Typical Selenium Flow
  • 12. Typical Selenium Flow
  • 13. Typical Selenium Flow
  • 14. Typical Selenium Flow
  • 15. Source: GIS
  • 16. Why so slow?• Browser speed• JS speed• Machine speed• External URLs
  • 17. Selenium Issues• Reliability / Stability• Speed• Internet Explorer / Browser Compatibility
  • 18. Internet Explorer Source: GIS
  • 19. Don’t use Selenium to test JavaScript! Use it to test application flow instead.
  • 20. http://pivotal.github.com/jasmine/
  • 21. Jasmine• Reliability / Stability
  • 22. Jasmine• Reliability / Stability• Browser Compatibility
  • 23. Jasmine• Reliability / Stability• Browser Compatibility• Speed
  • 24. Build Time (3,500+ tests)
  • 25. Jasmine is a BDD tool(Behavior Driven Development)
  • 26. What is BDDIn software engineering, behavior-driven development (abbreviated BDD) is asoftware development process based on test-driven development (TDD).[1][2]Behavior-driven development combines the general techniques and principlesof TDD with ideas from domain-driven design and object-oriented analysis anddesign to provide software developers and business analysts with shared tools and a shared process to collaborate on software development. Source: Wikipedia
  • 27. BDD In the NutshellWrite tests that describe application flow.
  • 28. What BDD looks like“Purchase flow should accept VISA”
  • 29. Jasmine Test Sample
  • 30. It’s Just Functions!• “describe” “context” “it”…• Can use any JS code to make a test work
  • 31. Jasmine Features• Mocks / Spies• Fixtures• Matchers• Setup / Teardown• Asynchronous Support and Callbacks
  • 32. Mocks / Spies• Double any function• Monitors the calls the function• Monitors the arguments passed in• Can create a “bare” spy• Mock the Clock
  • 33. Fixtures• Adding elements to page on the fly
  • 34. Matchers• expect()• toEqual()• not()• toBeFalsy()• toThrow()• Custom matchers
  • 35. Setup / Teardown• beforeEach()• afterEach()
  • 36. Asynch support• Using spies to verify Callbacks• runs()• waitsFor()
  • 37. What it is written in• HTML• JavaScript• Ruby – Rake – ERB – Rspec
  • 38. Workflow in Ruby• Rake• ERB (Generate HTML)• Selenium• Tests in Loaded JS• Rspec
  • 39. Environments supported• Ruby• Rails• Spider Monkey• Node• Scala• Java• Django• .Net• Perl• HTML
  • 40. Installation• gem install jasmine• jasmine init
  • 41. Questions?

×