
Master Python unit testing by using the standard unittest framework to write and run tests, organize fixtures, discovery, and test suites, and distinguish unit from integration tests.
Install and configure PyCharm on Windows, create a new Python project, set up a virtual environment, choose a base interpreter, add packages, and run code from the IDE.
Learn to test a simple calculator app, the application under test, by validating addition, subtraction, multiplication, and division. Observe the expected results and practice writing tests for the app.
Learn to set up Python unit tests with the unittest framework, organize test packages for a calculator app, and run tests from PyCharm or the terminal, generating JUnit-style reports.
Use fixtures in Python unit tests to prepare and cleanup resources—like database connections or files—with setup and teardown at method and class levels. Streamline test organization and efficiency.
learn how to run Python unit tests from the Windows command prompt using the unittest framework, including test discovery, module and class selection, and activating virtual environments.
Learn how to use mock objects and test doubles to simulate a calculator class in unit tests, configure return values, and verify behavior without real implementations.
Learn to use mock objects and test doubles to test an employee class, count object creation, and validate code paths for low, in-between, and high counts.
Learn to write Python unit tests with the unittest framework using assertions to validate values, types, and exceptions, including equals, not equals, almost equal, greater, and raises.
Ref: https://pypi.org/project/parameterized/
leverage class-level parameterization to feed multiple data sets into tests, running ad and subtraction across rows, with setup initializing values and enabling easy extension to multiply or divide.
Compare unit test and pytest, install pytest, run tests with pytest, and generate html reports to share test results and understand fixtures and basic usage.
Learn to run Python unit tests with Jenkins as a local CI/CD server, configure plugins like Shining Panda, and publish JUnit test result reports.
Master Python unit testing by building a calculator app, organizing tests and fixtures, exploring test discovery, assertions and mocks, and running tests with Jenkins.
Learn python unit testing for a flask app in PyCharm, write model tests with mocks, and distinguish unit tests from integration and end-to-end tests.
Please download the zipped application, before starting the video session.
Thank You!
Explore a Python Flask recipe app that stores data in a lightweight SQLite database, with routes for register and login, plus unit and integration tests and a database browser workflow.
Learn to write unit tests for the app's model layer in a Flask environment, validating attributes, passwords, and email behavior, while preparing to mock SQLAlchemy queries.
Learn to write unit tests for app components using the mock library, covering get all users, get user by email, and user count, with model and database mocks.
Learn to set up a public GitHub repository, configure Jenkins continuous integration, and run automated tests that pull code and notify developers on failures.
Explore how Git and GitHub enable version control and collaboration, pull and push changes from GitHub, and manage project files with commands and web interfaces.
Install git for Windows and verify installation with Git Bash or Windows Command Prompt, then create a GitHub account on the free plan and start a repository.
Discover how Git, a distributed version control system, manages a three-zone workflow—working directory, staging area, and repository—using status, add, commit, and log commands for local and remote repositories.
Master remote collaboration with Git by cloning repositories, syncing with origin, pulling updates, reviewing logs, and pushing changes to the master branch.
URL for Code Repo: https://github.com/kss7/UdemyFlaskAppUTest
URL for Code Repo: https://github.com/kss7/UdemyFlaskAppUTest
Creating a Jenkins Job to pull down code from Cloud based GitHub Repo and execute Unit tests. We will be using the same test runner i.e. pytest.
Link To Linux SCL: https://www.softwarecollections.org/en/scls/rhscl/rh-python36/
Review the essentials of Python testing 101 and finalize your understanding with the course's conclusion.
Install Python 3 on Windows by downloading the 64-bit installer from python.org, choosing custom installation, and configuring environment variables and PATH, then manage multiple versions and use virtual environments.
Install Jenkins on Windows from the official site, run the setup wizard, install plugins, create the first admin user, and access Jenkins in your browser to manage CI/CD jobs.
Welcome to Python Testing 101 - Unit Testing Python code with Python Unittest framework.
Unit testing is a software testing methodology wherein the individual components or parts of the program, called units, are tested independently with all the required dependencies. Unit testing is mostly done by developers, who write the programs for the units. In most of the software projects, unit testing is part of a formal process of development with proper schedule and or efforts allocated for writing unit tests.
The course lets you get your hands dirty with the basic building blocks in testing, which are unit tests. Here you will be taken through what a unit test is, the basic syntax, and examples of a simple unit test.
Then, you will learn about the methods available to use in unit testing and the various tools available to help in running and debugging your tests. You also will learn about use of mocks and patching, which helps you to isolate the code you are interested in testing (your “units”), and simulate responses from other parts of the system or libraries.
This course will help you master the fundamentals of Unit testing of Python project. It teaches you various techniques for writing unit tests in Python and how to execute them efficiently, and find the bugs before your users do!
We will be using Python Unittest framework which comes with Python standard library and it assumes that you have minimal prior experience with Python coding.
You'll learn how to assert parts of your tests, how to discover the tests, and make tests easier to read and manage. Throughout the course you will see lots of unit test code examples in Python.
Some of the interesting topics covered in the course are:
Create Project in Pycharm with Virtual Env
Unittest Fixtures & Test Discovery
Using Mock and Test Doubles
Pytest as Test Runner and generating nice reports
Jenkins to run and share the test reports
Parameterized Tests
Writing unittest for a Real, Working Application
Thank you and see you in this course.