Web testing for Ninjas with Splinter
summary
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
chapters (11)
- 0:00Intro
- 2:21Ruby 3s Testing. There's a Ruby tool called Capybara. Python has a similar tool, called Splinter.
- 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:56Acceptance tests operate your app just like a user does. This makes acceptance testing as important for delivery as unit testing is for development.
- 6:49Installing Splinter Requires Python 2.5 - 2.7 $ sudo pip install splinter
- 9:49Demo Basic Setup & Operation
- 13:13Splinter interprets a webpage holistically. Relative structure and assumed uniqueness prevents your tests from adapting to change
- 20:57Specifying Browser Using alternative browsers is a simple matter of installing any dependencies and specifying it
- 21:10Firefox Splinter The Default, firefox support includes extentions pip install selenium
- 22:14Selenium can connect to a remote server, giving you access to multiple platforms & instances
- 25:01Greatest Test Maintainability is achieved through isolation and generality. Your tests should be treated like code.
related talks
30mFront-end integration testing with splinter
24mAutomated Regression Testing with Splinter and Jupyter
31mSelenium Hacks
39mTesting web apps with Selenium
41mMake yourself comfortable and leverage Selenium with Python
15mBrowser automation/testing with BiDi and minimal dependencies
32mAll about web application testing
21mThe Web has evolved. Has your testing evolved too?
