Playwright with Python #31 - Data-Driven API Testing Using CSV File | Stop Hardcoding Payloads!
Learn Playwright Python API testing with CSV data-driven approach! In this tutorial, master how to read CSV files in Python and dynamically create test paylo...

Testing Funda by Zeeshan Asghar
79 views โข Jun 11, 2026

About this video
Learn Playwright Python API testing with CSV data-driven approach! In this tutorial, master how to read CSV files in Python and dynamically create test payloads for robust automation.
๐ฏ In this video, you'll learn how to make your API automation tests truly data-driven by reading user data directly from a CSV file instead of using static payloads. We'll write a custom Python function using the csv module's DictReader to convert CSV data into a list of dictionaries, then loop through each record to dynamically build request payloads for the create user API.
This is a must-know skill for QA engineers and automation testers โ data-driven testing is widely used in real-world projects to test multiple scenarios efficiently without duplicating code.
๐ KEY TOPICS COVERED:
Reading CSV files using Python's csv module
Creating a custom read_users function with DictReader
Looping through CSV records to build dynamic payloads
Mapping CSV columns (name, email, gender, status) to API payload fields
Running data-driven tests across multiple records
Validating assertions for each CSV row
โฑ๏ธ TIMESTAMPS:
00:00 Introduction & Recap of Previous Tutorial
00:25 Reviewing the Previous Static Payload Approach
00:42 Plan: Reading Data from CSV File
00:59 Exploring the users.csv File Structure
01:24 Importing the CSV Module
01:48 Creating the read_users Function
02:23 Opening the CSV File in Read Mode
03:14 Returning Data as a List Using DictReader
04:07 Calling read_users and Passing the File Path
05:07 Looping Through CSV Data to Build Payload
06:06 Mapping CSV Fields to Payload (name, email, gender, status)
07:18 Running the Data-Driven Test
07:50 Test Results Across Multiple CSV Records
๐ข If this tutorial helped you, hit LIKE, SUBSCRIBE, and drop a COMMENT below! Turn on notifications so you never miss an automation testing tutorial. Your support helps us bring more career-boosting content for QA engineers and automation testers!
#playwrightpython #datadriventesting #automationtesting #playwrighttutorial #csvtesting #apitestingtutorial #qatestingjobs #pythonautomation #softwaretesting #learncoding #playwrightapi #pythontutorial #qaengineer #apitesting #testautomation #csvfilereading #pythonprogramming #automationtester #codingtutorial #techeducation
๐ Subscribe for FREE Software Testing Tutorials โ https://www.youtube.com/c/TestingFunda
==================================
๐ WHAT YOU'LL LEARN ON THIS CHANNEL
==================================
โ Manual & Automation Testing
โ Selenium, Cypress, Playwright & Appium
โ API Testing with Postman
โ Performance Testing with JMeter
โ Java & Python for Testers
โ Agile, SDLC, STLC & Interview Prep
==================================
๐ FREE TUTORIAL PLAYLISTS
==================================
๐น Selenium Tutorials (Free)
https://www.youtube.com/watch?v=5hyEnZT9AkQ&list=PLBw1ubD1J1UjP1rZMbU8NSh2ajE12Yjjf
๐น JMeter Performance Testing (Free)
https://www.youtube.com/watch?v=s33Bqz0vAUw&list=PLBw1ubD1J1UgVniCSUlg_LKRzlF11CZZB
๐น Postman API Testing (Free)
https://www.youtube.com/playlist?list=PLBw1ubD1J1UgVniCSUlg_LKRzlF11CZZB
๐น Java Programming for Testers (Free)
https://www.youtube.com/watch?v=C8HRfmJ_ZZQ&list=PLBw1ubD1J1UjGNxe10eY-H7e9cQ12Qk_l
๐น Cypress Automation Testing (Free)
https://www.youtube.com/watch?v=OvCLwh5vN8g&list=PLBw1ubD1J1Ujws5XLs7BGJqQkQVpJtmBJ
๐น Agile Testing Series (Free)
https://www.youtube.com/playlist?list=PLBw1ubD1J1Uif-cFY6BJRbjc3Ah9bKpSd
๐น Animated Software Testing Videos (Free)
https://www.youtube.com/watch?v=jRcsuCrQI_s&list=PLBw1ubD1J1UhnuUX3Kd5OP5r9qaDHie-T
==================================
๐ CONNECT WITH US
==================================
๐บ YouTube โ https://www.youtube.com/c/TestingFunda
==================================
โ ๏ธ DISCLAIMER
==================================
All content is for educational purposes only.
#SoftwareTesting #AutomationTesting #Selenium #QA #ManualTesting #Postman #JMeter #Cypress #JavaTesting #APITesting #PerformanceTesting #QAEngineer #SDET #TestingTutorials #FreeTutorials #2026
๐ฏ In this video, you'll learn how to make your API automation tests truly data-driven by reading user data directly from a CSV file instead of using static payloads. We'll write a custom Python function using the csv module's DictReader to convert CSV data into a list of dictionaries, then loop through each record to dynamically build request payloads for the create user API.
This is a must-know skill for QA engineers and automation testers โ data-driven testing is widely used in real-world projects to test multiple scenarios efficiently without duplicating code.
๐ KEY TOPICS COVERED:
Reading CSV files using Python's csv module
Creating a custom read_users function with DictReader
Looping through CSV records to build dynamic payloads
Mapping CSV columns (name, email, gender, status) to API payload fields
Running data-driven tests across multiple records
Validating assertions for each CSV row
โฑ๏ธ TIMESTAMPS:
00:00 Introduction & Recap of Previous Tutorial
00:25 Reviewing the Previous Static Payload Approach
00:42 Plan: Reading Data from CSV File
00:59 Exploring the users.csv File Structure
01:24 Importing the CSV Module
01:48 Creating the read_users Function
02:23 Opening the CSV File in Read Mode
03:14 Returning Data as a List Using DictReader
04:07 Calling read_users and Passing the File Path
05:07 Looping Through CSV Data to Build Payload
06:06 Mapping CSV Fields to Payload (name, email, gender, status)
07:18 Running the Data-Driven Test
07:50 Test Results Across Multiple CSV Records
๐ข If this tutorial helped you, hit LIKE, SUBSCRIBE, and drop a COMMENT below! Turn on notifications so you never miss an automation testing tutorial. Your support helps us bring more career-boosting content for QA engineers and automation testers!
#playwrightpython #datadriventesting #automationtesting #playwrighttutorial #csvtesting #apitestingtutorial #qatestingjobs #pythonautomation #softwaretesting #learncoding #playwrightapi #pythontutorial #qaengineer #apitesting #testautomation #csvfilereading #pythonprogramming #automationtester #codingtutorial #techeducation
๐ Subscribe for FREE Software Testing Tutorials โ https://www.youtube.com/c/TestingFunda
==================================
๐ WHAT YOU'LL LEARN ON THIS CHANNEL
==================================
โ Manual & Automation Testing
โ Selenium, Cypress, Playwright & Appium
โ API Testing with Postman
โ Performance Testing with JMeter
โ Java & Python for Testers
โ Agile, SDLC, STLC & Interview Prep
==================================
๐ FREE TUTORIAL PLAYLISTS
==================================
๐น Selenium Tutorials (Free)
https://www.youtube.com/watch?v=5hyEnZT9AkQ&list=PLBw1ubD1J1UjP1rZMbU8NSh2ajE12Yjjf
๐น JMeter Performance Testing (Free)
https://www.youtube.com/watch?v=s33Bqz0vAUw&list=PLBw1ubD1J1UgVniCSUlg_LKRzlF11CZZB
๐น Postman API Testing (Free)
https://www.youtube.com/playlist?list=PLBw1ubD1J1UgVniCSUlg_LKRzlF11CZZB
๐น Java Programming for Testers (Free)
https://www.youtube.com/watch?v=C8HRfmJ_ZZQ&list=PLBw1ubD1J1UjGNxe10eY-H7e9cQ12Qk_l
๐น Cypress Automation Testing (Free)
https://www.youtube.com/watch?v=OvCLwh5vN8g&list=PLBw1ubD1J1Ujws5XLs7BGJqQkQVpJtmBJ
๐น Agile Testing Series (Free)
https://www.youtube.com/playlist?list=PLBw1ubD1J1Uif-cFY6BJRbjc3Ah9bKpSd
๐น Animated Software Testing Videos (Free)
https://www.youtube.com/watch?v=jRcsuCrQI_s&list=PLBw1ubD1J1UhnuUX3Kd5OP5r9qaDHie-T
==================================
๐ CONNECT WITH US
==================================
๐บ YouTube โ https://www.youtube.com/c/TestingFunda
==================================
โ ๏ธ DISCLAIMER
==================================
All content is for educational purposes only.
#SoftwareTesting #AutomationTesting #Selenium #QA #ManualTesting #Postman #JMeter #Cypress #JavaTesting #APITesting #PerformanceTesting #QAEngineer #SDET #TestingTutorials #FreeTutorials #2026
Tags and Topics
Browse our collection to discover more content in these categories.
Video Information
Views
79
Likes
4
Duration
9:01
Published
Jun 11, 2026
Related Trending Topics
LIVE TRENDSRelated trending topics. Click any trend to explore more videos.
No specific trending topics match this video yet.
Explore All Trends