pytest splinter and selenium integration for anyone interested in browser interaction in tests

Overview

Splinter plugin for the pytest runner

Join the chat at https://gitter.im/pytest-dev/pytest-splinter https://travis-ci.org/pytest-dev/pytest-splinter.svg?branch=master Documentation Status

Install pytest-splinter

pip install pytest-splinter

Features

The plugin provides a set of fixtures to use splinter for browser testing with pytest

Fixtures

  • browser
    Get the splinter's Browser. Fixture is underneath session scoped, so browser process is started once per test session, but the state of the browser will be clean (current page is blank, cookies clean).
  • session_browser
    The same as browser except the lifetime. This fixture is session-scoped so will only be finalized at the end of the whole test session. Useful if you want to speedup your test suite paying with reduced test isolation.
  • browser_instance_getter
    Function to create an instance of the browser. This fixture is required only if you need to have multiple instances of the Browser in a single test at the same time. Example of usage:
@pytest.fixture
def admin_browser(request, browser_instance_getter):
    """Admin browser fixture."""
    # browser_instance_getter function receives parent fixture -- our admin_browser
    return browser_instance_getter(request, admin_browser)

def test_2_browsers(browser, admin_browser):
    """Test using 2 browsers at the same time."""
    browser.visit('http://google.com')
    admin_browser.visit('http://admin.example.com')
  • splinter_selenium_implicit_wait
    Implicit wait timeout to be passed to Selenium webdriver. Fixture gets the value from the command-line option splinter-implicit-wait (see below)
  • splinter_wait_time
    Explicit wait timeout (for waiting for explicit condition via wait_for_condition). Fixture gets the value from the command-line option splinter-wait-time (see below)
  • splinter_selenium_speed
    Speed for Selenium, if not 0 then it will sleep between each selenium command. Useful for debugging/demonstration. Fixture gets the value from the command-line option splinter-speed (see below)
  • splinter_selenium_socket_timeout
    Socket timeout for communication between the webdriver and the browser. Fixture gets the value from the command-line option splinter-socket-timeout (see below)
  • splinter_webdriver
    Splinter's webdriver name to use. Fixture gets the value from the command-line option splinter-webdriver (see below). To make pytest-splinter always use certain webdriver, override a fixture in your conftest.py file:
import pytest

@pytest.fixture(scope='session')
def splinter_webdriver():
    """Override splinter webdriver name."""
    return 'chrome'
  • splinter_remote_url
    Splinter's webdriver remote url to use (optional). Fixture gets the value from the command-line option splinter-remote-url (see below). Will be used only if selected webdriver name is 'remote'.
  • splinter_session_scoped_browser
    pytest-splinter should use single browser instance per test session. Fixture gets the value from the command-line option splinter-session-scoped-browser (see below)
  • splinter_file_download_dir
    Directory, to which browser will automatically download the files it will experience during browsing. For example when you click on some download link. By default it's a temporary directory. Automatic downloading of files is only supported for firefox driver at the moment.
  • splinter_download_file_types
    Comma-separated list of content types to automatically download. By default it's the all known system mime types (via mimetypes standard library).
  • splinter_browser_load_condition
    Browser load condition, python function which should return True. If function returns False, it will be run several times, until timeout below reached.
  • splinter_browser_load_timeout
    Browser load condition timeout in seconds, after this timeout the exception WaitUntilTimeout will be raised.
  • splinter_wait_time
    Browser explicit wait timeout in seconds, after this timeout the exception WaitUntilTimeout will be raised.
  • splinter_firefox_profile_preferences
    Firefox profile preferences, a dictionary which is passed to selenium webdriver's profile_preferences
  • splinter_firefox_profile_directory
    Firefox profile directory to use as template for firefox profile created by selenium. By default, it's an empty directly inside pytest_splinter/profiles/firefox
  • splinter_driver_kwargs
    Webdriver keyword arguments, a dictionary which is passed to selenium webdriver's constructor (after applying firefox preferences)
import pytest
from pathlib import Path

