~/talk

Web testing for Ninjas with Splinter

Talkat PyCon Australia 2013 · 2013-07-05..07-07· [testing, web-platform]
links:none on file
slides:none on file

Splinter is a Python DSL that wraps Selenium, PhantomJS and Zope Test Browser and pip install splinter gets you a browser object that can visit pages, click links, fill forms (forms.fill accepts a dict), type slowly to trigger AJAX, switch iframes, and run against remote Selenium via Sauce Labs for parallel IE/Windows runs. Tests wait for elements, can eval JS, but file uploads don’t work over remote agents and screenshots live in Selenium not Splinter. Pro tips: avoid XPath/CSS and assert user-facing text, IDs or names.

AI-written summary · about

  1. 0:00Intro
  2. 2:21Ruby 3s Testing. There's a Ruby tool called Capybara. Python has a similar tool, called Splinter.
  3. 4:06Abstractions aren't evil Abstractions enhance understanding. Abstractions are a thinking tool. Even 'leaky'abstractions are useful if you know where the leaks are.
  4. 4:56Acceptance tests operate your app just like a user does. This makes acceptance testing as important for delivery as unit testing is for development.
  5. 6:49Installing Splinter Requires Python 2.5 - 2.7 $ sudo pip install splinter
  6. 9:49Demo Basic Setup & Operation
  7. 13:13Splinter interprets a webpage holistically. Relative structure and assumed uniqueness prevents your tests from adapting to change
  8. 20:57Specifying Browser Using alternative browsers is a simple matter of installing any dependencies and specifying it
  9. 21:10Firefox Splinter The Default, firefox support includes extentions pip install selenium
  10. 22:14Selenium can connect to a remote server, giving you access to multiple platforms & instances
  11. 25:01Greatest Test Maintainability is achieved through isolation and generality. Your tests should be treated like code.
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.