Python Scripting for Software Testers

Workshop Objectives

Python is an elegant, powerful, object-oriented, high level programming language. It’s known for its use in developing applications rapidly and still resulting in maintainable, easy to read code. It has easy bindings with other language platforms like Java, Dot Net, C/C++ etc.

It can very well be the primary language of a software tester which he/she employs for day-to-day test automation needs as well as in design of general purpose test automation frameworks.

This 5-day workshop focuses on building a strong hold over the Python language so that beyond this workshop the participants can explore the language further and are able to put the language to a given use.

Learning Objectives

  • Introduction to Python
    • High Level Striking Features of Python
    • Interactive Python Command line
    • Running Python Scripts using the interpreter
    • Intermediate compiled formats and their optimization
    • Significance of the mandatory white space
    • Python statements – Single line, Multiple Line
    • Printing Output in Various Formats
    • The Multi-line String and its uses
    • Handling User Input
    • Python Modules Versus Python Scripts
    • Manipulating Python path
    • Declaring Python Variables
    • A First Look At Error Handling versus Exceptions
    • A First Look at In-Built Python Exceptions
  • Python Data Types – I
    • Numeric Types
    • Boolean
    • Complex Numbers
    • Strings
    • Understanding Raw Strings and their uses
    • Understanding doc strings and their uses
    • Python doesn’t Interpolate in strings
    • Mutability Versus Immutability in Python
    • What does immutable really mean?
  • Python Type Conversion
    • How Python determines type of a variable
    • First Look at How Everything is an object in Python
    • Python Garbage Collection
    • Python types module for Types Checking
    • Python Type Exceptions
    • Type Conversion Functions
    • Python Manifesto
    • Python values Explicit than Explicit
  • More Python Arithmetic
    • Understanding Python Division Operator
    • Operator Overloading In Python
    • How Overloading reduces Python Learner’s Memory requirement
    • Default Overloaded Operators
    • Python decimal module
    • Operator Precedence
  • Python Data Types – II
    • Python Sequence Types – Lists and Tuples
    • Declaring and Using Lists
    • String as a Sequence Type
    • Declaring and Using Tuples
    • When to Use Lists versus When to Use Tuples
    • Tuples as immutable lists
    • Python’s implicit use of tuples
    • Sequence unpacking
    • Sequence slicing
    • Sequence indexing
    • Sequence Update
    • Sequence Deletion
    • Sequence assignments
    • First Look At Python Nested Data Structures
    • Sequence Appending and Extending
    • range() method and its variants
    • xrange() method and benefits
    • Python Mapping Type – Dictionary
    • Creating Dictionaries
    • Updating Dictionaries
    • Unsorted nature of dictionaries
    • Constraints on Keys
    • Building Nested Data Structures using Dictionaries
    • When to use a dictionary
    • Uses of tuples in a dictionary
  • Python Control Structures I – Conditional Structures
    • if/elif/else
    • Relational Operators in Python
    • Operator Overloading in relational operators
    • Nesting conditional paths
  • Python Exception Handling
    • try/except/else/finally
    • raise keyword
    • Python’s built-in exception hierarchy
    • Compounding conditions using logical operators
    • The Python None type
    • Nested calls and exceptions – stack unwinding
    • Using Stack unwinding in debugging Python code
    • How exceptions can be used in building logic
    • Understanding traceback module
  • Python Control Structures II – Looping Constructs
    • while loop
    • for loop
    • Variants of for loop
    • Concept of Iterables and iter() function
      Basic List comprehension in Python
    • Python’s Exceptions related to looping
    • Looping over index and value at the same time
  • Creating and Using Functions in Python
    • Function calling basics
    • Call by Object Reference
    • Default Arguments
    • Keyword arguments
    • Lambda
    • Does Python support function overloading?
    • How to do “call by value”?
    • Dynamic Function calls
  • Python Modules and packages
    • importing existing modules
    • Variants of import statements
    • Caveats in imports
    • Putting test code inside a module
    • Packaging modules inside a package
  • Object Oriented Programming in Python
    • Introduction to OOP
    • Which OOP features Python supports
    • class keyword
    • Inheritance
    • Multiple Inheritance and Mixins
    • Overriding
    • Operator Overloading
    • Making a class behave as a dictionary
    • Overriding string representation of an object
    • Power of Introspection
  • File handling in Python
    • Treating File As An Array
    • Treating File As a Dictionary
    • Treating File as a Bank Locker
  • Useful Modules
    • os
    • os.path
    • os.envrion
    • sys
    • shutil
  • Database Access with Python
    • Using file based dbs
    • PySQLite
  • Python Generators
    • Basic generators
    • Their use in test data generation
    • Their use in Fuzzing
  • Writing Web Apps With Python
    • Introduction to Web and HTTP
    • Basic CGI using Python
    • Using Django
  • Regular Expressions in Python
    • re module
    • Commonly used RegEx expressions
    • Compiled regular expressions
  • Networking
    • Introduction to socket programming
    • Writing a network client in Python
    • Writing a network server
    • HTTP client in Python
  • Process Handling in Python
    • Subprocess  module
    • Sharing envrionment variables
    • Reading STDOUT/STDERR
  • Testing Python Code
    • PyUnit
    • Doc test
    • Nose
    • profiler
    • Freshen
    • Fitnesse and PyFIT
  • XML Processing in Python
    • ElementTree module
  • Putting it all together
    • Understanding how the concepts learned so far can be used in building a general purpose test framework
    • Discussing about test automation architecture and how Python features can be used in the building the same

