Skip to content

Testing with Python

*****

Python is a de facto scripting language that is used for many tasks. If you encountered Python on your career path, but never had time to properly dive into testing and TDD with that, then this course is for you.

course logo

What's Inside

Module 1

  • Introduction and setup check.
  • Exercise 1: We start right away with coding exercise. The task is to code a complex firewall policy logic with some hints and skeleton code. No TDD, just code. 30 minutes will be not enough, but from the task description, most engineers will tell that it is doable in 30 minutes. After failure, we go into discussion mode.

Module 2

  • TDD cycle: red, green, refactor.
  • Overview of Python unittest library.
  • Exercise 2: Implement the same task with firewall policy, but using a TDD cycle by writing unit tests (with hints).
  • Looking at the test coverage.

Module 3

  • Overview of Python mocking libraries.
  • Exercise 3: Build on top of firewall policy logic and add integration with firewall log storage. Mock the storage and access logic.

Module 4

  • Clean code principles for Python.
  • Integration tests vs unit tests.
  • Introduction to ATDD and double feedback loop.
  • Overview of Docker and Python implementation of testcontainers.
  • Exercise 4: Implement integration tests with a real database for firewall log storage and query. Make sure they run in CI.

Module 5

  • Introduction into pair programming.
  • Overview of Python requests library.
  • Exercise 5: Split into pairs. Implement firewall management API with Flask from a template. Add HTTP API acceptance tests.

Module 6

  • Introduction into BDD.
  • Overview of Python behave library.
  • Exercise 6: Re-implement acceptance tests with the BDD approach.

Module 7

  • Introduction to performance testing.
  • Overview of Python faker library for test data generation.
  • Overview of Python locust library for the performance test suite.
  • Exercise 7: Implement a performance test suite for firewall components.

Who's This For

target-light

developers, software architects, technical project managers, system administrators.

What You Get

gem

Unique content - .

certificate

Certificate of attendance - you will get a shareable online certificate.

exam

Exam after the course - you may pass an optional 1-hour exam and get your score printed on the certificate.

video-call

Workshop happens online - join from the convenience of your office or home.

video-recording

Video recordings will be available after the course - you can revisit some topics later.

live

Live and interactive - you can ask questions in the chat or over audio and get live clarifications.

qa

Q&A session in the end of each day - you will to get answers to more complex questions in a 1-hour long Q&A session.

quiz

Quizzes and polls during the course - learning should be fun!

cloud-lab

Practical exercises with solutions - lots of simple and not-so-simple tasks to practice with during the course; Solutions will be provided afterwards.

home

Additional home work - for those who want to practice more after the course; Homework will be reviewed and supplemented by constructive feedback.

email

Lifetime e-mail support - you can get answers on anything related to the course content as well as advice based on your company specific situation.

Andrey Adamovich

trainer-lightAbout the trainer

Andrey works as a free-lance DevOps consultant offering his expertise in implementing DevOps initiatives, selecting automation tooling, switching to infrastructure-as-code and immutable infrastructure and constructing software delivery pipelines.

Ask a question

Pricing

Company

 8500per teamof up to 20 attendees
Book Now

Price includes all materials and cloud infrastructure usage.

If training workshop happens on client premises then trainer's traveling expenses will be added to the final price.

VAT charges may apply.

All training courses are a subject to the cancellation policy.

course logo