mozilla web qa - evolution of our python webdriver framework

10
Mozilla Web QA Evolution of our Python WebDriver framework @davehunt82 - http://blargon7.com

Upload: davehunt82

Post on 14-Apr-2017

476 views

Category:

Software


2 download

TRANSCRIPT

Page 1: Mozilla Web QA - Evolution of our Python WebDriver framework

Mozilla Web QAEvolution of our PythonWebDriver framework

@davehunt82 - http://blargon7.com

Page 2: Mozilla Web QA - Evolution of our Python WebDriver framework

The TeamUnlike Honey Badgers, we do care!

by BellaEatsBooks on Flickr

Page 3: Mozilla Web QA - Evolution of our Python WebDriver framework

Foundations

Selenium Python pytest

Page 4: Mozilla Web QA - Evolution of our Python WebDriver framework

pytest-mozwebqaThe 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”

Page 5: Mozilla Web QA - Evolution of our Python WebDriver framework

Evolutionpytest-variables

Simple variable injection for tests

pytest-htmlHTML report for tests

pytest-seleniumBrowser automation for tests

Page 6: Mozilla Web QA - Evolution of our Python WebDriver framework

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

Page 7: Mozilla Web QA - Evolution of our Python WebDriver framework

pytest-htmlhttps://pypi.python.org/pypi/pytest-html

from http://qutebrowser.org:8010/waterfall

from http://qutebrowser.org:8010/waterfall

Page 8: Mozilla Web QA - Evolution of our Python WebDriver framework

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

Page 9: Mozilla Web QA - Evolution of our Python WebDriver framework

Demo...all the things!

Page 10: Mozilla Web QA - Evolution of our Python WebDriver framework

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 - [email protected]