Showing posts with label quicktest professional. Show all posts
Showing posts with label quicktest professional. Show all posts

Tuesday, July 1, 2008

QTP - Smart Identification

Sometimes back, I was in a QTP interview panel. Most of the candidates do not know about smart identification. That's why, I thought to write to this post.

Need of Smart Identification
Smart identification is a technique in QuickTest Professional. It is used to identify the objects, even though few mandatory properties are changed at run time.

Smart Identification Overview
The Smart Identification dialog box enables you to create and modify the Smart Identification definition that QuickTest Professional uses for a selected test object class. When the recorded definition for an object does not enable QTP to identify an option, QuickTest Professional uses the smart identification definition (if defined and enabled) to identify the object.

Smart Identification uses two types of properties:


  1. Base filter properties: The most fundamental properties of a particular test object class; those whose values cannot be changed without changing the essence of the original object. For example, if a Web link's tag was changed from <A> to any other value, you could no longer call it the same object.

  2. Optional filter properties: Other properties that can help identify objects of a particular class as they are unlikely to change on a regular basis, but which can be ignored if they are no longer applicable.


To know more about Smart Identification, You can see the QuickTest Professional Help for following topics:

  1. About Configuring Smart Identification

  2. Understanding the Smart Identification Process

  3. Reviewing Smart Identification Information in the Test Results

  4. Walking Through a Smart Identification Example

  5. Step-by-Step Instructions for Configuring a Smart Identification Definition

Wednesday, June 25, 2008

Comparison between SilkTest and QuickTest Professional

Two months back, I thought to write a post about SilkTest and QTP comparison. Both the tools are market-leading testing tools. The latest versions of both tools have Vista and Flex support. I did not give any detailed description for each feature or item.

Product page
Here I have listed the product pages for both.
Silktest Product Page
Quick Test Professional Product page

Wiki pages
Silktest on Wiki
QuickTestProfessional (QTP) on Wiki

Code samples for both tools
Sample 4test code snippets for SilkTest
Sample QTP and VB Script code snippets

References:


  1. SILKTEST AND WINRUNNER FEATURE DESCRIPTIONS - By Horwath/Green/Lawler

  2. WinRunner vs. QuickTest Pro Quick Comparison - By Shawn LoPorto, Senior Test Automation Architect

  3. AUTOMATION TEST TOOLS - By Ray Robinson, 2001

  4. Comparision of Web testing tools



Comparison Table: SilkTest Vs QuickTest Professional


Features

SilkTest

QuickTest Professional

