PYTHON FOR TESTER
QUALITY ENGINEERING
COURSE
OBJECTIVES
Understand Python fundamentals and their application in test
automation
Write efficient, clean, and readable Python code for testing
Automate functional and API testing using Python-based libraries
Work with popular Python testing frameworks like Pytest
Create modular, maintainable, and reusable test automation
code
Integrate Python scripts with test management tools and CI/CD
pipelines
WEEK 1: PYTHON BASICS FOR TESTERS
Objective: Build foundational Python knowledge to write basic test scripts.
Topics:
• Why Python for QA/Testers
• Setting up Python and IDEs (VS Code / PyCharm)
• Variables, Data Types, Type Casting
• Input/Output, Comments
• Operators and Expressions
• Control Structures (if, for, while, break, continue)
WEEK 1:
PYTHON
BASICS FOR
TESTERS
Assignment:
Write a script to validate login
credentials with if conditions
Loop through a list of test data
and print test results.
WEEK 2: FUNCTIONS, DATA STRUCTURES, AND
FILE HANDLING
Objective: Work with reusable functions, data containers, and file-based test data.
Topics:
• Defining and calling functions
• Lists, Tuples, Sets, and Dictionaries
• Working with files: reading/writing text, CSV, JSON
• Using with open() and context managers
WEEK 2: FUNCTIONS, DATA STRUCTURES, AND
FILE HANDLING
Assignment:
• Create a function that validates test data from a CSV file.
• Store and retrieve test users from a JSON file.
WEEK 3: EXCEPTION HANDLING, LOGGING,
AND OOP
Objective: Handle runtime errors and organize test utilities using classes.
Topics:
• Try, Except, Else, Finally
• Raising custom exceptions
• Python Loggin module
• Classes and Objects
• Constructors (-Init-), methods, attributes
WEEK 3: EXCEPTION HANDLING, LOGGING,
AND OOP
Assignment:
• Create a logging mechanism for test execution.
• Build a class for handling test user accounts.
WEEK 4: REGULAR EXPRESSIONS, API TESTING
& JSON VALIDATION
Objective: Learn to automate API validation using Python.
• Topics:
• Regular Expressions with re module
• Validate test input (email, phone, etc.)
• Intro to request library
• Making GET, POST requests
• Parsing JSON responses and status code validation
WEEK 4: REGULAR EXPRESSIONS, API TESTING
& JSON VALIDATION
Assignment:
• Write tests to validate an API response using assertions.
• Use regex to filter valid emails from a list.
WEEK 5: PYTEST FRAMEWORK AND DATA-
DRIVEN TESTING
• Objective: Write functional and API test cases using Pytest
• Topics:
• Pytest installation and basics
• Writing and organizing test functions
• Assertions, Setup/Teardown, Fixtures
• Parameterization in pytest
• Data-driven testing using CSV/JSON
WEEK 5: PYTEST FRAMEWORK AND DATA-
DRIVEN TESTING
Assignment:
• Write a test suite for login validation using pytest and parameterized input.
• Load test data from CSV and run tests dynamically.
WEEK 6: FINAL PROJECT + REPORTING &
AUTOMATION
Objective: Apply all concepts in a real-world automation scenario.
• Topics:
• Final mini project setup (Web/API testing scenario)
• Generate test reports (HTML/XML/Allure)
• Screenshot and logging on test failure
• Git basics and project organization
• CI/CD intro – run tests via GitHub Actions/Jenkins (optional)
WEEK 6: FINAL
PROJECT +
REPORTING &
AUTOMATION
Final Project:
Automate a real test scenario (e.g., login +
API validation)
Submit code with organized structure
Generate and share HTML report
🎓 CERTIFICATION OF
COMPLETION
CERTIFICATE TO LEARNERS WHO COMPLETE ALL
ASSIGNMENTS AND THE FINAL PROJECT.
THANKS