How can I learn all of the above topics? I am currently in Hyderabad with 7 years of software testing experience but with no coding/scripting backgorund. Kindly suggest.


I hope you found the call useful and would stick to the learning schedule we talked about.

Yes I will Rahul. Thanks.

Hi Rahul,
I am having the same question!
How can i learn the above topics? There is need of urgency for me to learn this at the earliest.
Can you help me please!


Hi Rahul,
I am planning to learn Python.
I am in B’lore. Possible to meet you & discuss about the course?
How many days it takes to complete the above topics?



I’ve responded to you on your email.

Hi Rahul

To learn the python we need to have any basic idea about any laungaues like cand c++ …………….because i am not having any idea about them……… possible to me to learn python with knowing them.
if possible pls tell me how to start .



Python is a language of its own and you can learn it independently of other languages.

You can start here How Would Pareto Learn Python! on Testing Perspective website.

There is a also a beginners’ book by Swaroop: A Byte of Python, which is a good one.

Harpartap Singh

I want to learn Python.I am in Chandigarh. i m doing diploma in computer scince engineering.i have done-:
Now i have decided to learn python.Can u tell me the fee structure and time of learning
All cousre detail @ my email id..
How many days it takes to complete the above topics?

thanking you sir

Hi Rahul…
i am working on l2 l3 protocol testing….i found that python would help me in career grown in testing domain specially in networking testing…I would like to discuss with you regarding this course….Kindly give me your num or reach me on 9964422242.


Hi can u cover all topics in the above content please let me know

I need to learn python , there are 2 people . We work for ecommerce company in gurgaon. Can you please share the costing on my gmail id?

I am in planning to learn Python.
Is it Possible to meet you & discuss about the course?
How many days it takes to complete the above topics?

Pradeep Shettar

Hi Rahul, may i know where do you train in Bangalore


I run a company – Talent Reboot ( through which I mostly undertake corporate trainings and occasional public workshops. Put together both of these represent 10-15% of my work in an year, as I mostly spend time on consulting of projects for Test Mile ( a company which I founded and provides testing services.

I am interested in going through this course, i am currently based in Pune. can you please help us put the no. or schedule if any for pune?

I am interested to take up PHYTON training, please send me the duration/fees to my gmail