Recording ScriptRecorder available with different set of features.Recorder available with different set of features.
OS Windows upto Vista, Unix (SilkBean)Windows upto Vista, Unix (Xrunner)
Browsers supportInternet Explorer, Netscape, FireFox, AOLInternet Explorer, Netscape, FireFox, AOL
Database testsWith the help of DSN (ODBC32 Interface)With the help of DSN (ODBC32 Interface) plus VB Scripting
Data functionsGoodGood. Having extensive support for SpreadSheet (Excel).
TestsTermed as Testcase. Each Testcase has block of coding statements.Termed as Actions. Each Action has block of coding statements.
Test ScriptScript is a single file.Actually Script is a folder and have set of supporting files.
Code ViewClassic 4Test, Visual 4TestKeyword View, Expert View
Objects RepositoryOfficial term is Window declarations. They can be edited directly from the Editor.Maintained as separate file. With the help of utility, objects are modified. Two types as per QTP setting. They are 'Per Action Repository' and 'Shared Repository'. File extensions will be varied for each type.
Dynamic objectsObject properties can be passed dynamically. Variety of methods available to handle them.Object properties can be passed dynamically. Another term is known as Descriptive Programming.
Class MappingClass Mapping is available.Class Mapping is available.
Custom ClassesRecorderClass and Extension Kit are available.Virutal Object Wizards available.
Image testingBitmap Capture and Verification functions.Bitmap Capture and Verification functions.
Test/Error RecoveryPowerful Recovery system available.Recovery Manager
VerificationProvided Verify and Verify Properties functions.Provided check points for different purposes.
Results ReportingResults are stored into *.res binary files. It can be converted into differnt formats. Multiple versions can be stored into single file.QTP results are stroed as XML files and can be converted to HTML files. Result folder contain many files. One result folder can store results for only one run.
Test Management Tool IntegrationIntegrated with SilkCentral Test Manager.Integrated with Quality Center.
Distributed TestingRemote Agent.Having Remote COM Agent.
DLL support Only Standard DLLs. It does not support the COM/ActiveX DLLs, which are created by VB/.NET.Both COM and Standard DLLs are supported.
Java SupportYesYes
Flex Support Available to certain extent.Available to certain extent.
DotNet SupportYesYes
Internatioalization (i18N) Support YesYes
Timer functionsHaving rich set of functions to calculate time taken for block of statements or testcases. Help: TimersHaving limited functions to calculate time taken for block of statements or actions. Help: Measuring Transactions
Environment support Can access OS level variables.Can access OS level variables.
Batch RunSuite (*.s) and Test plan (*.pln) are available.Test Batch Runner utility.
Coding 4Test Language. Similar to Visual Basic
Ability to run multiple scripts consistantly and continuously.YesShould run from Quality Center.
Coding Style 4Test Language. Similar to C++Visual Basic Script
Integration with External librariesNO VB Script libraries.
Code Samples Few samples from vendor. Few samples from vendor. But many VB Script samples available on Internet.
OOPs SupportYes. Oops concepts are supported for certain extent. User can extend standard classes.NO
Data types Set of data types are available. User can create their own data types also. Set of data types are available. User cannot create their own data types
Interactive DebuggingDebugging features available.Debugging steps available.
Ease of use Just record and playback, won't help. Medium. Record and playback used to help. Very Simple. Easy to learn.
DocumentationHLP file available. PDF docs are only for beginners.Both CHM and PDF files are available. Enough info.
Tool Updates Continuing process. Continuing process.
Cost~$9KMore than $10K
Script Templates Manual. No Ways to create automatic templates. Manual. No Ways to create automatic templates.
EditorGood. Simple one. Having Project explorer similar to MS Visual Studio.Better one with nice look. But using tabs to show more than one script.
Tool Support Tool support is available for only latest versions (from silktest 8.0 ) Tool support is available for only latest versions.
Latest VersionSilktest 2008QuickTest Professional 9.5
Strengths Good Development language, good online community, recovery system, Good cross browser support, Code MaintenanceThe most popular test tool by great user base, plenty of jobs, good online community, Good cross browser support.
WeaknessesHelpdesk, Slightly expensive, Skilled resourcesHelpdesk (Getting bad now), Expensive tool.
Vendor Borland. Initially developed by Segue. Borland acquired Segue on 2006. HP (Hewlett-Packard). Initially developed by Mercury Interactive. HP acquired Mercury on 2006.
Product Name Changes Initially QA Partner. Later changed to SilkTest.Initially Astra QuickTest. Later changed to QuickTest Professional.



Note:In case, if you want to add or modify any feature, please drop a mail to palani.selvam@gmail.com

Thursday, June 5, 2008

QTP - Handling Dynamic objects

Most of the QTP (Quick Test Professional) users are using playback methods to develop the scripts. Here I have given a code snippet to handle dynamic objects. You can put the object physical description directly. You can develop the script with Object Repository.

Code: Login for Mercury Flight

Dialog("nativeclass:=#32770","text:=Login").Activate Dialog("nativeclass:=#32770","text:=Login").WinEdit("nativeclass:=Edit","attached text:=Agent Name:").Set "tester1" Dialog("nativeclass:=#32770","text:=Login").WinEdit("nativeclass:=Edit","attached text:=Password:").Set "mercury" Call wait(2) Dialog("nativeclass:=#32770","text:=Login").WinButton("nativeclass:=Button","text:=OK").Click

