{"id":21372390,"url":"https://github.com/automationpanda/tau-pytest-bdd","last_synced_at":"2025-04-09T17:25:49.620Z","repository":{"id":42392022,"uuid":"178628437","full_name":"AutomationPanda/tau-pytest-bdd","owner":"AutomationPanda","description":"Test Automation University: Behavior-Driven Python with pytest-bdd","archived":false,"fork":false,"pushed_at":"2024-05-21T05:57:45.000Z","size":59,"stargazers_count":111,"open_issues_count":1,"forks_count":129,"subscribers_count":15,"default_branch":"main","last_synced_at":"2025-04-02T10:44:33.383Z","etag":null,"topics":["bdd","pytest","pytest-bdd","python","tau","test-automation","test-automation-university"],"latest_commit_sha":null,"homepage":"https://testautomationu.applitools.com/behavior-driven-python-with-pytest-bdd/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AutomationPanda.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2019-03-31T01:13:58.000Z","updated_at":"2025-01-17T15:24:51.000Z","dependencies_parsed_at":"2023-07-20T05:39:52.673Z","dependency_job_id":null,"html_url":"https://github.com/AutomationPanda/tau-pytest-bdd","commit_stats":null,"previous_names":["automationpanda/tau-pytest-bdd"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AutomationPanda%2Ftau-pytest-bdd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AutomationPanda%2Ftau-pytest-bdd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AutomationPanda%2Ftau-pytest-bdd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AutomationPanda%2Ftau-pytest-bdd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AutomationPanda","download_url":"https://codeload.github.com/AutomationPanda/tau-pytest-bdd/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248075991,"owners_count":21043682,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bdd","pytest","pytest-bdd","python","tau","test-automation","test-automation-university"],"created_at":"2024-11-22T08:19:30.072Z","updated_at":"2025-04-09T17:25:49.606Z","avatar_url":"https://github.com/AutomationPanda.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tau-pytest-bdd\n\nThis repository contains example code for the\n*Behavior-Driven Python with pytest-bdd* course\nfrom [Test Automation University](https://testautomationu.applitools.com/).\nThere is a branch for each chapter of the course showing the state of the code at the completion of the chapter.\n\n\n## Repository Purpose\n\nThe best way to learn pytest is through hands-on coding.\nIn the first lesson of the course, you will create a new Python project for test cases.\n(That project will *not* be the same as this repository.)\nEach chapter then introduces new concepts and provides coding instructions for your project.\nIf you code along with each chapter,\nthen you will have a complete, functioning test automation project by the end of the course.\n\nThis repository provides all example code for the project.\nIf you get stuck while building your own project,\ncompare your code to the example code in this repository.\nHowever, try to avoid blindly copying code from the repository into your project.\nTake the time to learn the concepts and code presented in each chapter.\n\n\n## Repository Branches\n\n* Each `chapter/*` branch contains the state of the code for each chapter\n* The `main` branch contains the final state of the code at the end of the course\n\n\n## Python Setup\n\nPython setup can be complicated.\nThis section documents how to set up your machine for Python test automation development.\n\n### Python Installation and Tools\n\nYou can complete this course using any OS: Windows, macOS, Linux, etc.\n\nThis course requires Python 3.\nYou can download the latest Python version from [Python.org](https://www.python.org/downloads/).\nFollow the appropriate installation instructions for your operating system.\n\nYou should have basic Python programming skills before attempting this course.\nLearning the language is always a prerequisite for learning automation.\nIf you need help learning Python, check out this article:\n[How Do I Start Learning Python?](https://automationpanda.com/2020/02/18/how-do-i-start-learning-python/)\n\nYou should also have a good Python editor/IDE.\nGood choices include [PyCharm](https://www.jetbrains.com/pycharm/)\nand [Visual Studio Code](https://code.visualstudio.com/docs/languages/python).\n\nYou will also need [Git](https://git-scm.com/) if you want to clone this repository locally.\nIf you are new to Git, [try learning the basics](https://try.github.io/).\n\nFor Web UI tests, install the appropriate browser and WebDriver executable.\nThese tests use Firefox and [geckodriver](https://github.com/mozilla/geckodriver/releases).\n\n\n### Python Installation Troubleshooting\n\nUnfortunately, installing Python properly can be complicated,\nespecially if Python was previously installed on your machine.\nTo verify your Python installation, enter `python --version` at the command line.\nYou should see the proper version printed.\n\nIf the `python` command doesn't work or doesn’t print the expected version number,\nthen try using the `python3` command instead.\nIf that still doesn't work,\nthen the correct Python installation might not be included in your system path.\nFind the directory into which Python was installed,\nmanually add it to the system path,\nrelaunch the command line,\nand try running Python again.\n\n* [System Path Instructions for Windows](https://geek-university.com/python/add-python-to-the-windows-path/)\n* [System Path Instructions for macOS](https://www.educative.io/edpresso/how-to-add-python-to-the-path-variable-in-mac)\n* [System Path Instructions for Linux](https://www.computerhope.com/issues/ch001647.htm)\n\n### Python Packages\n\nThis course will use a handful of third-party packages that are *not* part of the Python Standard Library.\nThey must be installed separately using `pip`, the standard Python package installer.\nYou can install them all before you create your test project,\nor you can install them as you complete each chapter in the course.\n\nTo install each package, enter `pip install \u003cpackage-name\u003e` at the command line.\nFor example: `pip install pytest`.\nIf you already have a package installed but need to upgrade its version,\nrun `pip install --upgrade \u003cpackage-name\u003e`.\n\nPlease note that if you need to use the `python3` command to run Python,\nthen you might also need to use the `pip3` command in lieu of `pip`.\n\n### Virtual Environments\n\nRunning `pip install` will install the pytest package globally for the whole system.\nInstalling Python packages globally is okay for this course,\nbut it typically isn't a best practice in the \"read world.\"\nInstead, each project should manage its own dependencies locally using a virtual environment.\nVirtual environments let projects avoid unnecessary dependencies and version mismatches.\n\nFor simplicity, this course will not use or teach virtual environments.\nIf you would like to learn virtual environments on your own, then RealPython's article\n[Python Virtual Environments: A Primer](https://realpython.com/python-virtual-environments-a-primer/)\nis an excellent place to start.\n\n### Package Versions\n\nThe [`requirements.txt`](requirements.txt) file contains the versions for each package used in this course.\n\n\n## Running Tests\n\nTo run the example tests from the command line, run `python -m pytest` from the project root directory.\nThis command will discover and run all tests in the project.\n\nYou can also run tests using the shorter `pytest` command.\nHowever, I recommend always using the lengthier `python -m pytest` command.\nThe lengthier command automatically adds the current directory to `sys.path`\nso that all modules in the project can be discovered.\n\nThe pytest command has several command line options.\nCourse material will cover many of them.\nCheck out the [Usage and Invocations](https://docs.pytest.org/en/stable/usage.html) page\nfor complete documentation.\n\n*Warning:*\nIf you attempt to run tests from this example project,\nmake sure to checkout the correct branch first!\n\n\n## Additional Resources\n\nPython links:\n\n* [Python.org](https://www.python.org/)\n* [pytest.org](https://docs.pytest.org/)\n* [How Do I Start Learning Python?](https://automationpanda.com/2020/02/18/how-do-i-start-learning-python/)\n* [Python Virtual Environments: A Primer](https://realpython.com/python-virtual-environments-a-primer/)\n* [Effective Python Testing with Pytest](https://realpython.com/pytest-python-testing/)\n* [Automation Panda's Python Page](https://automationpanda.com/python/)\n\nBooks:\n\n* [Python Testing with pytest](https://pragprog.com/titles/bopytest/) by Brian Okken\n* [pytest Quick Start Guide](https://www.packtpub.com/web-development/pytest-quick-start-guide) by Bruno Oliveira\n* [Test-Driven Development with Python](https://www.obeythetestinggoat.com/) by Harry J.W. Percival\n\nRelated TAU courses:\n\n* [Python Programming](https://testautomationu.applitools.com/python-tutorial/)\n* [Introduction to pytest](https://testautomationu.applitools.com/pytest-tutorial/)\n* [Selenium WebDriver with Python](https://testautomationu.applitools.com/selenium-webdriver-python-tutorial/)\n* [Automated Visual Testing with Python](https://testautomationu.applitools.com/visual-testing-python/)\n\n\n## About the Author\n\nThis course was written and delivered by **Andrew Knight** (aka *Pandy*), the \"Automation Panda\".\nAndy is a Pythonista who specializes in testing and automation.\n\n* Blog: [AutomationPanda.com](https://automationpanda.com/)\n* Twitter: [@AutomationPanda](https://twitter.com/AutomationPanda)\n* LinkedIn: [andrew-leland-knight](https://www.linkedin.com/in/andrew-leland-knight/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fautomationpanda%2Ftau-pytest-bdd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fautomationpanda%2Ftau-pytest-bdd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fautomationpanda%2Ftau-pytest-bdd/lists"}