Skip to main content

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
By connecting students all over the world to the best instructors, Udemy is helping individuals reach their goals and pursue their dreams. Udemy is the leading global marketplace for teaching and learning, connecting millions of students to the skills they need to succeed. Udemy helps organizations of all kinds prepare for the ever-evolving future of work. Our curated collection of top-rated business and technical courses gives companies, governments, and nonprofits the power to develop in-house expertise and satisfy employees’ hunger for learning and development.

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