Code: Browser certification dialog
If Browser("name:=Certificate Error: Navigation Blocked").Page("title:=Certificate Error: Navigation Blocked").Exist(0) Then ' To DO End If

Saturday, May 3, 2008

QTP - TextBox Length

I was going through EMOS Framework. I think that this framework has been developed in QuickTest Professional 6.5 There I have seen a function to find the text box length. Below I have given that code snippet, which is very simple.

Code:

Public Sub BrowserWebEdit (strWebEdit,strInValue) If strInValue <> "" Then 'Get Length of strInValue InLenCount = Len(strInValue) 'Get Max Length for input LenCount = Browser(strBrowser).Page(strPage).WebEdit(strWebEdit).GetROProperty ("max length") If InLenCount > LenCount Then If LenCount <> -1 Then 'Trim Length of input Reporter.ReportEvent micWarning, strInValue , InLenCount & ": Length exceeds field input value trimed to: " & LenCount strInValue = Left(strInValue, LenCount) End If End If Browser(strBrowser).page(strPage).Sync Browser(strBrowser).Page(strPage).WebEdit(strWebEdit).Set strInValue End If End Sub

Thursday, March 20, 2008

QTP - Getting INPUT objects

I wrote a qtp (Quicktest Professional) code for listing INPUT element's objects. Descriptive Programming is a feature in QTP. It is used to handle dynamic objects. I will write later about Descriptive Programming. Here below function returns particular type of objects in a web page.

Function:



'Calling function to list editboxes
Set ObjEditAll = ListAllWebObjects (Browser("My APP").Page("First Form"),"text")

Function ListAllWebObjects (ObjContainer,sControlType)
' Getting all type of INPUT objects
Dim MyDescription,objEditBoxes,NoOfChildObjs,Counter,strReport
Dim sTemp, objEdit

'Initialization
'ListAllWebObjects = Nothing
Set MyDescription = Description.Create()
MyDescription("html tag").Value = "INPUT"
MyDescription("type").Value = sControlType

Set objEditBoxes = ObjContainer.ChildObjects(MyDescription)
NoOfChildObjs = objEditBoxes.Count

strReport = ObjContainer.ToString() & " contains the following child object(s):"
For Counter=0 to NoOfChildObjs-1
strReport = strReport & vbNewLine & objEditBoxes.Item(i).ToString()
set objEdit = objEditBoxes(Counter)

sTemp = objEdit.GetROProperty ("name")
Reporter.ReportEvent micDone, objEdit.ToString() & " - name property", sTemp

sTemp = objEdit.GetROProperty ("class")
'sTemp = objEdit.object.ClassName
Reporter.ReportEvent micDone, objEdit.ToString() & " - class property", sTemp

sTemp = objEdit.GetROProperty ("index")
Reporter.ReportEvent micDone, objEdit.ToString() & " - index property", sTemp

sTemp = objEdit.GetROProperty ("location")
Reporter.ReportEvent micDone, objEdit.ToString() & " - location property", sTemp

sTemp = objEdit.GetROProperty ("html id")
Reporter.ReportEvent micDone, objEdit.ToString() & " - html id property", sTemp

sTemp = objEdit.GetROProperty ("innerhtml")
Reporter.ReportEvent micDone, objEdit.ToString() & " - innerhtml property", sTemp

sTemp = objEdit.GetROProperty ("outerhtml")
Reporter.ReportEvent micDone, objEdit.ToString() & " - outerhtml property", sTemp

sTemp = objEdit.GetROProperty ("innertext")
Reporter.ReportEvent micDone, objEdit.ToString() & " - innertext property", sTemp

sTemp = objEdit.GetROProperty ("outertext")
Reporter.ReportEvent micDone, objEdit.ToString() & " - outertext property", sTemp

Next

set ListAllWebObjects = objEditBoxes

Reporter.ReportEvent micDone, ObjContainer.ToString() & " child objects", strReport
End Function