Python packages - I have worked with so far

9:30 PM Rizwan 0 Comments

I am acquainted with Python for almost 2 years now. First I worked with around 2013 if I am not mistaken. It was the client requirement that time to use Python. So we started from zero, learned it and delivered the testing framework to the client. Client's response was satisfactory. But after that there was pause until someone else suggested me to try Python for few of my automation.

That "someone" was my development manager here, it was brief timeline that I spend with him before he moved, but within that brief time frame he changed my perspective towards to the automation. From that time I started automating things in all possible way. It's not only UI automation. I have developed different frameworks for my current organization.

I built one REST API Testing framework (actually cloned from I build another framework which I named PyRabbit, to help us to test each of our microservices. There is another recently I finished development is called "LocalDeployer". Purpose of this project is to allow download artifacts from our Bamboo CI and deploy microservices with a single command.

There are few other projects I have been working with which are out context of this article :).  But, what I want to share is the packages I have used so far while I was/am working with so many versatile projects. The packages I have used so far are as follows:


Title of the doc is "Requests: HTTP for humans", which is kind of correct. If you ever want to deal with http communication including POST, GET etc and different types of authentication, then should check out this package. Requests API is easy to use. Dig down further details at

Note: if you ever wonder how to do OAuth2 authentication using requests, then please checkout


It's a python implementation for AMQP (Advance Message Queuing Protocol). From the doc and I quote:
Pika is a pure-Python implementation of the AMQP 0-9-1 protocol that tries to stay fairly independent of the underlying network support library.
If you want to inject data to RabbitMQ, or want to implement consumer and subscriber for your back-end RabbitMQ then using PIKA would be the perfect choice. It's fairly simple API saves lots effort. Also nice tutorial can be found in RabbitMQ Tutorial section as well.


Again it's better to quote from the official site:
Paramiko is a Python (2.6+, 3.3+) implementation of the SSHv2 protocol [1], providing both client and server functionality. 
So it's all about SSH. If you want establish the SSH tunneling then it's definitely what you are looking for.  Please checkout detail at


This is an awesome library to play with your Postgres database. For one of my projects, I needed to work with our database which is in Postgres from Python. Then I found it and it's actually very easy to use. Official documentation:

Sample code to create database from python using  Psycopg2 would be as below:

from psycopg2 import connect
from psycopg2.extensions import ISOLATION_LEVEL_AUTOCOMMIT

con = connect(database="postgres", user=username, password=password, host=dbhost, port="5432")
cur = con.cursor()
cur.execute("CREATE DATABASE " + dbname)


This is a python library which allows you to connect to process pool, trigger process, get output from the process, pipe to other process and so many other things to with processes. In one of my projects I needed to trigger java in remote over SSH. I did it with help of paramiko and subprocess. Check out detail of this awesome library in


So, one of the test engineers from our testing team approached me with a requirement for our api testing tool. She asked for a feature to do the date arithmetic, For example, adding 1 day to current date or deducting 3 days from current date. 
Doing it using timdelta or python date time library would have been bit complicated. But python-datemath actually saved me from lots of hassle! Github doc actually described the usage quite nicely to start with.

Apart from those, I have worked with other libraries as well, namely json, re, psutiltraceback,simpleeval and few others. I am still learning and exploring new libraries, because I am focusing on Python nowadays and I am enjoying it. Probably in future will discuss about new packages.


Questions you should probably ask as a QA

10:25 PM Rizwan 2 Comments

During the journey as a QA and Testing practitioner, came across with lots of talented QA engineers. Some of them are excellent as manual tester. I admire their thinking capability, ability to explore scenario and killer attitude towards to discover the bug. Another group I met who are solely interested for automation. They are quick and efficient in design and development. I learned and still learning from most of them. But.....

I found one thing is missing badly is the habit of asking questions. I prefer to ask questions, regardless of the client, product owners or developers. It's true that in most of the cases I don't deal with the clients, and the role I am playing now as architect, the scope of asking question is bit limited. But....

I think QA and testers should grow the habit of asking questions, at least  following are some important questions I can think of:

Is this the appropriate technology for developing this?

I completely agree that this decision should be made by the analyst or architects of the team. But as a QA engineer, I need to be aware of the features, advantages and flaws of the technology that we have picked for the development. This will also help to explore test scenarios to increase test coverage. 

For instance you are testing an app with MSSQL as database. Try out scenario to insert unicode or double byte characters into database from front-end. If the column not properly configured as nvarchar, may be it'll not store the data as expected.

Is there any usability analysis done for this feature/story?

This is very important. Personally I am a big fan of usability analysis. Unfortunately, most of the organization I have worked with, usability analysis and testing are not QA thingy, product owners or BI associated to the feature or story are doing that. But QA should take few moment to understand the workflow from usability perspective. Try to measure how simple the feature is to learn and use. If it's difficult for me to use then definitely it would be hard for end users to use as well. So raise your voice for the usability.

What value this requirement will add?

May be it's not directly impacting your testing, but good to know. Being a QA is like the core of the operation. You should have complete idea of the business. You should be able provide your insights on the feature, who knows, may be it will help the analyst team to revisit the story and reshape it! It's also a good way to increase your habit of asking the important questions.

Who are our competitors and in what extend we are ahead of them?

Hmm, now why I am emphasizing on competitors here? Learning about competitors is like learning about new products as well. For example, I am working with payment gateway now, I am interested to know about our competitors so that I can learn about their business model, strength of API and later can compare and help our analyst to explore gaps within our product. I agree that in reality, mostly it's difficult for me to do research on this and know our competitors. The way we are doing it is by reading contents shared by our Business Analyst team. Please find the best way which suits you 😊. 

Is our current testing procedure able to ensure maximum testing coverage?

This is very important. Answer of this question should be result of ongoing review of the current process. But first of all, QA or QAs of the team need to raise this question. Need to discuss within the team, gather feedback from other teams, analyze test results, bug reports and find answer of this question. Again, it's upto the team culture how you are gonna work with this, but raise it.

Do we have any infrastructure for performance testing?

Importance of this question is actually depends. It depends on the nature of the business. For example, ours is a payment gateway where we have the need to measure performance stats based on user counts, concurrent access and volume of the requests. So we are building our performance testing infrastructure and working close with DevOps and Architects to improve the performance. Look into your project/product, find if this question is applicable for you, if valid then work on it.

Why you followed 'X' way to implement,  where 'Y' seems much better?

This question is more related to the habit of reviewing developer's code. If your testing team has the practice of doing that and you are sure you would be able out smart them by asking this question with proper logical explanation backing your question, then go ahead, shoot it! It's also a good practice to nurturing  our technical thinking and help us to follow developer's mind. It's a good way to argue with developers with developer's language.

Can we automate this feature?

It's a very good question. I really recommend to ask it as much as possible. Prepare yourself and your team in such a way so that any feature which could be a regression candidate in future, could be automated by spending minimum time and effort. 

Why there is no bug?

Fishy right? Bugs are the outcome of your outstanding testing. If there is no bug after your testing, that means either development was awesome or something went seriously wrong during your test execution. So it's time to ask this question, look back into entire test execution process and catch the bug!

These are just few cents from my experience and observations. May be few are valid, few are invalid depending on the context, but let's ask one or few of these question, I am sure that, it'll help to explore alley on to your QA road.

Happy testing 😊