Monday, July 29, 2013

QTP 11.5 Batch Test Problems

I wanted to test a GUI application and came across this great software - QTP which automates test cases easily. However, I faced issues with the trial version for Batch Testing. Without the batch test runner, one has to keep repeating "Open-Run-Log Results" cycle for EVERY test case. All of it requires user intervention and it felt that manual testing would be much better.I installed updates but it didn't solve the issue.

Googling facilitated me to find an alternative way to batch test. Some users used their VB Scripting knowledge. One can create a .vbs file with following code:-
 ' on error resume next  
 Dim qtApp 'As QuickTest.Application ' Declare the Application object variable  
 Dim qtTest 'As QuickTest.Test ' Declare a Test object variable  
 Set qtApp = CreateObject("QuickTest.Application") ' Create the Application object  
 qtApp.Launch ' Start QuickTest  
 qtApp.Visible = True ' Make the QuickTest application visible  
   
 ' Set QuickTest run options  
 Set file_Sys=CreateObject("Scripting.filesystemObject")  
 Set Dir=file_Sys.GetFolder("C:\YOUR PATH FOR TESTCase Folder")  
 set test_collection=Dir.SubFolders  
 Set qtresultsObj=CreateObject("Quicktest.RunResultsOptions")  
   
 For each t_folder in test_collection  
      qtApp.Open t_folder.Path,True,False  
      qtresultsObj.resultsLocation=t_folder.path&"\Res1"  
      qtApp.Test.Run qtresultsObj,true  
      qtApp.test.Close  
 Next  
 
 qtApp.Options.Run.RunMode = "Fast"  
 qtApp.Options.Run.ViewResults = False  
   
 Set qtTest = Nothing ' Release the Test object  
 Set qtApp = Nothing ' Release the Application object  
   


This script helps to get away with the QTP's erratic batch test runner. But it has its own pitfalls. Whenever you use this, there are error messages displayed after each execution. 

Batch Test Error

 To overcome, I wrote an application in JAVA which will scan after every interval for such messages and do away with them. 




STEPS for Batch Testing
  1. Make a .vbs file
  2. Copy paste the code as shown above and change the file path to the folder where all your test cases are stored, save it
  3. Download the QTP Batch Runner Helper
  4. Run the Helper and enter the scan interval. (Dont click on "Start" )
  5. Double click on ".vbs" file
  6. While the QTP is loading the test case, go back to "Batch Runner Helper" and click on "Start"

Friday, July 19, 2013

Jana Gana Mana Controversy - Clearing Facts

Someone created a post on Facebook about Indian National Anthem being a homage to King George V and as the bad news travels faster, people have started believing it. The post
Stanza 1: The (Indian) people wake up remembering your good name and ask for your blessings and they sing your glories 
(Tava shubha name jaage; tava shubha aashish maage, gaaye tava jaya gaatha)
Stanza 2: Around your throne, people of all religions come and give their love and anxiously wait to hear your kind words.
Stanza 3: Praise to the King for being the charioteer, for leading the ancient travellers beyond misery.
Stanza 4: Drowned in deep ignorance and suffering, this poverty stricken,unconscious country? Waiting for the wink of your eye and our mother's (the Queen's) true protection.
Stanza 5: In your compassionate plans, the sleeping Bharat (India) will wake up. We bow down to your feet, O Queen, and glory to Rajeshwara(the King).
This whole poem does not indicate any love for the Motherland, but depicts a bleak picture of it. When you sing Jana Gana Mana, whom are you glorifying?
Certainly not the Motherland. Is it God? The poem does not indicate that. 
1. "The poem does not indicate that" Surely, such an article was written by someone who lacked intellectual acuity. A poem isn't always direct! Its the meaning behind those words that you have to understand. I'm sure that if this author had read "The Road not Taken by Robert Frost", he would infer that its actually about making a choice of road when one is stuck in a forest!

"Whom are you glorifying? Is it God?" Yes!  The meaning can be easily interpreted by reading the translation itself -> "Praise to the King for being the charioteer, for leading the ancient travellers beyond misery". Tagore could be thinking about Lord Krishna, as to how being a Charioteer, he ensured the victory of the Truth.

And now, if you re-read the entire translation it seems as an ode to God.

2. But, the post also has this ->
only those provinces that were under British rule, i.e., Punjab, Sindh, Gujarat, Maratha, were mentioned. None of the princely states, which are integral parts of India now, such as Kashmir, Rajasthan, Andhra, Mysore and Kerala, were recognized.
"Dravida-Utkala-Bangal" - Dravida includes southern states - Kerala, Mysore too. Even if he hadn't included I still wouldn't believe this allegation for a simple reason - its a "poem" and not encyclopedia page to include all names.

This is what I believe. But I could be wrong. So you should hear straight from the horses mouth:-
1. From his letter in 1939(1) - "I should only insult myself if I cared to answer those who consider me capable of such unbounded stupidity"
2.  Extract from another letter written(2) -  “A certain high official in His Majesty’s service, who was also my friend, had requested that I write a song of felicitation towards the Emperor. The request simply amazed me. It caused a great stir in my heart. In response to that great mental turmoil, I pronounced the victory in Jana Gana Mana of that Bhagya Vidhata of India who has from age after age held steadfast the reins of India’s chariot through rise and fall, through the straight path and the curved. That Lord of Destiny, that Reader of the Collective Mind of India, that Perennial Guide, could never be George V, George VI, or any other George. Even my official friend understood this about the song. After all, even if his admiration for the crown was excessive, he was not lacking in simple common sense.”

References:-