Skip to main content
CF

API Testing with Python 3 & PyTest, Backend Automation 2022

13h 59m 14s
English
Paid

Master API Testing with Python and PyTest

Elevate your software testing skills by learning how to use Python to test the back-end of web services or APIs. Engage with industry-standard eCommerce RESTful APIs to practice and master testing using the Python programming language. Build an extendable and scalable framework with one of the most popular testing tools, PyTest, that can also integrate front-end (Selenium WebDriver) testing. The competencies acquired here are crucial for any web services testing professional.

Bonus: SQL Crash Course

Expand your technical skill set with our SQL Crash Course. Learn to effectively read from and write to databases using SQL, focusing on MySQL for our principal test site. SQL is a critical skill for any test engineer, whether manual or automation, providing the foundational knowledge you need to excel in this field.

The crash course is concise and targeted, addressing only the topics directly related to automation. This is a valuable addition to your resume and an asset in your interview process.

Enhance Your Career Prospects

Gaining proficiency in API testing can significantly accelerate your success in the quality assurance (QA) domain, especially if you're new to the field or seeking career advancement. Python is a leading language in software testing, and mastering it for API/Backend testing broadens your professional opportunities.

Additionally, the tools covered in this course are well-regarded in the industry and add immense value to your resume. These tools are versatile and applicable to various tasks beyond API testing, enhancing your overall technical portfolio.

Post-course completion, you'll be equipped to handle job interviews with confidence as if you possess substantial API testing experience, along with access to a plethora of APIs for practice.

Course Content and Overview

This comprehensive course involves setting up an eCommerce application locally. We will equip your machine with a package that includes both a web server and a database, followed by the installation of WordPress and essential plugins to simulate an eCommerce environment. This setup provides us with a rich source of APIs for testing.

Gain hands-on experience with database interactions as you test API data against robust database queries. We'll guide you in designing an effectively structured test framework, using Python for thorough verification procedures.

The course also demonstrates how to leverage the Python test runner tool, pytest, explaining its pivotal role in automation testing workflows.

About the Author: Udemy

Udemy thumbnail

Udemy is the largest open marketplace for online courses on the internet. Founded in 2010 by Eren Bali, Oktay Caglar, and Gagan Biyani and headquartered in San Francisco, the company went public on the Nasdaq in 2021 under the ticker UDMY. The platform hosts well over two hundred thousand courses across software development, IT and cloud, data science, design, business, marketing, and creative skills, taught by tens of thousands of independent instructors. Roughly seventy million learners use it worldwide, and the corporate arm — Udemy Business — supplies a curated subset of that catalog to enterprise customers.

Because Udemy is a marketplace rather than a single editorial publisher, the catalog is uneven by design. The strongest material lives in the long-form, project-based courses authored by working engineers — full-stack JavaScript, React, Node.js, Python data science, AWS, Docker and Kubernetes, mobile development with Flutter and React Native, and cloud certification preparation. The CourseFlix listing under this source is the slice of that catalog that has been mirrored here for offline-friendly viewing, organized by topic and updated as new releases land. Pricing on Udemy itself swings dramatically with the site's near-permanent sales, which is why the platform is best treated as a deep reference catalog: pick instructors with strong reviews and a track record of updating their material rather than buying on the headline price alone.

Watch Online 90 lessons

This is a demo lesson (10:00 remaining)

You can watch up to 10 minutes for free. Subscribe to unlock all 90 lessons in this course and access 10,000+ hours of premium content across all courses.