@pytest.fixture
def splinter_driver_kwargs():
    """
    Webdriver kwargs for Firefox.
    https://selenium-python.readthedocs.io/api.html#module-selenium.webdriver.firefox.webdriver
    """
    return {"service_log_path": Path("/log/directory/geckodriver.log")}
  • splinter_window_size
    Size of the browser window on browser initialization. Tuple in form (<width>, <height>). Default is (1366, 768)
  • splinter_screenshot_dir
    pytest-splinter browser screenshot directory. This fixture gets the value from the command-line option splinter-screenshot-dir (see below).
  • splinter_make_screenshot_on_failure
    Should pytest-splinter take browser screenshots on test failure? This fixture gets the value from the command-line option splinter-make-screenshot-on-failure (see below).
  • splinter_screenshot_encoding
    Encoding of the html screenshot on test failure. UTF-8 by default.
  • splinter_screenshot_getter_html
    Function to get browser html screenshot. By default, it saves browser.html with given path and splinter_screenshot_encoding encoding.
  • splinter_screenshot_getter_png
    Function to get browser image (png) screenshot. By default, it calls browser.save_sceenshot with given path.
  • splinter_driver_executable
    Filesystem path of the webdriver executable. This fixture gets the value from the command-line option splinter-webdriver-executable (see below).
  • splinter_browser_class
    Class to use for browser instance. Defaults to pytest_splinter.plugin.Browser.
  • splinter_clean_cookies_urls
    List of additional urls to clean cookies on. By default, during the preparation of the browser for the test, pytest-splinter only cleans cookies for the last visited url from previous test, as it's not possible to clean all cookies from all domains at once via webdriver protocol, by design. This limitation can be worked around if you know the list of urls, the domains for which you need to clean cookies (for example https://facebook.com). If so, you can override this fixture and put those urls there, and pytest-splinter will visit each of them and will clean the cookies for each domain.
  • splinter_headless
    Run Chrome in headless mode. Defaults to false. http://splinter.readthedocs.io/en/latest/drivers/chrome.html#using-headless-option-for-chrome

Command-line options

  • --splinter-implicit-wait

    Selenium webdriver implicit wait. Seconds (default: 5).

  • --splinter-speed

    selenium webdriver speed (from command to command). Seconds (default: 0).

  • --splinter-socket-timeout

    Selenium webdriver socket timeout for for communication between the webdriver and the browser. Seconds (default: 120).

  • --splinter-webdriver

    Webdriver name to use. (default: firefox). Options:

    • firefox
    • remote
    • chrome

    For more details refer to the documentation for splinter and selenium.

  • --splinter-remote-url

    Webdriver remote url to use. (default: None). Will be used only if selected webdriver name is 'remote'.

    For more details refer to the documentation for splinter and selenium.

  • --splinter-session-scoped-browser

    pytest-splinter should use a single browser instance per test session. Choices are 'true' or 'false' (default: 'true').

  • --splinter-make-screenshot-on-failure

    pytest-splinter should take browser screenshots on test failure. Choices are 'true' or 'false' (default: 'true').

  • --splinter-screenshot-dir

    pytest-splinter browser screenshot directory. Defaults to the current directory.

  • --splinter-webdriver-executable

    Filesystem path of the webdriver executable. Used by chrome driver. Defaults to the None in which case the shell PATH variable setting determines the location of the executable.

  • --splinter-headless

    Override splinter_headless fixture. Choices are 'true' or 'false', default: 'true'. http://splinter.readthedocs.io/en/latest/drivers/chrome.html#using-headless-option-for-chrome https://splinter.readthedocs.io/en/latest/drivers/firefox.html#using-headless-option-for-firefox

Browser fixture

As mentioned above, browser is a fixture made by creating splinter's Browser object, but with some overrides.

  • visit
    Added possibility to wait for condition on each browser visit by having a fixture.
  • wait_for_condition
    Method copying selenium's wait_for_condition, with difference that condition is in python, so there you can do whatever you want, and not only execute javascript via browser.evaluate_script.

Automatic screenshots on test failure

When your functional test fails, it's important to know the reason. This becomes hard when tests are being run on the continuous integration server, where you cannot debug (using --pdb). To simplify things, a special behaviour of the browser fixture is available, which takes a screenshot on test failure and puts it in a folder with the a naming convention compatible to the jenkins plugin. The html content of the browser page is also stored, this can be useful for debugging the html source.

Creating screenshots is fully compatible with pytest-xdist plugin and will transfer the screenshots from the worker nodes through the communication channel automatically.

