Automated Software Testing with Python

Learn about automated software testing with Python, BDD, Selenium WebDriver, and Postman, focusing on web applications

4.63 (5202 reviews)
Udemy
platform
English
language
Software Testing
category
36,584
students
13.5 hours
content
Mar 2024
last update
$99.99
regular price

What you will learn

Everything you need to know about automated software testing with Python (and how to enjoy testing, too!)

Avoid common pitfalls and implement best practices when writing automated tests

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

Description

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, a 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.

Fear not though, after going through this course, you'll be able to take your new testing knowledge and apply it to any project, even non-web projects!

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 course 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 the 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!

Content

Welcome!

How to take this course
A self-assessment
Installing Python and PyCharm on Windows
Installing Python and PyCharm on OS X

A Full Python Refresher

Introduction to this section
Access the code for this section here
Variables in Python
Variables
Solution to coding exercise: Variables
String formatting in Python
Getting user input
Writing our first Python app
Lists, tuples, and sets
Advanced set operations
Lists, tuples, and sets
Solution to coding exercise: lists, tuples, sets
Booleans in Python
If statements
The 'in' keyword in Python
If statements with the 'in' keyword
Loops in Python
Flow control—loops and ifs
Solution to coding exercise: flow control
List comprehensions in Python
Dictionaries
Destructuring variables
Functions in Python
Function arguments and parameters
Default parameter values
Functions returning values
Functions
Solution to coding exercise: Functions
Lambda functions in Python
Dictionary comprehensions
Dictionaries and students
Solution to coding exercise: dictionaries
Unpacking arguments
Unpacking keyword arguments
Object-Oriented Programming in Python
Magic methods: __str__ and __repr__
Classes and objects
Solution to coding exercise: classes and objects
@classmethod and @staticmethod
@classmethod and @staticmethod
Solution to coding exercise: @classmethod and @staticmethod
Class inheritance
Class composition
Type hinting in Python 3.5+
Imports in Python
Relative imports in Python
Errors in Python
Custom error classes
First-class functions
Simple decorators in Python
The 'at' syntax for decorators
Decorating functions with parameters
Decorators with parameters
Mutability in Python
Mutable default parameters (and why they're a bad idea)
Conclusion of this section

Your first automated software test

Introduction to this section
Access the code for this section here
Setting up our project
Writing our first test
Testing dictionary equivalence
Writing blog tests and PyCharm run configurations
The __repr__ method, and intro to TDD
Integration tests and finishing the blog
Mocking, patching, and system tests
Patching the input method and returning values
Taking our patching further
The last few patches!
The TestCase setUp method
Conclusion of this section

Testing a Flask Endpoint

Introduction to this section
Access the code for this section here
Setting our project up
Creating our Flask app
Our first System test
Refactoring our System Tests
Conclusion of this section

REST API Testing, Part I

Introduction to this section
Access the code for this section here
A look at a REST API with Flask
Unit testing a REST API
Setting up our generic BaseTest
Integration testing a REST API
Conclusion of this section

REST API Testing, Part II

Introduction to this section
Access the code for this section here
Setting up our project
Testing foreign key constraints with Python
Unit testing models and SQLAlchemy mappers
Finishing our Store tests
Conclusion of this section

System testing a REST API

Introduction to this section
Access the code for this section here
Setting project up and creating User model
Allowing users to log in
Writing our User tests
The setUpClass method in the BaseTest
Testing user registration
Finalising user System tests
Writing Store System tests
Writing our Item System tests and testing authentication
Conclusion of this section

System testing with Postman and Newman

Introduction to this section
Access the code and Postman files here
Introduction to Postman
Our first Posman tests
Setting and clearing environment variables in Postman
Running a test folder in Postman
Advanced PyCharm run configurations
Installing Node and Newman
Multirun in PyCharm—Running app and tests together
Conclusion of this section

Continuous Integration with Travis CI

Introduction to this section
The code for this section
Installing Git
What is a Git repository?
A local Git workflow
GitHub and remote repositories
Adding our project to GitHub
What is Travis CI?
Adding our repository to Travis
The Travis config file and running tests
Adding our test badge to the Readme
Conclusion of this section

Acceptance testing and browser automation with Selenium

Introduction to this section
What is acceptance testing?
Introduction to our project
Our first acceptance test step
Getting the Chrome webdriver
Verifying everything works
Finishing our first test
Re-using steps with the regular expression matcher
Our first content test
Page locators and models
The blog page
Using pages in navigation
Don't over-generalise tests!
Waits and timeouts with Selenium
Debugging acceptance tests in PyCharm
Our final complex scenario
Filling in forms with Selenium
Access the final code of this section here
Conclusion of this section

Bonus Material

Bonus lecture: other courses and next steps

Screenshots

Automated Software Testing with Python - Screenshot_01Automated Software Testing with Python - Screenshot_02Automated Software Testing with Python - Screenshot_03Automated Software Testing with Python - Screenshot_04

Reviews

Pål
November 8, 2023
José was nice to listen to and the pace was good. What lower the rating from 5 to 3 was that some of the code used was no longer runnable in october 2023. You needed to adapt what versions of python and flask etc. to use to be able to run the code. The big problem was that this vital information was not clear in the course description. You had to dig through the QA-section to find out the versions needed for the code to run.
Charles
October 30, 2023
Instructor is clear and walks through the nuance. Explains the “what” and the “why” at the right pace. Allows me to set the pace based on what already know (or don’t :-) )
Lawrence
September 21, 2023
The instructor is amazing and highly skilled, and his teaching style is easy to understand. The course content closely mirrors real-world scenarios, making the learning experience highly enjoyable.
Tatsiana
September 5, 2023
It is definitely is a good match for me as I am learning some new features of Python I have never heard before. Thanks a lot! :)
Dominik
June 18, 2023
I found this course well organised and great for seeing software testing from different angles and with different tools. I'd love to see this course been updated as I ran into some issues with dependencies of needed packages.
Taras
June 12, 2023
I found section 3 is little too complicated. Namely to rapid conception and complexity increase. Practically I wold suggest few things: - split it on smaller ( not mandatory interconnected chunks). - to set for each conception practical exercise.
Shalya
June 2, 2023
Kindly make more presentable with the help of slides/videos/pictures on respective topics. This would help to develop initial understanding on the topic before going to the code.
Shani
May 28, 2023
very crisp and clear, straight forwarded and understandable also for people who have no knowledge in python
Ruslan
May 16, 2023
I like the way the tutor is explaining: - it's quite fast (for me as advanced learner) - it's enthusiastic (that is engaging) - it's clear - and what is really important for me it's understandable English The reason why I put 3.5 stars is below: 1. For those who is looking for QA Engineer course - it's not for QA Engineers or testers, I'd say it's mostly for developers. 2. Regarding API testing it's very Flask specific, which is actually not pointed anywhere - neither the title nor the course description, so for me there was no way to understand it's only relevant to Flask developers. So as a result there is no a lot of API testing "out of the box", it's exactly about testing Flask API "in the box", close to the code of the application and using Flask tools.
M
April 6, 2023
Perfect. Section 2 (A Full Python Refresher) alone was worth the money, and it's going to get even better.
Luis
February 22, 2023
Seems to be I took the wrong course, looking for QA Automation, this is more for developers, this course may be better for a developer, to do couple things
Frances
February 3, 2023
Teacher is very engaging and knowledgeable. Having this refresher prior to the learning the system test at first was frustrating as I couldn't skip over lessons but after listening there was a lot of things I missed in my prior knowledge. The format of this class is great!
Jorge
January 29, 2023
Automated testing is a super power! This is by far the best "I didn't knew this existed" moment in my life.
Timo
January 17, 2023
I had to implement some changes to import sentences. Instructions to edit configurations for running tests were unclear. Video codes files and the files in codes directory were different, which confused me.
Jakub
November 15, 2022
It's definitely not for beginners and if Jose is gonna reply that it wasnt meant to be, then I don't understand why half of the course is one big section about Python basics. I'm a bit experienced in Python, but in section 7 I got lost due to the lack of knowledge of SQLAlchemy and API generally. If you say you don't have to fully understand how these things work, then you can't be more wrong. You have to understand how something work in order to test it, lol. I can follow up with the coding Jose does, but at the end it's useless to just follow someones code and I won't be able to write my own advanced tests of a given API, because I don't know how it works. Nice, this course is really dissapointing. And some update of couple of obsolete sections would be nice as well, because since the time this course was publish, a lot of things have changed

Charts

Price

Automated Software Testing with Python - Price chart

Rating

Automated Software Testing with Python - Ratings chart

Enrollment distribution

Automated Software Testing with Python - Distribution chart
1319746
udemy ID
8/12/2017
course created date
9/12/2019
course indexed date
Bot
course submited by