Welcome to the most comprehensive course on Automated Software Testing with Python on Udemy.
Testing automation doesn’t have to be painful. Software testing is an essential skill for any developer, and I’m here to help you truly understand all types of test automation with Python.
I’m Jose, software engineer and founder of Teclado. The focus of this course is on testing for the web—we’ll be working with REST APIs and web applications, and technologies such as unittest, Postman, and Selenium WebDriver.
What will you work with?
This course is jam packed with all the latest technologies for you to use professionally and in personal projects:
- The unittest library, Python’s standard automated software testing library;
- Mocking and patching, two essential tools to reduce dependencies when testing;
- unit, integration, system, and acceptance testing—all types of testing to have you fully covered;
- Postman for easy collaboration and testing while developing;
- Selenium WebDriver for automated browser tests;
- Git and Travis for continuous integration of your project.
Fundamental Software Testing Skills
We will cover every fundamental software testing skill that you need to know in order to get a job testing or to apply these skills in your existing projects.
From things like mocking and patching using the unittest library, which reduce dependencies and turn complex tests to simple ones; to looking at all types of testing: simple unit tests to large system tests and even customer acceptance tests.
The Testing Pyramid
The Testing Pyramid says you should have a lot of unit tests, slightly fewer integration tests, even fewer system tests, and as few acceptance tests as possible.
Throughout the program we work on this concept, making sure that we have full coverage of every component of our system with unit tests. Then we test the dependencies using integration tests. Finally, we cover the entire system and its assumptions using system tests. Of course, we’ll also look at what acceptance testing is, how we come up with acceptance tests, and some of the best ways to write acceptance tests for a web application using Behavior-Driven Development and Selenium WebDriver.
Automated Browser Testing with Selenium WebDriver
Selenium WebDriver is extremely powerful, particularly when coupled with the efficient and tried-and-tested approach recommended in this course. We’ll design our acceptance tests professionally—just the way you’d do at a software testing job. We’ll use page models, locators, and step definitions to structure the automated tests in a reusable way. The customers will be able to come up with acceptance tests that you can easily translate to code.
We’ll also learn about implicit and explicit waits with Selenium WebDriver and Python, a key concept to speed up runtime of your acceptance tests.
Continuous Integration
We also cover how you can take automated testing much further in your projects.
By implementing a Continuous Integration pipeline that runs your tests whenever you make any changes, you’ll have much higher quality in your projects and not let any pesky bugs pass you by. We’ll look at putting our projects in GitHub and liking the CI pipeline with them.
I’m really excited to guide you through this course!
Join me in this automated testing journey. I‘ll see you on the inside!
Welcome!
The very first video of the course! An introduction to it, what we'll learn, and how we'll get there.
This short lecture welcomes you to the course and gives you a few suggestions on how to take the course. Short, but important!
This important lecture contains a self-assessment that you can take at the start of the course. It'll help you gauge how much Python you know, and how much of the Python refresher section you can skip.
This short guide tells you how to go about installing Python and PyCharm on a Windows computer.
This short guide tells you how to go about installing Python and PyCharm on a Mac computer.
A Full Python Refresher
Welcome to the Python refresher section! In this video we give a brief introduction to this section.
This lecture has a link to all the Python code we'll write in this section. Use it to check your code as you write it, or to refresh your memory!
In this video we look at variables in Python—the most fundamental building block of the Python language.
In this video we solve the previous coding exercise. Make sure to attempt the exercise yourself before watching this!
In this video we look at methods in Python, which are names for blocks of code. We can then re-use them over and over again without having to re-write the code again.
In this video we solve the previous coding exercise. Make sure to attempt the exercise yourself before watching this!
In this video we look at collections in Python: lists, tuples, and sets. These allow us to store multiple values in the same variable.
In this video we look at some of the things we can do with the collections list, tuple, and set in Python.
Your first automated software test
Testing a Flask Endpoint
In this video we set up our Flask project so we can start writing System tests for it. We quickly go over setting up the project structure and installing required libraries.
In this video we create our Flask app and go over its different parts. A quick overview of Flask and how we'll be testing our very first endpoint!
In this video we write our first system test, testing the app from end to end—as if we were a user.
System testing is extremely powerful and useful when testing web applications, but it can be dangerous and slow if overused.
In this video we look at refactoring our System tests so that our code is nicer and easier to maintain. Throughout the rest of the course we'll be writing tests in this refactored fashion.
REST API Testing, Part I
REST API Testing, Part II
In this video we look at our more complex REST API with Flask, and explain how it has evolved since the last section. We add Stores and relationships between our various models with SQLAlchemy.
In this video we look at testing foreign key constraints with Python, which is extremely useful when our applications rely on relational data.
In this video we look at unit testing a more complex REST API, and how the SQLAlchemy mappers work in a Python application. Avoid some common mistakes!
In this video we finish our tests for the Store, and complete the testing of our more complex REST API with Python.
System testing a REST API
System testing with Postman and Newman
In this video we look at Postman, a great tool we can use to send requests to our API and make some checks and tests on the response.
In this video we write our first Postman test. These tests are written in JavaScript, but they are straightforward and very powerful.
In this video we look at the power of environment variables in Postman to share data across requests and responses. Setting and clearing environment variables programmatically will make our tests much more capable.