If a test (using the browser fixture) fails, you should get a screenshot files in the following path:

<splinter-screenshot-dir>/my.dotted.name.test.package/test_name-browser.png
<splinter-screenshot-dir>/my.dotted.name.test.package/test_name-browser.html

The splinter-screenshot-dir for storing the screenshot is generated by a fixture and can be provided through a command line argument, as described above at the configuration options section.

Taking screenshots on test failure is enabled by default. It can be controlled through the splinter_make_screenshot_on_failure fixture, where return False skips it. You can also disable it via a command line argument:

pytest tests/functional --splinter-make-screenshot-on-failure=false

In case taking a screenshot fails, a pytest warning will be issued, which can be viewed using the -rw argument for pytest.

Python3 support

Python3 is supported, check if you have recent version of splinter as it was added recently.

Example

test_your_test.py:

def test_some_browser_stuff(browser):
    """Test using real browser."""
    url = "http://www.google.com"
    browser.visit(url)
    browser.fill('q', 'splinter - python acceptance testing for web applications')
    # Find and click the 'search' button
    button = browser.find_by_name('btnK')
    # Interact with elements
    button.click()
    assert browser.is_text_present('splinter.cobrateam.info'), "splinter.cobrateam.info wasn't found... We need to"
    ' improve our SEO techniques'

Contact

If you have questions, bug reports, suggestions, etc. please create an issue on the GitHub project page.

License

This software is licensed under the MIT license

See License file

© 2014 Anatoly Bubenkov, Paylogic International and others.

