LuluTest is a Python framework for creating automated browser tests.

Overview

Build Status

LuluTest

LuluTest is an open source browser automation framework using Python and Selenium. It is relatively lightweight in that it mostly provides wrappers for 3rd party library methods that make browser automation and testing more intuitive. The ultimate goal of LuluTest is to get people writing robust automated browser scripts quickly by abstracting out the inherent complexities and peculiarities

Special Thanks

The following Github users have contributed in some way to LuluTest and I want to thank them so much for their time, effort, and skill.

@wangonya

@nicpayne713

@benjifs

@alwinaind

@ddrm86

@MarioHdpz

@FarhiaM

@CarolinaKinetic

Basic Usage

LuluTest is designed to support both white and black box testing. The functions provided will work as long as the machine running the scripts can access the pages under test.

The basic work flow for creating a test is as such:

  1. Create a Page object with the URL of the page to be tested.
  2. Create an Action object which will interact with elements
  3. Create an Element object for each element on the page that will be tested
  4. go to the page to be tested
  5. Create a Steps object of actions to take on a page
  6. Do the Steps
  7. Do your assertions

Example Usage

Below is an example test case:

import unittest

from LuluTest.lulu_exceptions import PageNotLoadedError
from LuluTest.page import Page
from LuluTest.element import PageElement
from LuluTest.action import Action
from step import Step, Do, DoStep, Steps


class ExampleTest(unittest.TestCase):
    def test_write_and_click(self):
        page = Page('http://erikwhiting.com/newsOutlet')
        actions = Action()
        page.elements = [
            PageElement(("id", "sourceNews"), "input box"),
            PageElement(("id", "transmitter"), "button"),
            PageElement(("id", "en1"), "english div")
        ]
        actions.go(page)
        actions.input_text(page.get_element("input box"), "Hello")
        actions.click(page.get_element("button"))
        english_div = page.get_element("english div")
        english_text = actions.check_element_text(english_div, "Hello")
        self.assertTrue(english_text)
        actions.close()

Alternatively, you can also build pages via either YAML or JSON and import them for use. For example, the above page can be modeled in newso_outlet.yml like such:

page:
  url: http://erikwhiting.com/newsOutlet
  elements:
    input_box:
      id: sourceNews
    button:
      id: transmitter
    english_div:
      id: en1

import this file into your test script to avoid writing element finding code:

# In a setup method:
base_path = os.getcwd()
prebuilt_pages_directory = base_path + '/fixtures/pages/'
page_configs = [
    prebuilt_pages_directory + 'news_outlet.yml',
    prebuilt_pages_directory + 'other_page.yml',
    prebuilt_pages_directory + 'even_another_page.json',
]
pages = page_factory.generate_pages(page_configs)

# Now all subsequent tests have access to this page object
def test_basic_usage(self):
    page = self.pages['news_outlet']
    actions = Action()
    actions.go(page)
    actions.input_text(page.get_element("input_box"), "Hello")
    actions.click(page.get_element("button"))
    english_div = page.get_element("english_div")
    english_text = actions.check_element_text(english_div, "Hello")
    self.assertTrue(english_text)
    actions.close()

Features

There are two main design philosophies driving the development of LuluTest:

  1. Hide the tedium and peculiarities inherent in browser automation from the test scripts themselves, allowing testers to write efficient and robust tests faster

  2. Simplify the test writing process as much as possible so non-technical users can contribute basic test cases while freeing technical users to focus on more technically complex issues.

These philosophies are implemented mostly by keeping the sometimes slow response time of web elements in mind. The project aims to avoid explicit waits and sleeps as much as possible.

LuluTest Architecture

Between December of 2019 and January of 2020, the LuluTest architecture was redesigned with better principles and implemented in a way as described in the picture below. If contributing, please do your best to adhere to the intended arhcitecture.

LuluTest Architecture

Future Work

The ultimate goal of LuluTest is to power a domain specific language to help facilitate communication between business and technical stakeholders about requirements and testing.

Contribution Guide

Please see the Contribution Guide

Set-Up Guide

For setting up a local environment to contribute to testing, please go to the Set-Up Guide

