4.4 out of 5
4.4
1458 reviews on Udemy

Automated Software Testing with Python

Learn about automated software testing with Python, BDD, Selenium WebDriver, and Postman, focusing on web applications
Instructor:
Jose Salvatierra
10,248 students enrolled
English [Auto-generated] More
Everything you need to know about automated software testing with Python (and how to enjoy testing, too!)
Common pitfalls and best practices when writing automated tests
How to write complete system tests using Python and tools like Postman
Automate your application testing by setting up a continuous integration pipeline using Travis CI
Browser-based acceptance testing using Behave and Selenium WebDriver

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!

1
Welcome to the course

The very first video of the course! An introduction to it, what we'll learn, and how we'll get there.

2
How to take this course

This short lecture welcomes you to the course and gives you a few suggestions on how to take the course. Short, but important!

3
A self-assessment

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.

4
Installing Python and PyCharm on Windows

This short guide tells you how to go about installing Python and PyCharm on a Windows computer.

5
Installing Python and PyCharm on OS X

This short guide tells you how to go about installing Python and PyCharm on a Mac computer.

A Full Python Refresher

1
Introduction to this section

Welcome to the Python refresher section! In this video we give a brief introduction to this section.

2
Access the code for this section here

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!

3
Variables in Python

In this video we look at variables in Python—the most fundamental building block of the Python language.

4
Variables
5
Solution to coding exercise: Variables

In this video we solve the previous coding exercise. Make sure to attempt the exercise yourself before watching this!

6
Methods in Python

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.

7
Methods and functions
8
Solution to coding exercise: Methods

In this video we solve the previous coding exercise. Make sure to attempt the exercise yourself before watching this!

9
Lists, tuples, and sets

In this video we look at collections in Python: lists, tuples, and sets. These allow us to store multiple values in the same variable.

10
List, tuple, and set operations

In this video we look at some of the things we can do with the collections list, tuple, and set in Python.

11
Advanced set operations
12
Lists, tuples, and sets
13
Solution to coding exercise: lists, tuples, sets
14
Loops in Python
15
If statements
16
Flow control—loops and ifs
17
Solution to coding exercise: flow control
18
A programming exercise for you
19
List comprehension
20
Dictionaries
21
Are dictionaries "things"?
22
Dictionaries and students
23
Solution to coding exercise: dictionaries
24
Objects in Python
25
A Student example
26
Classes and objects
27
Solution to coding exercise: classes and objects
28
@classmethod and @staticmethod
29
@classmethod and @staticmethod
30
Solution to coding exercise: @classmethod and @staticmethod
31
Inheritance in Object-Oriented Programming
32
*args and **kwargs
33
Passing functions as arguments
34
Decorators in Python
35
Advanced decorators
36
Conclusion of this section

Your first automated software test

1
Introduction to this section
2
Access the code for this section here
3
Setting up our project
4
Writing our first test
5
Testing dictionary equivalence
6
Writing blog tests and PyCharm run configurations
7
The __repr__ method, and intro to TDD
8
Integration tests and finishing the blog
9
Mocking, patching, and system tests
10
Patching the input method and returning values
11
Taking our patching further
12
The last few patches!
13
The TestCase setUp method
14
Conclusion of this section

Testing a Flask Endpoint

1
Introduction to this section
2
Access the code for this section here
3
Setting our project up

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.

4
Creating our Flask app

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!

5
Our first System test

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.

6
Refactoring our System Tests

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.

7
Conclusion of this section

REST API Testing, Part I

1
Introduction to this section
2
Access the code for this section here
3
A look at a REST API with Flask
4
Unit testing a REST API
5
Setting up our generic BaseTest
6
Integration testing a REST API
7
Conclusion of this section

REST API Testing, Part II

1
Introduction to this section
2
Access the code for this section here
3
Setting up our project

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.

4
Testing foreign key constraints with Python

In this video we look at testing foreign key constraints with Python, which is extremely useful when our applications rely on relational data.

5
Unit testing models and SQLAlchemy mappers

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!

6
Finishing our Store tests

In this video we finish our tests for the Store, and complete the testing of our more complex REST API with Python.

7
Conclusion of this section

System testing a REST API

1
Introduction to this section
2
Access the code for this section here
3
Setting project up and creating User model
4
Allowing users to log in
5
Writing our User tests
6
The setUpClass method in the BaseTest
7
Testing user registration
8
Finalising user System tests
9
Writing Store System tests
10
Writing our Item System tests and testing authentication
11
Conclusion of this section

System testing with Postman and Newman

1
Introduction to this section
2
Access the code and Postman files here
3
Introduction to Postman

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.

4
Our first Posman tests

In this video we write our first Postman test. These tests are written in JavaScript, but they are straightforward and very powerful.

5
Setting and clearing environment variables in Postman

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.

You can view and review the lecture materials indefinitely, like an on-demand channel.
Definitely! If you have an internet connection, courses on Udemy are available on any device at any time. If you don't have an internet connection, some instructors also let their students download course lectures. That's up to the instructor though, so make sure you get on their good side!
4.4
4.4 out of 5
1458 Ratings

Detailed Rating

Stars 5
782
Stars 4
501
Stars 3
139
Stars 2
16
Stars 1
20
ff7116166389131ea9823112ec3e0b9e
30-Day Money-Back Guarantee

Includes

12 hours on-demand video
13 articles
Full lifetime access
Access on mobile and TV
Certificate of Completion