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.

Mozilla Web QA - Evolution of our Python WebDriver framework

754 views

Published on

In 2011 Mozilla developed and released a pytest plugin that simplified the task of maintaining functional UI tests for over a dozen web applications. It has served us well, but its uses outside of Mozilla are limited - unless you happen to have exactly the same requirements as us. To address this, the plugin has been shattered into three: pytest-selenium provides a Selenium instance and browser (with some nice new features); pytest-html provides a handy HTML report; and pytest-variables provides a useful way to inject variables into your tests.

Published in: Software
  • Be the first to comment

Mozilla Web QA - Evolution of our Python WebDriver framework

  1. 1. Mozilla Web QA Evolution of our Python WebDriver framework @davehunt82 - http://blargon7.com
  2. 2. The TeamUnlike Honey Badgers, we do care! by BellaEatsBooks on Flickr
  3. 3. Foundations Selenium Python pytest
  4. 4. pytest-mozwebqa The clue is in the name... ✓ share common code ✓ transition to WebDriver ✓ custom HTML reports ✓ sauce labs integration ✓ credentials injection ๏ bespoke to Mozilla’s needs ๏ solves too many problems ๏ slow release process ๏ inadequate documentation ๏ incompatible with “live servers”
  5. 5. Evolution pytest-variables Simple variable injection for tests pytest-html HTML report for tests pytest-selenium Browser automation for tests
  6. 6. pytest-variableshttps://pypi.python.org/pypi/pytest-variables { "foo": "bar", "bar": "foo" } def test_foo(variables): assert variables['foo'] == 'bar' assert variables.get('bar') == 'foo' assert variables.get('missing') is None
  7. 7. pytest-htmlhttps://pypi.python.org/pypi/pytest-html from http://qutebrowser.org:8010/waterfall from http://qutebrowser.org:8010/waterfall
  8. 8. pytest-seleniumhttps://pypi.python.org/pypi/pytest-selenium ✓ no longer supports legacy Selenium RC ✓ uses pytest fixtures for support of live servers ✓ augments pytest-html report ✓ documentation! Sauce Labs BrowserStack TestingBot
  9. 9. Demo ...all the things!
  10. 10. Resources • pytest-variables - https://pypi.python.org/pypi/pytest-variables • pytest-html - https://pypi.python.org/pypi/pytest-html • pytest-selenium - https://pypi.python.org/pypi/pytest-selenium • examples - https://github.com/mozilla/mozwebqa-examples • team - https://quality.mozilla.org/teams/web-qa • email - mozwebqa@mozilla.org

×