Sunday, June 3, 2007

VBScript in QTP

VBScript in QTP Scripting language for Quick Test Professional (QTP) is VBScript.VBScript (short for Visual Basic Scripting Edition) is a lively Scripting language interpreted via Microsoft's Windows Script Host.
VBScript has many powerful functions and provides excellent support for variables, data types, and error handling.Two script engines can interpret VBScript- VBScript.dll, which is invoked by asp.dll is used in web environment and Wscript.exe & Cscript.exe in Windows GUI environment using Windows script Host (WSH, We typically use VBScript within WSH to automate systems administration tasks. WSH is the system module that transforms a VBScript file into a Windows executable file). Wscript.exe is used to display output and receive input in Windows GUI format such as dialog and input boxes. Cscript.exe is used in a command-line environment. When VBScript source code is contained in stand-alone files, they have the file extension .vbs.
VBScript Variable
VBScript Arrays

Saturday, June 2, 2007

Testing Process of QTP

QTP (QuickTest Professional) lets you create tests and business components by recording operations as you perform them in your application.



Test - A compilation of steps organized into one or more actions, which we can use to verify that our application performs as expected. A test is composed of actions (3 kinds of actions are there in QTP Non-reusable action, Reusable action and External action).



1)First step is Planning


Before starting to build a test, you should plan it and prepare the required infrastructure.



For example, determine the functionality you want to test, short tests that check specific functions of the application or complete site.



Decide how you want to organize your object repositories.


2)Second step in QTP is Creating Tests or Components.


We can create a test or component by


a) Either recording a session on your application or Web site.As we navigate through the application or site, QuickTest graphically displays each step we perform as a row in the Keyword View. The Documentation column of the Keyword View also displays a description of each step in easy-to-understand sentences. A step is something that causes or makes a change in your site or application, such as clicking a link or image, or submitting a data form.


OR


b) Build an object repository and use these objects to add steps manually in the Keyword View or Expert View. We can then modify your test or component with special testing options and/or with programming statements.


3)Third step isInserting checkpoints into your test or component.A checkpoint is a verification point that compares a recent value for a specified property with the expected value for that property. This enables you to identify whether the Web site or application is functioning correctly.


4)Fourth step isBroaden the scope of your test or component by replacing fixed values with parameters.To check how your application performs the same operations with different data you can parameterize your test or component.
When you parameterize your test or component, QuickTest substitutes the fixed values in your test or component with parametersEach run session that uses a different set of parameterized data is called an iteration.We can also use output values to extract data from our test or component. An output value is a value retrieved during the run session and entered into the Data Table or saved as a variable or a parameter. We can subsequently use this output value as input data in your test or component.We can use many functional testing features of QuickTest to improve your test or component and/or add programming statements to achieve more complex testing goals.


5)Fifth step is running the testAfter creating test or component, we run it.Run test or component to check the site or application.When we run the test or component, QuickTest connects to your Web site or application and performs each operation in a test or component, checking any text strings, objects, or tables you specified. If we parameterized the test with Data Table parameters, QuickTest repeats the test (or specific actions in your test) for each set of data values we defined.Run the test or component to debug it.We can control the run session to identify and eliminate defects in the test or component. We can use theStep Into,Step Over,And Step Outcommands to run a test or component step by step.We can also set breakpoints to pause the test or component at pre-determined points.We can view the value of variables in the test or component each time it stops at a breakpoint in the Debug Viewer.


6)Sixth step is analyzing the resultsAfter we run test or component, we can view the results. View the results in the Results window.After running the test or component, we can view the results of the run in the Test Results window. We can view a summary of the results as well as a detailed report.


Report defects identified during a run session


.If Quality Center is installed, we can report the defects fond out to a database. We can instruct QuickTest to automatically report each failed step in the test or component, or we can report them manually from the Test

QTP

What is QTP (QuickTest Professional)?
QTP (QuickTest Professional) is Mercury's advanced keyword-driven testing solution. QTP (QuickTest Professional) provides for functional test and regression test automation.

With QTP (QuickTest Professional) you will be able to test
  • Standard Windows applications
  • Web objects,
  • ActiveX controls, and
  • .Net
  • Java
  • SAP (Systeme, Anwendungen und Produkte in der Datenverarbeitung, Systems, Applications and Products in Data Processing)
  • Visual Basic applications.
  • Siebel
  • Oracle
  • PeopleSoft and
  • Terminal emulators

We need additional QuickTest add-ins for special environments e.g. .Net, Terminal emulators. The current version of QTP (version 9.x) supports running tests on the following browsers:

  • Microsoft Internet Explorer 6.0,Service Pack 1 or 7.0,Beta 2 and lower,
  • Netscape Browser 8.0
  • Mozilla FireFox 1.5

QuickTest Professional 9.2 is compatible with: SAP 8.2, .NET 9.2, Web Services 9.2, Java 9.1, Oracle 8.2, PeopleSoft 8.2, Siebel 8.0, Stingray 8.2, Terminal Emulator 8.0, and VisualAge Smalltalk 8.2.

QTP (QuickTest Professional) is Unicode compliant according to the requirements of the Unicode standard, enabling you to test applications in many international languages.

As and when an application under test changes, such as when a "Log in" button is renamed "Sign Into," we can make one update to an XML-based Shared Object Repository (within the new Object Repository Manager), and the update will circulate (propagate) to all tests that reference this object. QuickTest Professional keeps object-level changes synchronized among users throughout test creation efforts.

Moreover, now users can invoke and run Mercury WinRunner™ scripts and functions from Mercury QuickTest Professional, and then automatically report WinRunner results back into the original scripts.

CHK IN

Custom Search