API Testing with Python 3 & PyTest, Backend Automation 2022
Learn how to use Python to test the back-end of web services or APIs. We use industry standard real eCommerce RESTful API to practice testing using Python programming language. We will build a framework using one of the most popular testing tools PyTest. The framework we will build will be extendable and scalable to be able to include frontend (Selenium WebDriver) testing. The skills learned here are used in any Web Serivces testing.
More
BONUS: SQL Crash Course
You will learn how to use SQL to read and write to/from databases. We will use MySQL for our main test site so we will use the same database to learn SQL. SQL (sequel) is critical skill for any test engineer (manual or automation needs to know basic SQL).
The crash course in SQL is short and precise. Topics only directly related to automation are covered. Great addition to your resume and interview process.
Critical addition to your resume
If you are getting into the QA world or you are looking to advance your career, having API testing skill will accelerate your success. Python is one of the most popular languages to use in software testing, and knowing how to use it for API/Backend testing will expand your pool of possibilities.
In addition to using Python for API/Backend testing, the tools we will use are great addition to your resume. We will be using industry standard tools that can be applied to several tasks beyond API testing.
After completion of this course you will be able to go through interview as if you have API testing experience. You will also have plenty of APIs to test and practice.
Content and Overview
In this course we will spend some time creating an eCommerce application on our local machine. We will install a package that includes web server and database. Using this package we will install WordPress and install necessary plugins to make it an eCommerce application. The eCommerce application gives us all the APIs we will test.
We have access to the database so we will test API data against the database. We will create a efficiently structured test framework and learn how to use Python to perform our verification.
We will also learn how to use a Python test runner tool "pytest" see why test runner tools are critical for automation testing.
Watch Online API Testing with Python 3 & PyTest, Backend Automation 2022
# | Title | Duration |
---|---|---|
1 | Welcome To The Course | 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 |