Informacje o szkoleniu
Główna korzyść | Rozwiązanie problemu utrzymania kodu (wolne wprowadzanie nowych zmian, dużo nowych błędów przy każdej zmianie). Dzięki temu szkoleniu Twoi ludzie zaczną testować lub będą robić to jeszcze lepiej. To w dłuższym czasie przekłada się na możliwość szybszego wprowadzania zmian w kodzie i mniejszą liczbę bugów. To bardzo często przesądza o powodzeniu projektu. Umiejętności nabyte w czasie szkolenia można łatwo przenieść na inne języki programowania. |
Czas trwania | a) połówki: 5 dni po 4 godz. zegarowe (z przerwami) lub b) pełne dni: 3 dni po 7 godz. zegarowych (z przerwami) |
Forma szkolenia | warsztatowa (70% ćwiczenia / 30% wykład) |
Logistyka | a) online lub b) w siedzibie klienta lub innym wyznaczonym przez niego miejscu, w Polsce lub za granicą w obrębie Europy |
Zapisy | szkolenie zamknięte – indywidualne zamówienie i dopasowanie dla grupy |
Wielkość grupy | do 10 uczestników |
Język szkolenia | polski, angielski lub oba naraz w ramach jednego zlecenia |
Plan szkolenia
I. SOLID Principles
We start from a discussion on SOLID principles that makes code easier to read and maintain. This part is supplemented with exercises demonstrating how (and how not) to apply SOLID principles in Python. This will be helpful in the second step of each iteration in TDD (as well as BDD), that is writing production code.
II. Code Refactoring
The third step of each iteration in both TDD and BDD is refactoring; this involves making code easier to read and maintain without changing its functionality.
In this part, we cover all building blocks (or actions) of refactoring. We introduce the concept of code bad smells that help you find opportunities for correct refactoring and avoid „endless refactoring back and forth”.
III. Builtin Testing Frameworks
First step of each iteration in TDD is writing a test.
We start from a discussion if and why writing tests is beneficial. Contrary to intuition, less bugs is only one of the advantages of covering code with tests.
We usually use a framework that makes writing tests easier. We show how to use the most popular testing framework – unittest.
We also introduce very agile doctest library which help you test, and at the same time, document small utility functions without all the burden and long-winded unittest.
IV. Test Driven Development
After short theoretical introduction to TDD, we solve Katas – programming challenges like RecentlyUsedList or BowlingGame. Katas are simple exercises that let you focus on the TDD methodology rather than fighting with language, IDE or business logic.
We start from a live coding – the instructor shows how you can solve a Kata using TDD. Participants ask questions and discuss with the instructor and other participants. Later on, we move to another Kata. This time participants do the exercise in pairs (pair programming).
V. Test Isolation and Mocking
Test isolation and mocking is covered during second day of the training. We introduce great unittest.mock builtin library (or mock backport if you work on Python 2). It helps you isolate your tests from system calls, filesystem, databases, external APIs or any other resources. We study the most common cases.
Mocking is also an essential part of outside-in development which is covered during the last day.
VI. Testing Web Applications
Testing Web Application let you focus on one of common cases when you need to test a web application written using a framework. For simplicity, this framework is Flask unless you work in Django, in which case we focus on Django’s own challenges.
A number of tools are discussed, Selenium and the built-in Flask client are two examples. However, we introduce and focus on WebTest which is other client and is much faster than Selenium.
VII. Overview of Other Testing Approaches and Code Coverage
At the end of the second day, the instructor introduces other testing approaches. We discuss property-based testing (with hypothesis-python library) and mutation testing (with MutPy). We also introduce a concept of code coverage and show how to configure it.
VIII. Outside-in Development
Most of the time, programmers develop their code inside-out. They start from the simplest functions and tools (inner or lower modules), maybe even they test them, and built outer (or higher) modules upon them. For example, they first implement backend, and then frontend. This is dictated by the fact that the outer modules depend on the lower ones, for example frontend depends on backend. Therefore, you cannot test outer ones without inner ones.
However, this results in bad interfaces, because outer modules are written to match inner modules instead of required behavior. Outside-in development forces you to first implement higher modules, test them mocking the lower modules, and then focus on the inner modules. This results in better interfaces between modules.
IX. Plain-Text Stories in Gherkin
We introduce a special domain specific-language based on English natural language that helps you write acceptance tests understandable for non-programmers. If you have ever heard about Cucumber, you’ll be astonished that there is a very similar framework in Python called behave.
X. nose2.tools.such DSL
We introduce another style of BDD – executable specification written with nose2.tools.such plugin, a DSL in Python.
We also introduce nose2 tool to run unit tests and show how you configure it and enable nose2.tools.such plugin.
XI. Behaviour Driven Development
Behave Driven Development is an extension of TDD. After a short theoretical introduction, we show on a case study how you can use behave and nose2.tools.such with BDD. We also show how professional edition of PyCharm supports BDD and behave framework.
Przebieg współpracy
- Formularz. Wypełniasz formularz na dole strony.
- Bezpłatna konsultacja. Umawiamy się na bezpłatną i niezobowiązującą rozmowę online, która powinna zamknąć się w 50 minutach. Od pierwszego kontaktu obowiązuje pełne dochowanie poufności, w razie potrzeby możemy zacząć od podpisania NDA. Celem tej rozmowy jest dokładne omówienie Twojej sytuacji i potrzeb, tak abyśmy mogli w kolejnym kroku przygotować dla Państwa rozwiąznaie.
- Propozycja rozwiązania + kolejna konsultacja. Po konsultacji analizujemy Państwa sytuację i przygotowujemy indywidualną dla Państwa propozycję rozwiązania (szkolenie lub/i doradztwo). Tą propozycję omawiamy podczas kolejnej bezpłatnej konsultacji.
- Formalności. Podpisanie umowy i dokonanie płatności (przedpłaty). Termin szkolenia rezerwujemy z chwilą dokonania płatności.
- Próbka szkolenia. W razie potrzeby możemy poprzedzić główne szkolenie 60-minutową próbką szkolenia, aby mieli Państwo absolutną pewność, że warto współpracować.
- Szkolenie lub/i działania doradcze.
- Wsparcie poszkoleniowe – w ustalonym indywidualnie zakresie.
Opinie o trenerze

Very inspiring training. I really appreciate the way Chris managed to walk us through the complex world of machine learning using Python. Good course materials updated real time. Highly recommend.
Krzysztof Gębal
Finance Director at DNB Bank Polska S.A.

Well prepared training and reasonably passed knowledge, thanks to which we develop better services.
Arkadiusz Baraniecki
Infrastructure Team Manager at allegro.pl

Chris recently taught a four day class on Machine Learning with Python four our team. The class was very good with the right balance of theory and practice. I cannot think of a better way to give a four day class about such an extensive topic.
Nicolas Leveroni
Head of Krakow Product Control Analytics at HSBC
Więcej referencji znajdziesz tutaj.