Search This Blog

Wednesday, August 18, 2010

How to Manage Automation Expectations:

How to Manage Automation Expectations:
In order to implement a successful automation effort, testers need to educate management on a number of different issues. Educating management on these issues could mean the difference between a successful automation effort and a failed automation attempt.


One such important issue addresses integrating test automation into the entire development process. Testers need to educate senior management as well as script writers on how a specific tool will fit into their software development environment and software development life cycle. It is equally important to remind everyone that manual testing does not end when automation is implemented.


Another issue concerns the purchasing of tools and their impact on test planning. Test planning, planning what to test and how to test, becomes much more complex and more important when a tool is purchased. For example, test automation is rarely justified for all testing. The tester needs to determine what tasks make sense to automate and what does not make sense to automate.


Moreover, the organization needs to understand that automation does not eliminate manual efforts on the part of testers. Testers need to maintain automation scripts and verify the execution of automated scripts. This is manual work that needs to be factored into the test team's testing activities.


In addition, in order to automate successfully, testers need training and time to master the test tools. Many managers view the test tools as simple capture / playback programs which a tester can learn and implement in his spare time. This is a misconception. Successful test automation frequently requires the use of complex tools — tools which are much more complex than the just capture / replay tools. In order to use these tools effectively, testers need considerable training. Management needs to be committed to training testers on these tools and to establishing the infrastructure in which the tool operates.


Also successful test automation requires the involvement of the software development team as well as testers. In the past, developers and testers had minimal contact. Frequently, the philosophy was to "throw code over the wall and see if it works". This type of interaction does not work when automating the testing process. Developers and testers need to work much more closely together. Developers have to provide support personnel and technical information on their development methods. They can be asked to use the automation tools during their unit and integration testing. More troubling to the developer will be that test automation may raise concerns about the testability of their code. This especially will be the case if standards are not followed, or if developers use odd, homegrown or even very new libraries / objects.


The organization’s project management team must have a clear understanding about the types of roles and responsibilities required for a successful automation effort. The creation of the test environment starts when an organization purchases hardware and installs a tool. Then the test team and development team need to work together to build and maintain a test automation environment that may include dedicated servers, workstations, databases and the like. Management needs to include development of the test environment in the overall project plan. They should also budget for the resources needed to successfully automate testing.


Successful tool automation depends not only on the test tools but also on a standard testing process and the right test team roles, duties and skills. Tools, process and test teams are the three essential legs of the test automation stool.


Moreover, the automation test team needs to have a blend of testing, programming, and tool knowledge. If an organization wants to reap the automation benefits promised by tool vendors, it needs to use the tool as a complement to manual testing. It also means adopting a strong test methodology and training the test team on the ins and outs of the selected tool in an organization's unique development environment.

How to Generate Excel Reports in QC 10.0

To Create Excel reports -We need to have access for DashBoard module in QC 10.0
For QC 9.2 the reports option is under Tools - Home Page
and For QC 9.0 there is no option to generate Excel Reports

Navigation - QC 10.0 -
1) Go to DashBoard module
2) Select Excel Report in top left corner
3) Enter Report Name
4) Write Query under Query Tab
5) Add macro under Post Processing Script
6) Set the Status to "Ready"
7) For test purpose we can use Query Generator
8) For viewing of Tables we can use Query Generator
9) Click Generate Query
10)There you go report

Tuesday, August 17, 2010

Advantages and Disadvantages of Dictionary Objects

Dictionary Object

Dictionary Object stores data key, item pairs. A Dictionary object stores the items in the array. Each item is associated with a unique key. The key is used to retrieve an individual item and is usually an integer or a string, but can be anything except an array.



Adavntages of using it in QTP:

1. can be used as Global variable declaration. so that any test can access the values from it in the run time.

2. You can store and retrive any number of run time values in to dictonary.

3. It is one of the Parameterization techique we can use in QTP



Disadvantages:

we can not specify the values in the desingn time like Datatable , Action parameters, environment variable.

So it is useful only in Run time , not design time

What is Dictionary Object - Overview

Dictionary object allows storing key value pairs. A dictionary object can be used for easy lookup of values. Dictionary is a not a QTP specific functionality and is available in normal VBScript as well.

Creating the Dictionary
A dictionary object can be created using CreateObject for COM class “Scripting.Dictionary”. The code below shows how to create the dictionary object in QTP


'Create the Dictionary Object
Set oDict = CreateObject("Scripting.Dictionary")


Below table shows list of methods that dictionary objects supports.
Method Description
Add (key, item)- Adds a key and item pair to a Dictionary object.
Exists(key)- Returns true if a specified key exists in the Dictionary object, false if it does not
Items() - Returns an array containing all the items in a Dictionary object
Keys() - Returns an array containing all existing keys in a Dictionary object.
Remove(key) - Removes a key, item pair from a Dictionary object
RemoveAll() - The RemoveAll method removes all key, item pairs from a Dictionary object.

Count - Returns the number of items in a Dictionary object. Read-only.
Item Sets or returns an item for a specified key in a Dictionary object. Read/write
Key(Key) Sets a key in a Dictionary object.

Adding Items to Dictionary:
There are two ways to Add items to dictionary. One is to use the Add method and another is to use the Item property. Both the methods are shown in code below
'Method 1 for Adding items to dictionary
'Add items to dictionary
oDict.Add "CA", "California"
oDict.Add "LA", "Los Angeles"

'The below line will throw an error as LA key already exist
oDict.Add "LA", "Los Angeles 2"

'Method 2 for adding items to dictionary
oDict.Item("CA") = "California"

'Item is the default property so ".Item" is not required
oDict("LA") = "Los Angeles"

'No Error this time as we are actually using the
'Item property and not the Add method
oDict("LA") = "Los Angeles 2"100 Miles From Memphis