View Pricing
0:00
/
#1: Welcome To The Course
All Course Lessons (90)
#Lesson TitleDurationAccess
1
Welcome To The Course Demo
03:05
2
Table Of Content
04:05
3
Preview of End Result
05:41
4
About The Test Site and Ecommerce API
03:16
5
Intro to Installation and Setup Section
03:49
6
Installing Python On Mac
04:19
7
Installing Python On Windows
09:22
8
How to Use Virtual Environment
10:11
9
Create Virtual Environment For The Course
06:13
10
Install IDE (PyCharm)
07:06
11
PyCharm Project & Virtual Environment
05:57
12
Options To Run WordPress
06:30
13
Running WordPress with MAMP
17:04
14
Running WordPress with "Local"
09:48
15
Install Plugin "WooCommerce"
04:52
16
Adding Sample Products to the Site
03:38
17
Setup and Verify API with Postman and Python
13:41
18
Install MySQL WorkBench & Connect to Database
08:12
19
Introduction to PyTest
11:41
20
Selecting Tests By Markers (Tags)
12:36
21
Setup & Teardown (fixtures)
09:13
22
PyTest HTML Report
05:46
23
How To Use The Provided Code
16:59
24
Project Structure Overview
10:57
25
TCID-29 - Discussion - "create a customer" endpoint
09:40
26
TCID-29 - Design Test Code Template
11:40
27
Helper - Email & Password Generator (TCID-29)
12:01
28
Helper - Crete Customer (TCID-29)
12:08
29
Helper - 'POST' request (TCID-29)
14:44
30
Authenticate our API call
10:24
31
Helper - Credentials
17:23
32
TCID-29 Verify 'Create Customer' API Response
10:02
33
Setting Environment Variables
05:44
34
Customers DAO
04:42
35
Helper - Database Connect & SQL
18:27
36
TCID-29 Verify Database
06:53
37
TCID-30 - Discussion - List All Customers Endpoint
01:21
38
TCID-30 - List All Customers (GET Call)
10:42
39
TCID-47 - Create Customer Existing Email (negative test)
19:28
40
Run All Customers Test Cases
03:33
41
Assignment - Automate TCID-24 (Get All Products)
01:34
42
TCID-24 Get All Products - Implementation
09:15
43
TCID-25 Get Product By ID
16:24
44
TCID-26 Create Simple Product
15:58
45
TCID-51-1 List Product With Filter "after"
18:59
46
TCID-51-2 List Product With Filter "after" - db verification
14:16
47
TCID-51-3 List Product With Filter "after" - more pages
08:55
48
WooCommerce Python Library Intro
15:08
49
TCID-48-1 Place Guest Order - Discussion
02:30
50
TCID-48-2 Place Guest Order - Read Payload From File
15:26
51
TCID-48-3 Place Guest Order - Make The Call
11:42
52
TCID-48-4 Place Guest Order -Validate Response
05:36
53
TCID-48-5 Place Guest Order -Validate db
18:03
54
TCID-49 Place Order With New Customer
17:01
55
Setup Example with TCID-49
11:04
56
Use Configs for Database Connections
19:48
57
TCID-55-1 Update Order Status - Cancelled
16:30
58
TCID-55-2 Update Order Status - Cancelled
06:36
59
TCID-55,56,57 Parametrization
08:08
60
TCID-58 Update Order Status - Invalid Status
10:18
61
TCID-59 Update Order - "customer_note"
06:50
62
Docker Section Introduction
01:27
63
Create Dockerfile & Build Image
13:18
64
Start Container and Try Test Run - unsuccessful
08:43
65
Connect to Database From Container
06:18
66
Use Docker Volumes To Avoid Image Rebuild
13:24
67
Make API Call from Container
08:14
68
Run Tests From Outside Container
03:23
69
Wrapper Script To Run Tests In Container
11:55
70
Color Output From Docker Run
01:35
71
Using Debugger (pdb) With Docker
02:26
72
Timestamp The Report
04:24
73
Docker Section Summary
02:47
74
Introduction to the SQL Crash Course
02:50
75
Introduction to SQL
08:16
76
Setup Database and Data
12:48
77
SQL SELECT Query (Reading Data)
11:51
78
SQL SELECT Query Continued
11:26
79
SQL SELECT Query Continued 2
08:41
80
SQL IN Clause
07:32
81
SQL SELECT Sub-Query
10:49
82
SQL LIKE Clause
07:31
83
Intro to SQL JOIN
08:41
84
SQL JOIN
08:53
85
SQL LEFT JOIN
09:14
86
SQL Special Functions
14:12
87
SQL INSERT INTO
12:20
88
SQL CREATE TABLE
06:47
89
SQL DROP and TRUNCATE
04:17
90
SQL Crash Course Conclusion
02:18
Unlock unlimited learning

Get instant access to all 89 lessons in this course, plus thousands of other premium courses. One subscription, unlimited knowledge.

Learn more about subscription

Related courses

Frequently asked questions

What prerequisites are needed to enroll in this API testing course?
This course requires a basic understanding of Python programming as you will be using it extensively for testing APIs. Familiarity with general software testing concepts will also be beneficial. No prior experience with PyTest is necessary, as the course provides an introduction to this testing tool. Additionally, basic knowledge of SQL will be helpful, particularly for the SQL Crash Course component.
What types of projects will I work on during the course?
Participants will engage with industry-standard eCommerce RESTful APIs and will build an extendable and scalable testing framework using PyTest. One of the key projects involves automating test cases for customer management and product listings in a WooCommerce environment. The course also includes exercises like creating customers, placing orders, and verifying database entries using SQL.
Who is the target audience for this course?
The course is designed for software testers who want to expand their skills into API and backend testing using Python and PyTest. It is suitable for both beginners in the field of API testing and experienced testers aiming to enhance their automation capabilities. Test engineers looking to incorporate SQL in automation testing will also find value in the SQL Crash Course.
How does this course compare to other API testing courses in terms of scope?
This course offers a comprehensive approach to API testing by not only covering Python and PyTest but also integrating SQL skills essential for database verification. It provides practical, hands-on experience with real-world eCommerce APIs, focusing on both positive and negative test cases. The SQL Crash Course is an added advantage, allowing students to understand database interactions which are not typically covered in similar courses.
What specific tools and platforms will I learn to use in this course?
Participants will learn to use Python for scripting, PyTest for testing, and SQL for database interactions. The course covers the installation and setup of Python on different operating systems, creating virtual environments, and using PyCharm as an IDE. Additionally, students will work with MySQL WorkBench for database connections and Postman for initial API verification.
What topics are not covered in this course?
The course does not cover front-end testing in detail, although it mentions the possibility of integrating Selenium WebDriver with the framework. It also does not delve into advanced database topics beyond the essentials required for test automation. Moreover, there is no focus on non-RESTful APIs or other testing frameworks outside of PyTest.
What is the expected time commitment for completing the course?
The course consists of 90 lessons, and the runtime information is not specified in the course data. However, given the breadth of topics covered, including the SQL Crash Course and multiple hands-on projects, students should be prepared to invest several weeks if studying part-time. The exact time will depend on prior experience and the pace at which each student learns and practices the material.