Logo
flag

Testing in Python

Logo

Please rate the course

0.0
Category:
Language:
Russian
Duration:
13:02:55
Number of lessons:
9
Added date:
11/05/2024
Rating:
0.0

Course short description

How to learn to write tests in Python yourself and implement it at work. Suitable for leads, CTOs and regular developers.


Week 0. Introductory

Basic practice and theory of testing with pytest

What: Nikita will analyze the testing base for pytest: how the collection and execution of tests works, what fixtures and parameterization are, he will mention hooks, plugins, mocks and stubs. Fedya will tell you how having good tests reduces cognitive load, debunk the myth that without tests it’s faster, and talk about the main difference between a good test and a bad one.

What problem are we solving: Aligning the context.

On output: Let's understand how to write and where to put the first test on the project.

Week 1

“Readable tests”

What: About clear tests! Tests are also code. They may need to be even clearer than the application code itself. During the lesson, Nikita will show you how to significantly simplify the understanding of any test: separate data and behavior. Let's look at the basic tools and strategies. And Fedya will tell you when it is and is not worth reusing application code in tests.

What problem are we solving: When an incomprehensible test fails, you just want to delete it, and not figure out what its stubborn author meant.

At the end: We will learn how to prepare a test environment so that the tests are useful - generate diverse, but compatible with your application test entities in a readable form.


Week 2

“We make tests fast and reliable”

What: If tests take a long time to run or work unreliably, then no one will run them. Nikita will show how to make tests fast and what ways to improve their reliability (spoiler: it will be about a spherical horse in a vacuum).

What problem are we solving: Slow tests increase the feedback loop, slow down publication, and most importantly, programmers they get used to hating them, which means they don’t write new ones.

Output: Let’s learn how to make a useful and uncluttered test suite, which will help in the future, and not increase the build time to 30 minutes.

Week 3

“Tests and life”

What: One of the main problems of testing is people who prevent us from writing tests. We need to learn to work with them. Perhaps this factor is even more important than knowledge of the internals of your test framework. Nikita and Fedya will tell you how they help teams start (or continue) writing tests and working with people.

What problem are we solving: Even with the coolest testing tools, your initiative can easily be overwhelmed by passive resistance. And if you talk about tests with a business without preparation, refusal is completely guaranteed.

At the end: We will receive a clear and comprehensive set of actions necessary to start writing tests. Let's understand how to sell tests to different types of people.

Write your comment

Logo