• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Jasmine presentation Selenium Camp 2013
 

Jasmine presentation Selenium Camp 2013

on

  • 1,930 views

Presentation given by Dima Kovalenko at Jasmine Camp 2013

Presentation given by Dima Kovalenko at Jasmine Camp 2013

Statistics

Views

Total Views
1,930
Views on SlideShare
1,428
Embed Views
502

Actions

Likes
1
Downloads
12
Comments
0

1 Embed 502

http://seleniumcamp.com 502

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

CC Attribution License

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Jasmine presentation Selenium Camp 2013 Jasmine presentation Selenium Camp 2013 Presentation Transcript

    • Francois Reynoud Selenium Grid
    • Less Selenium, more unit testing (With Jasmine) Dima Kovalenko @dimacus
    • What do you use for “in browser” testing?
    • Selenium has some issues 
    • Selenium Issues• Reliability / Stability
    • Stability
    • Selenium Stability Last 2 months
    • Selenium Stability Last 12 months
    • Selenium Issues• Reliability / Stability• Speed
    • Build Time – 400 Selenium on 3 machines 6 parallel cores
    • Typical Selenium Flow
    • Typical Selenium Flow
    • Typical Selenium Flow
    • Typical Selenium Flow
    • Source: GIS
    • Why so slow?• Browser speed• JS speed• Machine speed• External URLs
    • Selenium Issues• Reliability / Stability• Speed• Internet Explorer / Browser Compatibility
    • Internet Explorer Source: GIS
    • Don’t use Selenium to test JavaScript! Use it to test application flow instead.
    • http://pivotal.github.com/jasmine/
    • Jasmine• Reliability / Stability
    • Jasmine• Reliability / Stability• Browser Compatibility
    • Jasmine• Reliability / Stability• Browser Compatibility• Speed
    • Build Time (3,500+ tests)
    • Jasmine is a BDD tool(Behavior Driven Development)
    • 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
    • BDD In the NutshellWrite tests that describe application flow.
    • What BDD looks like“Purchase flow should accept VISA”
    • Jasmine Test Sample
    • It’s Just Functions!• “describe” “context” “it”…• Can use any JS code to make a test work
    • Jasmine Features• Mocks / Spies• Fixtures• Matchers• Setup / Teardown• Asynchronous Support and Callbacks
    • Mocks / Spies• Double any function• Monitors the calls the function• Monitors the arguments passed in• Can create a “bare” spy• Mock the Clock
    • Fixtures• Adding elements to page on the fly
    • Matchers• expect()• toEqual()• not()• toBeFalsy()• toThrow()• Custom matchers
    • Setup / Teardown• beforeEach()• afterEach()
    • Asynch support• Using spies to verify Callbacks• runs()• waitsFor()
    • What it is written in• HTML• JavaScript• Ruby – Rake – ERB – Rspec
    • Workflow in Ruby• Rake• ERB (Generate HTML)• Selenium• Tests in Loaded JS• Rspec
    • Environments supported• Ruby• Rails• Spider Monkey• Node• Scala• Java• Django• .Net• Perl• HTML
    • Installation• gem install jasmine• jasmine init
    • Questions?