Hemachandrahemachandra.hashnode.dev·Sep 29, 2024How to test/mock Configuration files in PythonIntroduction We will be using configuration files in our projects so frequently that, without a configuration file, it becomes difficult to change the code each time. Why do we need a configuration file? Imagine I have created a project that runs on ...11 likes·86 readspytest
Kunaal Thanikkunaal.hashnode.dev·Sep 5, 2024CH02 - PageObjects, Fixtures, PytestChapter 02 - how to use Page Object Models, Fixtures, pyTest mark, Environment Variables, pytest.ini and conftest Recap: https://kunaal.hashnode.dev/automation-ch01-initialization Previously, we set up the testing framework using Playwright and Pytho...Python Playwright UI Automationplaywright
Kunaal Thanikkunaal.hashnode.dev·Jul 26, 2024Pytest FixturesFixtures: A pytest fixture is a function in the pytest framework that provides a fixed baseline environment for tests. This environment can include setting up database connections, preparing test data, or even creating temporary directories. Fixture...Automation Conceptstestguardians
Aleš Blaznikales.blaznik.si·Mar 10, 2024When Fixtures Aren't Enough: Testing with Large Datasets in the DatabaseWe all know the value of test data. It helps us identify bugs, ensure functionality, and build confidence in our systems. But what happens when your trusty test data libraries start to slow down under the weight of millions of records? This is where ...Testing
Pablo Curell Mompoblog.codemanship.dev·Mar 6, 2024Test factories should not have randomness, but... Why?I had a discussion with a colleague the other day about randommess in FactoryBot objects. They were in favor of having randomness in their objects, their main argument being: If we have random values, eventually we are bound to find the edge cases. ...66 readsTesting
Mitchell Daddariomitchell-daddarios-developer-blog.com·Jun 20, 2022Python: Unit Testing with PytestIn this post I will highlight the most important features of unit testing with Pytest, Python's most popular testing framework! What is Unit Testing and Why does it Matter? Unit testing is a software development process in which the smallest units of...137 readspytest
Wisdom Geekwisdomgeek.hashnode.dev·Mar 11, 2021Adding fixtures and parameterized functions to PyTestAs we discussed in our post on getting started with Pytest, the framework allows us to re-use tests by making use of test fixtures and parameterized functions. In this post, we will learn how to do so. We will build on our simple calculator example t...unit testing