Comments
  • Driver remote and browser name capability by command line

    Driver remote and browser name capability by command line

    Hi,

    is there a way for specify by command line the capabilities (eg: browser name) for remote drivers?

    I've seen that pytest-selenium let you choose specific capabilities:

    • http://pytest-selenium.readthedocs.io/en/latest/user_guide.html#selenium-server-grid

    It would be cool having a similar feature because you don't hardcode anything in your code but I was not able to find anything of similar in pytest-splinter, could you suggest what is the best approach please?

    opened by davidemoro 13
  • browser.status_code not available

    browser.status_code not available

    I tried to access "status_code" from the browser fixture but it appears to be missing?

    print browser.status_code   # get AttributeError
    

    returns

    E       AttributeError: 'WebDriver' object has no attribute 'status_code'
    
    venv/lib/python2.7/site-packages/pytest_splinter/plugin.py:29: AttributeError
    

    http://splinter.cobrateam.info/docs/http-status-code-and-exception.html

    opened by alvinchow86 13
  • improvement: save test failure stack trace side-by-side with screenshot

    improvement: save test failure stack trace side-by-side with screenshot

    even though having screenshots is very handy, not all the time it is enough to let us figure out what caused the issue. in this scenario, having the failure stack trace side-by-side with the screenshot is very helpful. therefore, this ticket suggests the creation of a cd line argument to let us save the test failure as a file which can go side-by-side with the screenshot (e.g. create_item.png , create_item.log) in order to easy the failure analysis.

    enhancement 
    opened by pjotal 12
  • Direct use of 'tmpdir' fixture causes warnings to be raised in latest pytest versions

    Direct use of 'tmpdir' fixture causes warnings to be raised in latest pytest versions

    The following warning message appears after test runs:

    RemovedInPytest4Warning: Fixture "tmpdir" called directly. Fixtures are not meant to be called directly, are created automatically when test functions request them as parameters. See https://docs.pytest.org/en/latest/fixture.html for more information.

    bug 
    opened by jsfehler 11
  • Ghostdriver issue

    Ghostdriver issue

    After upgrading from 1.0.3 -> 1.1.0, I get the following issue, when using PhantomJS:

    mx/webapp/tests/acceptance/test_foo.py:34: 
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
    /home/bhe/.virtualenvs/mx-py34/lib/python3.4/site-packages/pytest_bdd/scenario.py:168: in _execute_scenario
        _execute_step_function(request, feature, step, step_func, example=example)
    /home/bhe/.virtualenvs/mx-py34/lib/python3.4/site-packages/pytest_bdd/scenario.py:123: in _execute_step_function
        step_func(**kwargs)
    /home/bhe/.virtualenvs/mx-py34/lib/python3.4/site-packages/pytest_bdd/steps.py:146: in <lambda>
        step_func = lambda request: request.getfuncargvalue(func.__name__)
    /home/bhe/.virtualenvs/mx-py34/lib/python3.4/site-packages/_pytest/python.py:1337: in getfuncargvalue
        return self._get_active_fixturedef(argname).cached_result[0]
    /home/bhe/.virtualenvs/mx-py34/lib/python3.4/site-packages/_pytest/python.py:1351: in _get_active_fixturedef
        result = self._getfuncargvalue(fixturedef)
    /home/bhe/.virtualenvs/mx-py34/lib/python3.4/site-packages/_pytest/python.py:1403: in _getfuncargvalue
        val = fixturedef.execute(request=subrequest)
    /home/bhe/.virtualenvs/mx-py34/lib/python3.4/site-packages/_pytest/python.py:1820: in execute
        fixturedef = request._get_active_fixturedef(argname)
    /home/bhe/.virtualenvs/mx-py34/lib/python3.4/site-packages/_pytest/python.py:1351: in _get_active_fixturedef
        result = self._getfuncargvalue(fixturedef)
    /home/bhe/.virtualenvs/mx-py34/lib/python3.4/site-packages/_pytest/python.py:1403: in _getfuncargvalue
        val = fixturedef.execute(request=subrequest)
    /home/bhe/.virtualenvs/mx-py34/lib/python3.4/site-packages/_pytest/python.py:1853: in execute
        self.yieldctx)
    /home/bhe/.virtualenvs/mx-py34/lib/python3.4/site-packages/_pytest/python.py:1779: in call_fixture_func
        res = fixturefunc(**kwargs)
    /home/bhe/.virtualenvs/mx-py34/lib/python3.4/site-packages/pytest_splinter/plugin.py:274: in browser
        return browser_instance_getter(browser)
    /home/bhe/.virtualenvs/mx-py34/lib/python3.4/site-packages/pytest_splinter/plugin.py:251: in prepare_browser
        browser = browser_pool[browser_key] = get_browser()
    /home/bhe/.virtualenvs/mx-py34/lib/python3.4/site-packages/pytest_splinter/plugin.py:232: in get_browser
        visit_condition_timeout=splinter_browser_load_timeout, **copy.deepcopy(kwargs)
    /home/bhe/.virtualenvs/mx-py34/lib/python3.4/site-packages/pytest_splinter/plugin.py:27: in __init__
        self.browser = splinter.Browser(*args, **kwargs)
    /home/bhe/.virtualenvs/mx-py34/lib/python3.4/site-packages/splinter/browser.py:53: in Browser
        return driver(*args, **kwargs)
    /home/bhe/.virtualenvs/mx-py34/lib/python3.4/site-packages/splinter/driver/webdriver/phantomjs.py:28: in __init__
        self.driver = PhantomJS(desired_capabilities=capabilities, **kwargs)
    /home/bhe/.virtualenvs/mx-py34/lib/python3.4/site-packages/selenium/webdriver/phantomjs/webdriver.py:50: in __init__
        self.service.start()
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
    
    self = <selenium.webdriver.phantomjs.service.Service object at 0x7f47ab8c5470>
    
        def start(self):
            """
                Starts PhantomJS with GhostDriver.
    
                :Exceptions:
                 - WebDriverException : Raised either when it can't start the service
                   or when it can't connect to the service
                """
            try:
                self.process = subprocess.Popen(self.service_args, stdin=subprocess.PIPE,
                                                close_fds=platform.system() != 'Windows',
                                                stdout=self._log, stderr=self._log)
    
            except Exception as e:
                raise WebDriverException("Unable to start phantomjs with ghostdriver.", e)
            count = 0
            while not utils.is_connectable(self.port):
                count += 1
                time.sleep(1)
                if count == 30:
    >                raise WebDriverException("Can not connect to GhostDriver")
    E                selenium.common.exceptions.WebDriverException: Message: 'Can not connect to GhostDriver'
    
    opened by bh 11
  • browser instance not clean

    browser instance not clean

    I came across an issue I'd hope to get some help to resolve. pytest-splinter 1.6.6.

    When using a the default browser fixture, something is being cached across the tests and browser instance is in fact not clean when the test starts. Particularly, OAuth2 login to an third party site (Facebook, others) made through the browser is still available in the next test and Facebook doesn't present the login page.

    For example, I have two tests (test_presto_login and test_presto_non_evaluated_user) which login to a third party website using a browser. The latter test doesn't log in a different user, but OAuth provider (third party website) somehow remembers the login from the previous test and thus gives wrong authorization.

    The workaround is to create a different browser instance for tests using different OAuth users, but I'd like to track down what is causing this behavior and make sure browser is cleaned up properly.

    Any idea where I should start to poke this and see what's stored inside the browser which is not being cleaned up?

    Below is the sample code:

    def do_presto_login(browser, presto_user=PRESTO_USER_WITH_RECOMMENDATION, presto_password=PRESTO_PASSWORD):
    
        b = browser
    
        assert b.is_text_present("Sign in to your account")
    
        b.fill("user[email]", presto_user)
        b.fill("user[password]", presto_password)
        b.find_by_css("input[name='commit']").click()
    
        # First time login pops up allow permission dialog.
        if b.is_text_present("Authorization required"):
            b.find_by_css("input[name='commit']").click()
    
    def test_presto_login(web_server, browser, DBSession, init):
    
        b = browser
    
        # Initiate Presto login with Authomatic
        b.visit("{}/login".format(web_server))
        b.find_by_css(".btn-login-prestodoctor").click()
    
        do_presto_login_if_needed(b)
    
    def test_presto_non_evaluated_user(web_server, browser, DBSession, init):
    
        b = browser
    
        # Initiate Presto login with Authomatic
        b.visit("{}/login".format(web_server))
        b.find_by_css(".btn-login-prestodoctor").click()
    
        do_presto_login_if_needed(b, presto_user=PRESTO_USER_WITHOUT_RECOMMENDATION)
    

    As a workaround you can create another browser instance for the another OAuth user:

    @pytest.fixture
    def non_evaluated_user_browser(request, browser_instance_getter):
        return browser_instance_getter(request, non_evaluated_user_browser)
    
    def test_presto_non_evaluated_user(web_server, non_evaluated_user_browser, DBSession, init):
    
        b = non_evaluated_user_browser
    
        # Initiate Presto login with Authomatic
        b.visit("{}/login".format(web_server))
        b.find_by_css(".btn-login-prestodoctor").click()
    
        do_presto_login_if_needed(b, presto_user=PRESTO_USER_WITHOUT_RECOMMENDATION)
    
        assert b.is_text_present("You are now logged in")
    
    opened by miohtama 10
  • Do not close browser on test failures (optionally)

    Do not close browser on test failures (optionally)

    I am just experimenting with pytest-splinter, and have already used the following method before:

    @pytest.yield_fixture(scope='function', …)
    def browser(request, live_server):
        # …
    
        failed_before = request.session._testsfailed
        yield browser
    
        # Quit the browser only if the test has not failed.
        # ...or request.config.option.maxfail > request.session._testsfailed:
        if request.session._testsfailed == failed_before:
            b.quit()
    

    This uses a rather new feature of py.test (yield.fixture), instead of adding a finalizer to the request.

    Do you think it makes sense to add such a feature to pytest-splinter?

    I am currently wrapping pytest-splinter's browser fixture with this method and have defined the fixture splinter_close_browser to return False, which appears to work.

    opened by blueyed 10
  • I'm unable to make splinter on CI return anything else than

    I'm unable to make splinter on CI return anything else than "flask" webdriver

    Hi,

    PR: #163

    All I get on CI is "flask" web driver. There is Firefox installed, there is gecko driver executable, I even made it download Selenium - just like the old times - and I'm unable to replicate this on my local setup.

    If anybody has any ideas please help, we could have working CI by now if not that bug.

    help-needed 
    opened by mpasternak 9
  • Simplify --splinter-headless

    Simplify --splinter-headless

    It feels a bit strange doing true/false for a headless option. It could be my own aesthetic / tastes.

    argparse has 'store_true' for cases like this (see docs):

    'store_true' and 'store_false' - These are special cases of 'store_const' used for storing the values True and False respectively. In addition, they create default values of False and True respectively..

    So --headless sets it to True.

    I can't think of a case where a user would want to accept False considering the default behavior is that, but if they did, they can always add their own option via pytest_addoption)

    Not entering --splinter-headless infers False (this is backed by default values in pytest-splinter and probably user intuition). Entering --headless implies the user wants to run in headless mode.

    opened by tony 9
  • pytest-splinter does not work with splinter>=0.18.0

    pytest-splinter does not work with splinter>=0.18.0

    
        def patch_webdriverelement():  # pragma: no cover
            """Patch the WebDriverElement to allow firefox to use mouse_over."""
        
            def mouse_over(self):
                """Perform a mouse over the element which works."""
                (
                    ActionChains(self.parent.driver)
                    .move_to_element_with_offset(self._element, 2, 2)
                    .perform()
                )
        
            # Apply the monkey patch for Firefox WebDriverElement
    >       firefox.WebDriverElement.mouse_over = mouse_over
    E       AttributeError: module 'splinter.driver.webdriver.firefox' has no attribute 'WebDriverElement'
    
    .venv/lib64/python3.10/site-packages/pytest_splinter/splinter_patches.py:21: AttributeError
    
    opened by enkidulan 8
  • AttributeError: 'function' object has no attribute 'ensure'

    AttributeError: 'function' object has no attribute 'ensure'

    I've tried to make a patch but I don't get why all those branches are there. Why is screenshot_dir recreated in certain conditions?

    [gw1] linux2 -- Python 2.7.12 /usr/bin/python2.7
    Traceback (most recent call last):
      File "/usr/local/lib/python2.7/dist-packages/pytest_splinter/plugin.py", line 522, in _take_screenshot_on_failure
        splinter_screenshot_getter_png=splinter_screenshot_getter_png,
      File "/usr/local/lib/python2.7/dist-packages/pytest_splinter/plugin.py", line 376, in _take_screenshot
        screenshot_dir = session_tmpdir.ensure('screenshots', dir=True).strpath
    AttributeError: 'function' object has no attribute 'ensure'
    
    opened by ionelmc 8
  • Lint won't pass - for now

    Lint won't pass - for now

    In the old tox configuration I can find that there was lint running, which used black.

    The current codebase is not very likely to be black-compatible, as you can see here: https://github.com/pytest-dev/pytest-splinter/runs/7750268300?check_suite_focus=true

    I am against re-formatting the whole codebase. But I am totally for keeping up the code quality of changes introduced. On the other hand, isort or pyupgrade will mess the codebase a bit. As you can see in the lint run.

    Is there any good solution? We can disable lint build target manually in GA, of course. This is one of the reasons I separated it from the "main" tests.

    Ideas?

    opened by mpasternak 0
  • Mixing implicit and explicit wait

    Mixing implicit and explicit wait

    Hi there, it seems in pytest-splinter it is not possible to disable implicit wait (see here https://github.com/pytest-dev/pytest-splinter/blob/5522d59fcabfa8904385c1e10ca61460a25193e0/pytest_splinter/plugin.py#L596)

    but the issue is that if I want to use an explicit wait (pytest-splinter allow this) it will result in mixing explicit (the one I define) and implicit wait and this can take to strange waits behaviour (see: https://octopus.com/blog/selenium/8-mixing-waits/mixing-waits).

    How to address this issue or disable implicit wait?

    opened by jobezic 2
  • Screenshots won't work with pytest 5

    Screenshots won't work with pytest 5

    In _browser_screenshot_session, you have the following code:

    
        fixture_values = (
            # pytest 3
            getattr(request, '_fixture_values', {}) or
            # pytest 2
            getattr(request, '_funcargs', {})
        )
    
        for name, value in fixture_values.items():
    

    None of these getters are set in pytest 5.

    opened by pedrospdc 1
Releases(2.0.0)
  • 2.0.0(Aug 31, 2018)

    • Bump minimum splinter version to 0.9.0 (jsfehler)
      • status code support is removed
      • file download is not working due to https://bugzilla.mozilla.org/show_bug.cgi?id=1366035
    • Remove phantomjs support. (jsfehler)
    Source code(tar.gz)
    Source code(zip)
Owner
pytest-dev
pytest-dev
Percy visual testing for Python Selenium

percy-selenium-python Percy visual testing for Python Selenium. Installation npm install @percy/cli: $ npm install --save-dev @percy/cli pip install P

Percy 9 Mar 24, 2022
A collection of benchmarking tools.

Benchmark Utilities About A collection of benchmarking tools. PYPI Package Table of Contents Using the library Installing and using the library Manual

Kostas Georgiou 2 Jan 28, 2022
Test scripts etc. for experimental rollup testing

rollup node experiments Test scripts etc. for experimental rollup testing. untested, work in progress python -m venv venv source venv/bin/activate #

Diederik Loerakker 14 Jan 25, 2022
Test for generating stylized circuit traces from images

I test of an image processing idea to take an image and make neat circuit board art automatically. Inspired by this twitter post by @JackRhysider

Miller Hooks 3 Dec 12, 2022
Django test runner using nose

django-nose django-nose provides all the goodness of nose in your Django tests, like: Testing just your apps by default, not all the standard ones tha

Jazzband 880 Dec 15, 2022
Cloint India Pvt. Ltd's (ClointFusion) Pythonic RPA (Automation) Platform

Welcome to , Made in India with ❤️ Description Cloint India Pvt. Ltd - Python functions for Robotic Process Automation shortly RPA. What is ClointFusi

Cloint India Pvt. Ltd 31 Apr 12, 2022
A library for generating fake data and populating database tables.

Knockoff Factory A library for generating mock data and creating database fixtures that can be used for unit testing. Table of content Installation Ch

Nike Inc. 30 Sep 23, 2022
Data-Driven Tests for Python Unittest

DDT (Data-Driven Tests) allows you to multiply one test case by running it with different test data, and make it appear as multiple test cases. Instal

424 Nov 28, 2022
Simple frontend TypeScript testing utility

TSFTest Simple frontend TypeScript testing utility. Installation Install webpack in your project directory: npm install --save-dev webpack webpack-cli

2 Nov 09, 2021
A complete test automation tool

Golem - Test Automation Golem is a test framework and a complete tool for browser automation. Tests can be written with code in Python, codeless using

486 Dec 30, 2022
Headless chrome/chromium automation library (unofficial port of puppeteer)

Pyppeteer Pyppeteer has moved to pyppeteer/pyppeteer Unofficial Python port of puppeteer JavaScript (headless) chrome/chromium browser automation libr

miyakogi 3.5k Dec 30, 2022
Baseball Discord bot that can post up-to-date scores, lineups, and home runs.

Sunny Day Discord Bot Baseball Discord bot that can post up-to-date scores, lineups, and home runs. Uses webscraping techniques to scrape baseball dat

Benjamin Hammack 1 Jun 20, 2022
Web testing library for Robot Framework

SeleniumLibrary Contents Introduction Keyword Documentation Installation Browser drivers Usage Extending SeleniumLibrary Community Versions History In

Robot Framework 1.2k Jan 03, 2023
Codeforces Test Parser for C/C++ & Python on Windows

Codeforces Test Parser for C/C++ & Python on Windows Installation Run pip instal

Minh Vu 2 Jan 05, 2022
API mocking with Python.

apyr apyr (all lowercase) is a simple & easy to use mock API server. It's great for front-end development when your API is not ready, or when you are

Umut Seven 55 Nov 25, 2022
The successor to nose, based on unittest2

Welcome to nose2 nose2 is the successor to nose. It's unittest with plugins. nose2 is a new project and does not support all of the features of nose.

736 Dec 16, 2022
pytest splinter and selenium integration for anyone interested in browser interaction in tests

Splinter plugin for the pytest runner Install pytest-splinter pip install pytest-splinter Features The plugin provides a set of fixtures to use splin

pytest-dev 238 Nov 14, 2022
Scalable user load testing tool written in Python

Locust Locust is an easy to use, scriptable and scalable performance testing tool. You define the behaviour of your users in regular Python code, inst

Locust.io 20.4k Jan 04, 2023
FauxFactory generates random data for your automated tests easily!

FauxFactory FauxFactory generates random data for your automated tests easily! There are times when you're writing tests for your application when you

Og Maciel 37 Sep 23, 2022
An AWS Pentesting tool that lets you use one-liner commands to backdoor an AWS account's resources with a rogue AWS account - or share the resources with the entire internet 😈

An AWS Pentesting tool that lets you use one-liner commands to backdoor an AWS account's resources with a rogue AWS account - or share the resources with the entire internet 😈

Brandon Galbraith 276 Mar 03, 2021