Python For Tester - Understand Python fundamentals and their application in test automation

  • 1.
  • 2.
    COURSE OBJECTIVES Understand Python fundamentalsand their application in test automation Write efficient, clean, and readable Python code for testing Automate functional and API testing using Python-based libraries Work with popular Python testing frameworks like Pytest Create modular, maintainable, and reusable test automation code Integrate Python scripts with test management tools and CI/CD pipelines
  • 3.
    WEEK 1: PYTHONBASICS FOR TESTERS Objective: Build foundational Python knowledge to write basic test scripts. Topics: • Why Python for QA/Testers • Setting up Python and IDEs (VS Code / PyCharm) • Variables, Data Types, Type Casting • Input/Output, Comments • Operators and Expressions • Control Structures (if, for, while, break, continue)
  • 4.
    WEEK 1: PYTHON BASICS FOR TESTERS Assignment: Writea script to validate login credentials with if conditions Loop through a list of test data and print test results.
  • 5.
    WEEK 2: FUNCTIONS,DATA STRUCTURES, AND FILE HANDLING Objective: Work with reusable functions, data containers, and file-based test data. Topics: • Defining and calling functions • Lists, Tuples, Sets, and Dictionaries • Working with files: reading/writing text, CSV, JSON • Using with open() and context managers
  • 6.
    WEEK 2: FUNCTIONS,DATA STRUCTURES, AND FILE HANDLING Assignment: • Create a function that validates test data from a CSV file. • Store and retrieve test users from a JSON file.
  • 7.
    WEEK 3: EXCEPTIONHANDLING, LOGGING, AND OOP Objective: Handle runtime errors and organize test utilities using classes. Topics: • Try, Except, Else, Finally • Raising custom exceptions • Python Loggin module • Classes and Objects • Constructors (-Init-), methods, attributes
  • 8.
    WEEK 3: EXCEPTIONHANDLING, LOGGING, AND OOP Assignment: • Create a logging mechanism for test execution. • Build a class for handling test user accounts.
  • 9.
    WEEK 4: REGULAREXPRESSIONS, API TESTING & JSON VALIDATION Objective: Learn to automate API validation using Python. • Topics: • Regular Expressions with re module • Validate test input (email, phone, etc.) • Intro to request library • Making GET, POST requests • Parsing JSON responses and status code validation
  • 10.
    WEEK 4: REGULAREXPRESSIONS, API TESTING & JSON VALIDATION Assignment: • Write tests to validate an API response using assertions. • Use regex to filter valid emails from a list.
  • 11.
    WEEK 5: PYTESTFRAMEWORK AND DATA- DRIVEN TESTING • Objective: Write functional and API test cases using Pytest • Topics: • Pytest installation and basics • Writing and organizing test functions • Assertions, Setup/Teardown, Fixtures • Parameterization in pytest • Data-driven testing using CSV/JSON
  • 12.
    WEEK 5: PYTESTFRAMEWORK AND DATA- DRIVEN TESTING Assignment: • Write a test suite for login validation using pytest and parameterized input. • Load test data from CSV and run tests dynamically.
  • 13.
    WEEK 6: FINALPROJECT + REPORTING & AUTOMATION Objective: Apply all concepts in a real-world automation scenario. • Topics: • Final mini project setup (Web/API testing scenario) • Generate test reports (HTML/XML/Allure) • Screenshot and logging on test failure • Git basics and project organization • CI/CD intro – run tests via GitHub Actions/Jenkins (optional)
  • 14.
    WEEK 6: FINAL PROJECT+ REPORTING & AUTOMATION Final Project: Automate a real test scenario (e.g., login + API validation) Submit code with organized structure Generate and share HTML report
  • 15.
    🎓 CERTIFICATION OF COMPLETION CERTIFICATETO LEARNERS WHO COMPLETE ALL ASSIGNMENTS AND THE FINAL PROJECT.
  • 16.