Search This Blog

Saturday, August 15, 2009

What is FrameWork in QTP

1)Framework defines how to approach for scripting .Framework may change form company to company & project to project.
It may be recording or descriptive
…………………………………….
Automation Framework is nothing but Common Name Conviction where all the team members should follow same names(like OK ...)while updating in the object repository in order to
avoid confusion.
……………………….
Automation Framework is nothing but the way we r doing automation is represented in a systematic way with proper planning like Initial Setup(setting up shared
repository..), Tool configuration,Test Data files,library
files,Script generation,Enhancements,Synchronisation,Exception
handling,Batch test,maintaning the scripts....all whichever
related to our automation plan.
…………………………………
Automation Framework is nothing but a set of guidelines designed by expert to accomplish a task in an
effective,eficcient and an optimised way. there are 4 different types of Framework 1)linear 2)
modular 3)keyword 4)hybrid max we follow keyword Framework
keyword Framework is nothing but creating a software
structure like
1)scripts 2)object repository 3)test data 4)recovery
scenario 5)log files 6)library files etc
1)create scripts and save it in scripts component
2)create shared o.r and save it in o.r component
3)create test data and save it in test data component
Etc after creating all these components include the files or
components to script or qtp and execte the script
………………………………….
Automation Framework is one....it is a test plan for automation testing which drives entire automation testing
in a sytemamatic and scientific manner to execute the test script like Main Script--->DriverScripts--->Environment variables, Library files, Functions, Test Data(data table -
Parameterization.

Here MainTest Script will call the DriverScripts
DriverScripts will call the required Env, Lib files,
Func.....etc.
So the entire test will be executed/carried out in a flow like explained above.(This comes under Keyword Driven Framework).
………………………………………….

In real time projects, we use to call, Framework as a folder. This folder contains the components such as ,
Object Repository, logs ,test data,script,result...etc. so whatever files are created to develop a script are stored
in a separate folder, which is nothing but a Framework.
…………………………………….


It basically depends upon the type of Framework being used - datadriven, modular, keyword based or hybrid Framework.

Test automation Framework is a set of assumptions, concepts and practices that provide support for automated software testing.

Common Error Message Description in QTP

Error Number Description
429 ActiveX component can't create object
507 An exception occurred
449 Argument not optional
17 Can't perform requested operation
430 Class doesn't support Automation
506 Class not defined
11 Division by zero
48 Error in loading DLL
5020 Expected ')' in regular expression
5019 Expected ']' in regular expression
432 File name or class name not found during Automation
operation
92 For loop not initialized
5008 Illegal assignment
51 Internal error
505 Invalid or unqualified reference
481 Invalid picture
5 Invalid procedure call or argument
5021 Invalid range in character set
94 Invalid use of Null
448 Named argument not found
447 Object doesn't support current locale setting
445 Object doesn't support this action
438 Object doesn't support this property or method
451 Object not a collection
504 Object not safe for creating
503 Object not safe for initializing
502 Object not safe for scripting
424 Object required
91 Object variable not set
7 Out of Memory
28 Out of stack space
14 Out of string space
6 Overflow
35 Sub or function not defined
9 Subscript out of range
5017 Syntax error in regular expression
462 The remote server machine does not exist or is
unavailable
10 This array is fixed or temporarily locked
13 Type mismatch
5018 Unexpected quantifier
500 Variable is undefined
458 Variable uses an Automation type not supported in
VBScript
450 Wrong number of arguments or invalid property
assignment

Checklist for web services

Design Considerations
Check Description

Design chunky interfaces to reduce round trips.

Prefer message-based programming over remote procedure call (RPC) style.

Use literal message encoding for parameter formatting.

Prefer primitive types for Web service parameters.

Avoid maintaining server state between calls.

Consider input validation for costly Web methods.

Consider your approach to caching.

Consider approaches for bulk data transfer and attachments.

Avoid calling local Web Services.
Connections
Check Description

Configure the maxconnection attribute.

Prioritize and allocate connections across discrete Web services.

Use a single identity for outbound calls.

Consider UnsafeAuthenticatedConnectionSharing with Windows Integrated Authentication.

Use PreAuthenticate with Basic authentication.
Threading
Check Description

Tune the thread pool using the formula for reducing contention.

Consider minIoThreads and minWorkerThreads for intermittent burst load.
One Way (Fire and Forget) Communication
Check Description

Consider using the OneWay attribute if you do not require a response.
Asynchronous Web Methods
Check Description

Use asynchronous Web methods for I/O operations.

Do not use asynchronous Web methods when you depend on worker threads.
Asynchronous Invocation
Check Description

Consider calling Web services asynchronously when you have additional parallel work.

Use asynchronous invocation to call multiple unrelated Web services.

Call Web services asynchronously for UI responsiveness.
Timeouts
Check Description

Set your proxy timeout appropriately.

Set your ASP.NET timeout greater than your Web service timeout.

Abort connections for ASP.NET pages that timeout before a Web services call completes.

Consider the responseDeadlockInterval attribute.
WebMethods
Check Description

Prefer primitive parameter types.

Consider buffering.

Consider caching responses.

Enable session state only for Web methods that need it.
Serialization
Check Description

Reduce serialization with XmlIgnore.

Reduce round trips.

Consider XML compression.
Caching
Check Description

Consider output caching for less volatile data.

Consider providing cache-related information to clients.

Consider perimeter caching.
State Management
Check Description

Use session state only where it is needed.

Avoid server affinity.
Attachments
Check Description

Prefer Base64 encoding. Direct Internet Message Encapsulation (DIME) is a supported part of Web Services Enhancements (WSE), but Microsoft® is not investing in this approach long-term. DIME is limited because the attachments are outside the SOAP envelope.
COM Interop
Check Description

Avoid single-threaded apartment (STA) COM objects.

Folder Structure in QTP Package

The high level explanation could be as follows:

1.

2.
a. Action folders : , , ....

b. Files inside the :
1. .cfg file -
This holds the run time information like addins loaded, user information, etc.

2. .prm file -
Hlds the information about the number of iterations and the parameters that are used within the script / action.

3. .usr file -
This will be generated to hold the name of the script, the object repository info, etc.

4. .lck file -
This is a lock file.

5. .mtr file -
(No idea)

6. .xls sheet -
The default sheet that holds the parameters used within the script.

7. .prm.bak file -
backup file.

8. .usp file -
Stores some RUnLogic information for the script.

9. thin_usr.dat file -
similar to the thick usr file. The diff is not clear exactly.

10. thick_usr.dat file -
Stores high level info about all the above and below files indicating what set of files was created, etc.

11. .tsp file -
??

3. folder:
This is a default folder that is created to hold the following:

a. folder:
This will hold all the active screen files which are zipped, pertaining to that action.

b. Resource.mtr file -
This file holds info regarding the object rep used, the shared libraries used, and possibly maitains a track of how the script is being accessed through the code. Ie. the call chain.

c. Script.mts -
This is the script file actually.

d. .tsr -
The object rep file if used in per action mode.

e. The result file.

f. The action excel sheets.

The subsequent action folders hold similar set of files.