Saturday, February 13, 2016

Random Testing Tips

I am writing this post based on my experience that span over around seven years and I feel that things that have helped me and my other fellow team members in doing testing effectively and swiftly are worth sharing. The list will continue to evolve over time, so stay tune. I would be glad to know your feedback and tips on typical day of testing. ☺

Tip 1: Removing Distraction.

During testing there are so many distractions you come across daily but this distraction is something different. When you are verifying or executing some scenarios you see some unexpected and unusual state or things within the application under test that is not part of your current expectation so as a tester you should NOT leave your current execution and start probing the new problem you see but rather you should note down  such unusual things and continue your current tasks. When you finished then definitely as a good tester you should report and trace each and every problem within the application.
  
Tip 2: Dealing Credentials Scarcity.

There are times when you're testing with applications that require multiple unique email addresses to register for different roles and views. To cater this need there is a very handy technique you can use to create multiple users/emails. For example, if you have an email address john.doe@gmail.com and you need to create 3 different roles/users scenarios in an application say Customer, Sales, Admin or Sysadmin so you can create all user using existing email like john.doe+customer@gamil.com, john.doe+sales@gamil.com and
john.doe+sysadmin@gamil.com and you can have personalize view of each respective users based on your application and needs. All related emails (if application under test generate some) will be delivered to only john.doe@gamil.com and you can SAVE crucial time wasted in creating different valid (email receivable) email addresses.

Tip 3: Winning Developer Trust.

Sometimes as a tester we write a very robust defect report and try to put ever related stuff and condition but developer actually interested in one direct clue and source of a problem. That very clue is very easy to find. Modern browser are coming  with robust built-in debugging tool like Developer Panel within the browser. As a tester what you can do is you can keep open (Windows = F12 or CTRL+SHIFT+I; Mac = CMD+OPT+I) that panel to see which request is failing, giving error or simply not even actually triggered by clicking the specific request url and then clicking response tab to see its details. That way you will be able to add that clue in defect report that developer can directly jump into fixing quickly and definitely you will be treated as reliable tester for her code.

Tip 4: Testing with large size file

Sometimes you might need large files to test the application and creating large files is always a challenge. But there are many solution and the one am sharing is very handy, and to that we can use the concatenation of single file. Use the following command on your Unix/Linux shell:
Prerequisite: You should have at least one file with some data in it either compressed or uncompressed.
cat   < existing-file > >>  < new-file >

Repeat the above line as many time as you want to generate size of the file you needed for testing. Alternatively you can create shell script to do this automatically an repeatedly for you as follows.
../bin/generate_large_file.sh
for i in {0..100}; do cat < existing-file > >>  < new-file > ; done 
Save the above script and execute as ./generate_large_file.sh it will loop 100 times and append the existing files into new file to create large size file with same repeating contents in the same directory where original file and shell file reside.
  

Friday, January 15, 2016

Different characters in software development... -A short blog post

There are many people with different roles and responsibilities e.g. software developers, testers, marketing, sales and business development are involved in developing product with common set of goals like making a world a better place; and yet many people within the same organization do not value other peoples' work and take it for granted.

It happens quite often and people especially testers are complaining about the fact the are treated in isolated way. For example, they are treated as the expense on the company's balance sheet rather than assets and their work is taken many times for granted and many times their efforts are ignored. If tester finds a defect put enough effort in analyzing the issue but not able to get specific steps to reproduce the issue developers do not take it seriously and it keeps in the backlog for days, weeks and even months. But as soon the same or similar issues are reported from within the field or by some business related people it  becomes a nightmare for the entire engineering team and they put every bit of effort in reproducing and fixing that problem at any cost.

Above and such similar problems are real cause of the demotivation of testers within the industry. 

Do you have any similar instances to share ?

Friday, January 1, 2016

Leveraging python scripts

In the recent past I happened to have assigned a task of Uploading 200K files in total to some cloud app for testing purpose. The challenge was to create that many files, but, thanks to Python robustness that helped me saving myself from laborious and tedious work of creating folders and files within those folders.

Following is the script for that purpose.


========================================================== 
#This script creates total of  200000 Files in 2000 folders 
#i.e each folder e.g MZ_STRESS_1 contains 100 text files
import os

file_list = os.listdir(r"F:\\python_projeects\\Folder_Library")
print(file_list)
current_path = os.getcwd()
print("Current working directory : "+current_path)
os.chdir(r"F:\\python_projeects\\Folder_Library")


for x in range(1,2001):
    os.mkdir(r"MZ_STRESS_"+str(x))
        for y in range(1,101):
            fo = open("F:\\python_projeects\\Folder_Library\MZ_STRESS_"+str(x)+"\\File_"+str(y)+".txt", "wb")
            fo.write(u''+u'\n')
            fo.close()

print("Job finished!!!")

==========================================================
   
Share your snippets you've ever prepared for doing such and similar small tasks using any language.


Happy testing! :-)