Skip to main content

Posts

Showing posts from July 28, 2008

windows

A mechanical, electrical and a software engineer from Microsoft were driving through the desert when the car broke down. The mechanical engineer said "It seems to be a problem with the fuel injection system, why don't we pop the hood and I'll take a look at it." To which the electrical engineer replied, "No I think it's just a loose ground wire, I'll get out and take a look." Then, the Microsoft engineer jumps in. "No, no, no. If we just close up all the windows, get out, wait a few minutes, get back in, and then reopen the windows everything will work fine."

How to connect with Database using QTP

The steps to connect Quick Test Pro with the Database are: Create a Database object, ADOB.Connection Set the connection string using Data Source Name (DSN) Open the connection to the database Execute the SQL query Close the database connection Example: Dim con Set con = CreateObject(”ADODB.Connection”) con.ConnectionString = “DSN={dsnName}” ‘###replace the dsnName con.Open SQL = “Select * From {tableName}” ‘###replace tableName Set rs=con.Execute(SQL) Do Until rs.EOF x = rs.Fields(”{colum name}”) ‘###Replace the column name with the retrived column name of the table msgBox(x) rs.MoveNext Loop rs.Close con.Close Set rs = Nothing Set con = Nothing

Working with Dynamic Object using Quick Test Professional (QTP)

There are several ways to work with dynamically generated object: Using Regular Expression Using alternative object property to uniquely identify the dynamic object Descriptive programming Use regular expressions for the dynamic property. Open the Object Repository, and find the object from the left side of the Object repository window. From the list of the properties, select the dynamic property. Click the edit icon, which is next to the Constant edit field. Check the ‘Regular expression’ checkbox. Replace the dynamic portion of the string with wild cards (*) and Click “OK”. Modify the Object Repository for the dynamic object to use different property to uniquely identify the object: Open Object repository, and select the dynamic object Click on the Add/Remove Button Choose a different property to identify the object uniquely Use descriptive programming which allows using object properties directly to the script. Example: Set BillingOptions = Description.Create ...

How to set a property value of an object in the Object Repository during runtime?

Solution : We can modify the properties of the temporary version of the object during the run session without affecting the permanent values in the object repository by adding a SetTOProperty method. The SetTOProperty method can be inserted from the Keyword view using step generator or inserted to the expert view. How? The regular expression checkbox needs to be selected for the specified object . Either through the Object Repository or through the Object Properties window, the regular expression checkbox needs to be selected before running the test. To go through the Object Repository: 1. Select Resources -> Object Repository. 2. Select the object that will be used with the SetTOProperty method. 3. Select the property that will be used with the SetTOProperty method. 4. Select the “Edit Constant Value Options” button, which is to the right of the Constant field. 5. Select the “Regular expression” checkbox. 6. Click . 7. Click . After modifying the setting, you can specify t...

When to use Low-level and Analog Mode in Quick Test Pro (QTP)

n HP Quick Test Professional (QTP), 99% of the time we use Normal recording mode. Recording using Analog, and low-level are NOT practical most of the time. It is also difficult to have successful play back of the scripts using those recording modes. These two recording modes are effective if the keyboard control is important, or the exact mouse clicks and keyboard input is the factor. Here are the situation you may want to use analog and low-level recording. Use Low-Level Recording when: The exact coordinates of mouse clicks or drag and drop operations are needed for objects. A type or click operation is useful for a successful test playback. An example of a Low-Level recording might be when you want to send an email with signature, or a drawing. The capture of the actual mouse movement across the screen is important to the test. When custom or unsupported objects are not successfully recorded or do not successfully trigger events upon replay.

Use of TestIteration and ActionIteration Environment Variable in QTP

Why TestIteration? A good use of “TestIteration” built in environment variable would be if you want to execute a specific section of Sceipt based on the number of Iteration. For example, if the test runs the first iteration we want to execute Function A and 2 nd iteration Function B. How to read the runtime Test Iteration? TestIteration is a built-in environment variable in Quick Test Professional, so we can read it using the Environment keyword. The syntax is bellow: tIteration = Environment(”TestIteration”) Example of TestIteration use: ‘Using If-Else statment tIteration = Environment(”TestIteration”) If tIteration = 1 Then Call FunctionA() ElseIf tIteration = 4 Then Call FunctionB() End If Note : Quick Test Pro (QTP) also have “ActionIteration” environment variable to read action iteration.

Ticket

Ticket A software developer/tester convention was being held. On the train to the convention, there were a bunch of developer majors and a bunch of tester majors. Each of the developer majors had his/her train ticket. The group of testers had only ONE ticket for all of them. The developer majors started laughing and snickering. Then, one of the software testers said, "here comes the conductor" and then all of the testers went into the bathroom. The developer majors were puzzled. The conductor came aboard and said "tickets please" and got tickets from all the developer majors. He then went to the bathroom and knocked on the door and said "ticket please" and the testers stuck the ticket under the door. The conductor took it and then the testers came out of the bathroom a few minutes later. The developer majors felt really stupid. So, on the way back from the convention, the group of developer majors had one ticket for the group. They started snickering at th...

Save your money from cheaters

Dear Friends I write this to inform all of you about fraud and cheat of What is Testing a subsidiary of Pure Testing, Sector 58, Noida I can describe better with a questionaries, sequenced by 3 serial no. 1= Question asked by the candidate to the course counsellor 2= Answered by WIT's Testing Course Counsellor 3= Reality I faced, during and after the Testing Course 1= Mam I think my commerce background as an educational stream, would not be suitable for this course. 2= No, Dont worry about your nontechnical educational background as today the testing industry has a lot of requirement, and the B. Com. is a good background for the commercial project. So, be sure about your course suitability and get the admission 3= After completion of my course, one day the placement assistent said me that Pankaj your educational background is non technical, so that it is not fit for testing professional. 1= What will be your syllabus/content. 2= Here you will cover both the Manual and Automati...

The future of QuickTest Pro

HP just gave a revealing presentation about the next version of QuickTest Pro. It is codenamed Atlantis, and it will probably be called QuickTest Pro 10.0. QTP 10 is targeted to be released in the beginning of 2009. I’ll break down some of the features that were discussed. IDE Improvements Adding a TODO pane populated by comments prefixed with TODO: . This is similar to what Test Design Studio and many other IDEs do. Dynamic Surrounding - I’m unsure about this feature, as I haven’t heard the term Dynamic Surrounding before. The presenter indicated that it basically meant auto indenting code within If statements and loops, but QTP’s IDE already does that, so I must have misunderstood. Maybe this is something like the surround snippets in Test Design Studio. HP would do well to include something like that in QTP. IntelliSense Improvements - three areas where IntelliSense will be improved Adding second-level IntelliSense — example given was if an objects property is also an object,...

HP QTP 9.5 first impressions

I managed to get my hands on a copy of Quicktest Pro 9.5, and it appears to not be as big of a change as I expected. At least the portions of QTP that I use are mostly unchanged. It looks like most of the updates happened in the area of Object Repository and various n00b features. The first thing that struck me as soon as I saw the default font is that HP doesn’t consider QTP a tool for programmers. Rule number one for every IDE should be that nobody wants a proportional font. At least it only took about 15 seconds to change the font to Consolas. The next thing I did was open one of my existing 9.2 tests. After QTP prompted me to convert it to 9.5, the test ran without error. I ran our standard suite of smoke tests on 9.5. To my relief they all ran without error. I was expecting to have to do a bit of refactoring for QTP 9.5, but I seem to be spared for now. I was curious what a few of the new features are. The marketing literature wasn’t exactly clear on some of these. Process Gui...