Comments
  • Make Package-able

    Make Package-able

    I want to publish this to PyPI but I cannot figure out how to package it. I tried following along with the package tutorial here: https://packaging.python.org/tutorials/packaging-projects/ but I get errors. I do not have the most firm grasp of Python packaging so I'm not sure why I get the errors I get. Help is desperately needed and greatly appreciated.

    enhancement help wanted 
    opened by erik-whiting 9
  • Better Exception classes

    Better Exception classes

    Right now, the custom Exception classes are not very helpful outside of their names. It would be cool if the messages could be more informative. Also, there are probably some Exception classes that haven't yet been made that should be.

    help wanted good first issue 
    opened by erik-whiting 6
  • Bump urllib3 from 1.25.6 to 1.26.5

    Bump urllib3 from 1.25.6 to 1.26.5

    Bumps urllib3 from 1.25.6 to 1.26.5.

    Release notes

    Sourced from urllib3's releases.

    1.26.5

    :warning: IMPORTANT: urllib3 v2.0 will drop support for Python 2: Read more in the v2.0 Roadmap

    • Fixed deprecation warnings emitted in Python 3.10.
    • Updated vendored six library to 1.16.0.
    • Improved performance of URL parser when splitting the authority component.

    If you or your organization rely on urllib3 consider supporting us via GitHub Sponsors

    1.26.4

    :warning: IMPORTANT: urllib3 v2.0 will drop support for Python 2: Read more in the v2.0 Roadmap

    • Changed behavior of the default SSLContext when connecting to HTTPS proxy during HTTPS requests. The default SSLContext now sets check_hostname=True.

    If you or your organization rely on urllib3 consider supporting us via GitHub Sponsors

    1.26.3

    :warning: IMPORTANT: urllib3 v2.0 will drop support for Python 2: Read more in the v2.0 Roadmap

    • Fixed bytes and string comparison issue with headers (Pull #2141)

    • Changed ProxySchemeUnknown error message to be more actionable if the user supplies a proxy URL without a scheme (Pull #2107)

    If you or your organization rely on urllib3 consider supporting us via GitHub Sponsors

    1.26.2

    :warning: IMPORTANT: urllib3 v2.0 will drop support for Python 2: Read more in the v2.0 Roadmap

    • Fixed an issue where wrap_socket and CERT_REQUIRED wouldn't be imported properly on Python 2.7.8 and earlier (Pull #2052)

    1.26.1

    :warning: IMPORTANT: urllib3 v2.0 will drop support for Python 2: Read more in the v2.0 Roadmap

    • Fixed an issue where two User-Agent headers would be sent if a User-Agent header key is passed as bytes (Pull #2047)

    1.26.0

    :warning: IMPORTANT: urllib3 v2.0 will drop support for Python 2: Read more in the v2.0 Roadmap

    • Added support for HTTPS proxies contacting HTTPS servers (Pull #1923, Pull #1806)

    • Deprecated negotiating TLSv1 and TLSv1.1 by default. Users that still wish to use TLS earlier than 1.2 without a deprecation warning should opt-in explicitly by setting ssl_version=ssl.PROTOCOL_TLSv1_1 (Pull #2002) Starting in urllib3 v2.0: Connections that receive a DeprecationWarning will fail

    • Deprecated Retry options Retry.DEFAULT_METHOD_WHITELIST, Retry.DEFAULT_REDIRECT_HEADERS_BLACKLIST and Retry(method_whitelist=...) in favor of Retry.DEFAULT_ALLOWED_METHODS, Retry.DEFAULT_REMOVE_HEADERS_ON_REDIRECT, and Retry(allowed_methods=...) (Pull #2000) Starting in urllib3 v2.0: Deprecated options will be removed

    ... (truncated)

    Changelog

    Sourced from urllib3's changelog.

    1.26.5 (2021-05-26)

    • Fixed deprecation warnings emitted in Python 3.10.
    • Updated vendored six library to 1.16.0.
    • Improved performance of URL parser when splitting the authority component.

    1.26.4 (2021-03-15)

    • Changed behavior of the default SSLContext when connecting to HTTPS proxy during HTTPS requests. The default SSLContext now sets check_hostname=True.

    1.26.3 (2021-01-26)

    • Fixed bytes and string comparison issue with headers (Pull #2141)

    • Changed ProxySchemeUnknown error message to be more actionable if the user supplies a proxy URL without a scheme. (Pull #2107)

    1.26.2 (2020-11-12)

    • Fixed an issue where wrap_socket and CERT_REQUIRED wouldn't be imported properly on Python 2.7.8 and earlier (Pull #2052)

    1.26.1 (2020-11-11)

    • Fixed an issue where two User-Agent headers would be sent if a User-Agent header key is passed as bytes (Pull #2047)

    1.26.0 (2020-11-10)

    • NOTE: urllib3 v2.0 will drop support for Python 2. Read more in the v2.0 Roadmap <https://urllib3.readthedocs.io/en/latest/v2-roadmap.html>_.

    • Added support for HTTPS proxies contacting HTTPS servers (Pull #1923, Pull #1806)

    • Deprecated negotiating TLSv1 and TLSv1.1 by default. Users that still wish to use TLS earlier than 1.2 without a deprecation warning

    ... (truncated)

    Commits
    • d161647 Release 1.26.5
    • 2d4a3fe Improve performance of sub-authority splitting in URL
    • 2698537 Update vendored six to 1.16.0
    • 07bed79 Fix deprecation warnings for Python 3.10 ssl module
    • d725a9b Add Python 3.10 to GitHub Actions
    • 339ad34 Use pytest==6.2.4 on Python 3.10+
    • f271c9c Apply latest Black formatting
    • 1884878 [1.26] Properly proxy EOF on the SSLTransport test suite
    • a891304 Release 1.26.4
    • 8d65ea1 Merge pull request from GHSA-5phf-pp7p-vc2r
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 3
  • Address codeclimate issues

    Address codeclimate issues

    Recently, codeclimate checks were implemented into LuluTest and naturally, it identified a lot of issues. Codeclimate is a static code analysis tool that identifies areas in which best practices are ignored, code smells, and other things. In order to maximize velocity, it is important that code quality be as high as possible. This issue refers to addressing the issues most recently identified by the initial analysis.

    opened by erik-whiting 3
  • Add initial stab at publishing to PyPI

    Add initial stab at publishing to PyPI

    This is my initial stab at publishing to PyPI with GH Actions on push. These are slightly different than AZDO builds so let me know if something doesn't look right!

    Would close issue #80

    hacktoberfest hacktoberfest-accepted 
    opened by pypeaday 2
  • Fix travis builds

    Fix travis builds

    I noticed many tests on Travis were having the Error: selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 80. I added webdriver-manager as a dependency and used it to load the Chrome driver.

    All the failing tests are now running fine except one - test_accordion. Looks like the page you were using to test that is broken. I would have added an accordion test using another page but I realised you were doing something with a script in the tests so I'm not sure what was going on there and left it.

    opened by wangonya 2
  • JS Alert Tests Failing in TravisCI Only

    JS Alert Tests Failing in TravisCI Only

    There are three tests in tests/test_other_pages.py which test the functionality of interacting with Alert elements (JS alerts, prompts, confirms) which are failing in TravisCI. They are test_javascript_alert, test_javascript_confirm, and test_javascript_prompt.

    These tests pass locally, but something about TravisCI does not like what's happening. Please note, element functionality was recently refactored, however this functionality wasn't touched. Travis is throwing the following exception:

    ERROR: test_javascript_alert (test_other_pages.TestOtherPages)
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "/home/travis/build/erik-whiting/LuluTest/tests/test_other_pages.py", line 108, in test_javascript_alert
        bp.close()
      File "/home/travis/build/erik-whiting/LuluTest/page/page.py", line 23, in close
        self.page.close()
      File "/home/travis/virtualenv/python3.6.7/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 688, in close
        self.execute(Command.CLOSE)
      File "/home/travis/virtualenv/python3.6.7/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
        self.error_handler.check_response(response)
      File "/home/travis/virtualenv/python3.6.7/lib/python3.6/site-packages/selenium/webdriver/remote/errorhandler.py", line 241, in check_response
        raise exception_class(message, screen, stacktrace, alert_text)
    **selenium.common.exceptions.UnexpectedAlertPresentException: Alert Text: I am a JS Alert
    Message: unexpected alert open: {Alert text : I am a JS Alert}
      (Session info: headless chrome=77.0.3865.120)**
    ----------------------------------------------------------------------
    

    My guess is that there is a timing issue where the test case is not waiting long enough for the alert boxes to show up. I found a promising looking StackOverflow issue that we may be able to implement to get it working again: [Check if any alert exists using selenium python](https://stackoverflow.com/questions/19003003/check-if-any-alert-exists-using-selenium-with-with python)

    If you are able to figure it out, please remove the the @unittest.skip lines above the test cases.

    Most recent build failure

    bug help wanted 
    opened by erik-whiting 2
  • Add instructions for installing browser drivers in SETUP.md

    Add instructions for installing browser drivers in SETUP.md

    The setup docs don't cover installing web drivers required by selenium.

    For example, following the instructions as they are and running the tests without having the chrome driver installed fails with the error: WebDriverException: Message: 'chromedriver' executable needs to be available in the path.

    This may not be an issue for contributors who have worked with selenium before as they may already have the drivers installed, but it may cause problems for contributors new to selenium (or just beginners in general). The error is clear and it's easy enough to look for instructions online on how to install the required drivers, but I think it'd be better to just cover it in the setup docs. Makes it easier for beginners 🙂

    help wanted beginner friendly hacktoberfest 
    opened by wangonya 2
  • Add explaining functionality to Step class

    Add explaining functionality to Step class

    Users can create Step objects and send them to a do method, which iterates through all the steps and performs theme in order. This is designed to save lines of code. An example is as follows:

    # Assume we've declared a Page object named pageObject
    # Assume we've declared two BaseElement objects named input_element and this_button
    steps = [
      step.Step("type", input_element, "This data"),
      step.Step("click", this_button)
    ]
    pageObject.do(steps)
    

    And the system will type "This data" in the pageObject's input_element and then click a button, defined by the BaseElement instance this_button.

    In the spirit of allowing users to have a transparent and well documented system, I would like to add a method in the Step class that explains itself. For example:

    # Assume we've declared a Page object named pageObject
    >>> input_element = pageObject.element_by("id", "username")
    >>> step_1 = step.Step("type", input_element, "This data")
    >>> step_1.explain()
    This step types "This data" into an input element of id "username"
    

    Please let me know if you have any questions!

    enhancement beginner friendly hacktoberfest 
    opened by erik-whiting 2
  • Use Python's properties mechanism on `AlertElement`

    Use Python's properties mechanism on `AlertElement`

    Overview

    I want to use Python's property construct on the attributes for is_page_element and is_alert_element within the BaseElement sub classes.

    Reasoning

    Properties let you set getters and setters on attributes. This promotes the idea of encapsulation and is generally considered good practice. In this specific case, I don't want developers to be able to change the value of is_page_element or is_alert_element. A PageElement is always a page element, no matter what, so the setter will hijack any attempts to change those values and simply return false when someone tries to set those values.

    This particular issue is for a specific user who said they wanted to get started with open-source. Please don't pick up this issue unless you are Ujjwal.

    Step-by-Step Guide

    To make this contribution, please follow these steps:

    Clone the Repository

    The first thing you want to do is get this code onto your local computer. You can do this by running the following command:

    $> [email protected]:erik-whiting/LuluTest.git
    

    Note, the $> represents your terminal prompt, it is not actually part of the command you need to run

    Make a new Branch

    Now that you've cloned the code, you need to make a new branch. CD into the project with

    $> cd LuluTest
    

    and create a new branch. This will make all the work you do independent of the development branch until I merge it. Here's a good article about branches in git.

    Let's call our branch add-properties-to-alert-element. To create and checkout this branch, run the following command:

    $> git checkout -b add-properties-to-alert-element
    

    Make the Code Changes

    Now that you've made a new branch, you can start making changes to the code. You will want to work on the AlertElement class. This class is defined in LuluTest/element/alert_element.py. You need to make changes that are nearly identical to the equivalent pull request for PageElement. Look at the files changed in that pull request and do almost the same thing to AlertElement.

    Commit Your Changes

    Once you're done with the code changes, it's time to commit the changes. You'll do this by running the following command:

    $> git commit -am "Some commit message"
    

    Make your commit message a broad statement about what you did. Something like "Add properties to AlertElement".

    Push Branch and Create Pull Request

    The next thing you have to do is submit your changes for review. This involves pushing your branch to the repository and then making a pull request out of it. To push the branch, run the following command:

    $> git push --set-upstream origin add-properties-to-alert-element
    

    Once the branch has been pushed, go to the repository's homepage (https://github.com/erik-whiting/LuluTest) and you should see a prompt with a green button that says "Create pull request." Press that button and follow along.

    Await Review

    Once you've made a pull-request, I will be alerted that someone wants to merge their work into the repository. I will look it over and if everything is good, I will merge it into the development branch and you will have officially made your first contribution, congratulations!

    Usually, you will have to fix any failing automated tests or other PR checks but this repository is currently a little disorganized and its tests are failing for a bunch of unrelated reasons. I plan to fix that in the coming weeks but for now, just ignore the failing tests.

    opened by erik-whiting 1
  • Use properties for element type indicators

    Use properties for element type indicators

    This is an example pull request for equivalent work that needs to be done on AlertElement and BaseElement.

    This work uses Python's properties mechanism to make getters and setters for the is_page_element and is_alert_element attributes of the PageElement class.

    opened by erik-whiting 1
  • Improve documentation

    Improve documentation

    Need someone to take a look at the existing documentation and see if there's room for improvement. Also, it's probably about time to make sure that existing examples are still relevant with the current code.

    documentation good first issue beginner friendly hacktoberfest 
    opened by erik-whiting 0
  • Fix flaky tests

    Fix flaky tests

    The following two tests in test_other_pages.py fail sporadically.

    test_file_upload test_script_execution

    Example failure:

    ======================================================================
    ERROR: test_javascript_alert (test_other_pages.TestOtherPages)
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "/home/travis/build/erik-whiting/LuluTest/tests/test_other_pages.py", line 50, in test_javascript_alert
        actions.go(page)
      File "/home/travis/build/erik-whiting/LuluTest/LuluTest/action/page_actions_decorator.py", line 36, in method
        return self.set_page_loaded(func, *args)
      File "/home/travis/build/erik-whiting/LuluTest/LuluTest/action/page_actions_decorator.py", line 46, in set_page_loaded
        getattr(self.model, func)(*args)
      File "/home/travis/build/erik-whiting/LuluTest/LuluTest/action/page_actions.py", line 7, in go
        self.driver.get(page.url)
      File "/home/travis/virtualenv/python3.8.7/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 333, in get
        self.execute(Command.GET, {'url': url})
      File "/home/travis/virtualenv/python3.8.7/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
        self.error_handler.check_response(response)
      File "/home/travis/virtualenv/python3.8.7/lib/python3.8/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
        raise exception_class(message, screen, stacktrace)
    selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_NAME_NOT_RESOLVED
      (Session info: headless chrome=90.0.4430.85)
    
    

    If this can get fixed preferably by finding the root cause or employing a new strategy, that would be great because flakey tests here mean flakey tests for users.

    bug help wanted good first issue beginner friendly 
    opened by erik-whiting 2
  • Create more tests for other websites

    Create more tests for other websites

    In order to figure out what the limitations of the current implementation are, we should write new browser tests for all kinds of websites. For this issue, you should:

    • Find a web page and think of how you would test it
    • Write the test for it in test_other_pages.py
    • As you write the test, see if there is something missing from LuluTest preventing you from writing that test
      • Either add that feature yourself, or submit an issue requesting it to be added

    The Point

    The point of writing tests for other websites is to see what's missing from LuluTest. Find something to test and try to write a test script for it. Once you get to a point where you realize LuluTest is missing the appropriate feature to test the page, add it!

    Some suggestions:

    • ~https://www.saucedemo.com - Go to site, place 3 items in cart, go to cart, remove one item, checkout (easy)~
    • ~http://the-internet.herokuapp.com/javascript_alerts test each alert type; one test for each (easy)~
    • ~http://the-internet.herokuapp.com/floating_menu test that menu stays where it is (medium)~
    • http://the-internet.herokuapp.com/download test file download (medium)
    • http://the-internet.herokuapp.com/dynamic_controls test removing the checkbox (hard)
    • ~https://demoqa.com/autocomplete/ test autocomplete feature (very hard, requires conversation)~
    • ~https://demoqa.com/selectmenu/ test drop downs~
    • ~https://demoqa.com/accordion/ accordion test. Test that non selected data appears/disappears (medium)~
    • ~https://www.saucedemo.com refresh test. Make a cart, refresh the page and make sure the cart is still the same (easy-medium)~
    help wanted good first issue beginner friendly hacktoberfest 
    opened by erik-whiting 4
  • Add drag and drop functionality

    Add drag and drop functionality

    Extend either the Page class or BaseElement class to support drag and drop functionality. This needs to include:

    • finding a place to drag an element
    • perhaps a way to see if the drag was successful?
    • finding a website which would allow us to test this
    • write tests to make sure this works as expected
    enhancement help wanted good first issue hacktoberfest 
    opened by erik-whiting 11
Releases(v_01)
Owner
Erik Whiting
Software engineer masquerading as a computer scientist | Open: source, science, data | Close: the god damn door
Erik Whiting
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
Automated tests for OKAY websites in Python (Selenium) - user friendly version

Okay Selenium Testy Aplikace určená k testování produkčních webů společnosti OKAY s.r.o. Závislosti K běhu aplikace je potřeba mít v počítači nainstal

Viktor Bem 0 Oct 1, 2022
The pytest framework makes it easy to write small tests, yet scales to support complex functional testing

The pytest framework makes it easy to write small tests, yet scales to support complex functional testing for applications and libraries. An example o

pytest-dev 9.6k Jan 2, 2023
Minimal example of how to use pytest with automated 'devops' style automated test runs

Pytest python example with automated testing This is a minimal viable example of pytest with an automated run of tests for every push/merge into the m

Karma Computing 2 Jan 2, 2022
A browser automation framework and ecosystem.

Selenium Selenium is an umbrella project encapsulating a variety of tools and libraries enabling web browser automation. Selenium specifically provide

Selenium 25.5k Jan 1, 2023
Let your Python tests travel through time

FreezeGun: Let your Python tests travel through time FreezeGun is a library that allows your Python tests to travel through time by mocking the dateti

Steve Pulec 3.5k Dec 29, 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

null 424 Nov 28, 2022
a plugin for py.test that changes the default look and feel of py.test (e.g. progressbar, show tests that fail instantly)

pytest-sugar pytest-sugar is a plugin for pytest that shows failures and errors instantly and shows a progress bar. Requirements You will need the fol

Teemu 963 Dec 28, 2022
:game_die: Pytest plugin to randomly order tests and control random.seed

pytest-randomly Pytest plugin to randomly order tests and control random.seed. Features All of these features are on by default but can be disabled wi

pytest-dev 471 Dec 30, 2022
Selects tests affected by changed files. Continous test runner when used with pytest-watch.

This is a pytest plug-in which automatically selects and re-executes only tests affected by recent changes. How is this possible in dynamic language l

Tibor Arpas 614 Dec 30, 2022
Docker-based integration tests

Docker-based integration tests Description Simple pytest fixtures that help you write integration tests with Docker and docker-compose. Specify all ne

Avast 326 Dec 27, 2022
To automate the generation and validation tests of COSE/CBOR Codes and it's base45/2D Code representations

To automate the generation and validation tests of COSE/CBOR Codes and it's base45/2D Code representations, a lot of data has to be collected to ensure the variance of the tests. This respository was established to collect a lot of different test data and related test cases of different member states in a standardized manner. Each member state can generate a folder in this section.

null 160 Jul 25, 2022
Show surprise when tests are passing

pytest-pikachu pytest-pikachu prints ascii art of Surprised Pikachu when all tests pass. Installation $ pip install pytest-pikachu Usage Pass the --p

Charlie Hornsby 13 Apr 15, 2022
Django-google-optimize is a Django application designed to make running server side Google Optimize A/B tests easy.

Django-google-optimize Django-google-optimize is a Django application designed to make running Google Optimize A/B tests easy. Here is a tutorial on t

Adin Hodovic 39 Oct 25, 2022
Run ISP speed tests and save results

SpeedMon Automatically run periodic internet speed tests and save results to a variety of storage backends. Supported Backends InfluxDB v1 InfluxDB v2

Matthew Carey 9 May 8, 2022
Given some test cases, this program automatically queries the oracle and tests your Cshanty compiler!

The Diviner A complement to The Oracle for compilers class. Given some test cases, this program automatically queries the oracle and tests your compil

Grant Holmes 2 Jan 29, 2022
Statistical tests for the sequential locality of graphs

Statistical tests for the sequential locality of graphs You can assess the statistical significance of the sequential locality of an adjacency matrix

null 2 Nov 23, 2021
Fail tests that take too long to run

GitHub | PyPI | Issues pytest-fail-slow is a pytest plugin for making tests fail that take too long to run. It adds a --fail-slow DURATION command-lin

John T. Wodder II 4 Nov 27, 2022
a wrapper around pytest for executing tests to look for test flakiness and runtime regression

bubblewrap a wrapper around pytest for assessing flakiness and runtime regressions a cs implementations practice project How to Run: First, install de

Anna Nagy 1 Aug 5, 2021