QA Audit and consulting

Quality, clear and practical

Hello, I'm Oleg Sukharev, a QA/SDET with 15+ years of experience in the field, and I'm ready to share my skills and help solve quality issues.

Олег Сухарев

Latest posts

All posts →
Pytest - How to Pass Fixtures

Pytest - How to Pass Fixtures

In the previous article, I briefly talked about fixtures in pytest — what they are and how to use them. However, when you start using them frequently and across a large number of tests, you begin to think about how to use them more efficiently or with less boilerplate code. Let’s look at how you can work with fixtures when using a class-based test structure. As in the documentation For example, according to the documentation, it is recommended to do something like this:

Read more
Pytest - Fixtures

Pytest - Fixtures

In the previous article, I briefly touched on the topic of pytest fixtures. In this one, I would like to expand a bit on what they are and why you should use them. In traditional testing frameworks (for example unittest, JUnit, chai/mocha), to execute something before a test/tests, a function with names like setup or before is typically used. Pytest provides a similar approach, but fixtures are more powerful and flexible.

Read more