Posts

QTP Best Practices

HP Quick Test Professional is a test automation tool, also known as QTP. It is used to automate functional, regression & smoke test cases. It is a very popular tool and works on MS windows O/S, supports development technologies like Active X, Delphi, Java, .Net, Oracle, People Soft, web, Web services etc. This article discusses about best practices while doing automation using QTP.     Don’t use msgbox function, this function pauses the script execution & requires user intervention. This defeats the objective of unattended script execution. To store or display error message and execution log use QTP inbuilt Reporter object.        Follow coding guidelines like comments, variable & function name declaration.        Use option explicit to enforce variable declaration. Always define variables at the top of script & function file        Neither hard code test data nor read value using...

How to Perform right Click Using QTP

'The below code can be used to perform mouse right click whereever required  Browser(”Browser”).Page(”Page”).WebTable(”table”).FireEvent “onclick”,,,micRightBtn   ‘Right clicking on th e object

Common Unix - Shell Features

Overview of common shell features.  The following features are standard in every shell. List is as follows - Command     Meaning >     Redirect output >>     Append to file <     Redirect input <<     "Here" document (redirect input) | Pipe     output &     Run process in background. ;     Separate commands on same line *     Match any character(s) in filename ?     Match single character in filename [ ]     Match any characters enclosed ( )     Execute in subshell ` `     Substitute output of enclosed command " "     Partial quote (allows variable and command expansion) ' '     Full quote (no expansion) \     Quote fol...

Writing Recursive Functions

How to Write Recursive Functions A recursive procedure is one that calls itself. Example is as follows – The following procedure uses recursion to calculate the factorial of its original argument. Function factorial(ByVal n As Integer) As Integer If n <= 1 Then Return 1 Else Return factorial(n – 1) * n End If End Function

UNIX Commands in Nutshell

UNIX Command Summary There are MANY commands available for you in a UNIX shell account. A list of them follows (in no particular order). Remember, you can always read the manpage on each command for more information. ls …………….. show directory, in alphabetical order logout …………. logs off system mkdir ………….. make a directory rmdir ………….. remove directory (rm -r to delete folders with files) rm …………….. remove files cd …………….. change current directory man (command) …… shows help on a specific command talk (user) …….. pages user for chat – (user) is a email address write (user) ……. write a user on the local system (control-c to end) pico (filename) …. easy to use text editor to edit files pine …………… easy to use mailer more (file) …….. views a file, pausing every screenful sz …………….. send a file (to you) using zmodem rz …………….. recieve a file (to the unix system) using zmodem telnet (host) …… connect to another Internet site ftp (host) ……… connects to a FTP site...

Using Descriptive Programming(DP) In QTP

On recording any object using QTP, QTP adds the test object to the Object Repository. While running a test, QTP finds the object in the Object Repository and uses the stored test object’s description to identify the object in your application/website. Only after the object is found in the Object Repository, QTP can perform methods on those objects. We can also instruct QTP to perform methods on objects without referring to the Object Repository. This is possible with the help of Programmatic descriptions or descriptive programming. This implies that descriptive programming is very helpful if you want to perform an operation on an object that is not stored in Object Repository. Descriptive Programming is also useful to perform the same operation on several objects with certain matching properties e.g. suppose there are 8 check boxes on a web page with names as chk_1, chk_2 and so on. So it’s not a good idea to put these in an Object Repository. With the help of Descriptive Programming ...