Backend / API Testing with Python
4.0 (98 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
2,752 students enrolled
Wishlisted Wishlist

Please confirm that you want to add Backend / API Testing with Python to your Wishlist.

Add to Wishlist

Backend / API Testing with Python

Learn to to use Python to write automated backend / API tests, using real working APIs.
Bestselling
4.0 (98 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
2,752 students enrolled
Created by Admas Kinfu
Last updated 2/2017
English
Learn Fest Sale
Current price: $10 Original price: $40 Discount: 75% off
3 days left at this price!
30-Day Money-Back Guarantee
Includes:
  • 3.5 hours on-demand video
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
What Will I Learn?
  • Understand what API testing is
  • Be able to write automated API tests using Python
  • Learn different tricks and methods to use while testing
  • Learn how test runner tool is used
View Curriculum
Requirements
  • Have basic knowledge of Python programming language
  • Have basic knowledge of software testing
Description

Course Description

Learn how to use Python to test the back-end of web services or APIs. We use industry standard real eCommerce API to practice testing using Python programming language.


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.


What am I going to get from this course?

  • 35 + lectures (continuously adding more examples)
  • Plenty of APIs (endpoints) for you to practice with beyond this class
  • Enough material and examples to be able to create a project and maintain a GitHub repo
  • Industry standard tools to add to your resume.
    • Like
      • MySQL Workbench
      • AMPPS (package with Apache, MySQL, PHP, ....)
      • WordPress
      • WooCommerce
Who is the target audience?
  • Anyone looking to learn automation Backend/API testing
  • Anyone that already know basic Python and want to learn Backend/API testing
  • Students with experiance in Backend/API testing should NOT take this course
Students Who Viewed This Course Also Viewed
Curriculum For This Course
Expand All 36 Lectures Collapse All 36 Lectures 03:40:33
+
Introduction to the course
1 Lecture 02:43
+
Prepare Our Tools
6 Lectures 25:41

Install webserver and database on our local machine (AMPPS)
03:51

Installing WordPress on local machine
04:20

Installing WooCommerce (our e-commerce) Plugin (key and secreate)
02:40

Installing WooCommerce Python wrapper. This module enables us to use Python to make requests to the WooCommerce API. We will use 'pip' to install the package.

Installing WooCommerce Python Client
01:58

Installing MySQL WorkBench
06:51
+
WooCommerce Settings and Documentation
2 Lectures 10:12
Configuring WooCommerce API
05:16

+
Test Structure and Organization
2 Lectures 06:16
Project Structure
02:54

Create our structure
03:22
+
Custom tools (scripts we will use for DB and API)
4 Lectures 22:59

In this lecture we will create a class that will authenticate and make requests to the API. We will use methods of this call though out the course to make the request. We make a simple test method to test our class and our authentication.

REST API Module: Create ‘class’ and test the API
05:07

In this video we add to function to our API class. The two methods are used to make 'POST' and 'GET' Rest requests. We will be using these two functions throughout the course.

REST API Module: ‘POST’ and ‘GET’ methods
06:01

DB Connection Module: connect and ‘SELECT’ statement
07:57

DB Connection Module: ‘UPDATE’ statement
03:54
+
TEST CASES
10 Lectures 01:23:02

In this video we look at what the 'products' endpoint does, what the payload looks like and what the response looks like. We will look at the official documentation.

PRODUCTS endpoint > introduction to the 'products' endpoint
02:53

In this video we will create the payload for the 'products' end point and we make the API call. The 'products' endpoint creates a new product in the database.

Preview 10:43

We continue to look at positive test case to create product. We made the API call on the last video, and on this video we verify the response. We compare the values in the response with the values in the payload for the call.

PRODUCTS endpoint > Positive TC-1 : verify the response
11:22

Once the product is created using the API, it is important to verify that it is actually recorded in the database. In this video we look at the product in the database using MySql Workbench. We will write the query we need to get the data. On the next video we will use this query to verify the data with Python.

PRODUCTS endpoint > Quick manual check the db for the created product
04:47

In this video we write a test function that will query the database for a product, and compares the information in the database with the expected information. The expected information is the information we used in the payload when we created the product.

Preview 09:20

PRODUCTS endpoint > Negative TC-1: empty payload
13:48

PRODUCTS endpoint > Negative TC-2: missing ‘title’ parameter
09:41

PRODUCTS endpoint > Negative TC-3: empty string for ‘title’ parameter
05:21

PRODUCTS endpoint > Negative TC: verifications function for negative test
09:26

PRODUCTS endpoint > Negative TC-3 continue: empty string for ‘title’ parameter
05:41
+
TEST RUNNER TOOL “PY.TEST”
2 Lectures 15:31

Run "products" tests with "py.test"
06:12
+
"CUSTOMERS" endpoint test (API to create new customer)
9 Lectures 54:09
CUSTOMERS endpoint > Intro to ‘customers’ endpoint
02:23

CUSTOMERS endpoint > create random user information
05:23


CUSTOMERS endpoint > positive test, verify API response
07:01

We will use MySQL Workbench to write SQL query to get user information from database manually. Later we will use the SQL in our Python code to get the information.

CUSTOMERS endpoint > SQL to verify customer in db
05:16

CUSTOMERS endpoint > function to get customer info from db
09:19

CUSTOMERS endpoint > create helper module, move random generator function
02:32

CUSTOMERS endpoint > Positive TC verify customer created in db (with assert)
09:14

CUSTOMERS endpoint > Positive TC verify customer created in db (with if-else)
08:50
About the Instructor
Admas Kinfu
4.2 Average rating
329 Reviews
5,597 Students
3 Courses
QA Automation Engineer

With 7+ years of overall engineering experience I have found my passion in software testing automation and Python has become my favorite tool to work with. I graduated with a MS degree in Mechanical Engineering from San Jose State University, and got into the IT field of software testing automation after graduation. I love to teach and learn as well. I hope to help students grow fast and advance in the field of software testing and automation.