Monday, February 19, 2007

QTP FAQs

Q: How to merge data files using QTP
You can use the same sheet, which can be used for different scripts.
When you refer the same sheet and if it is being used by another script, then it gives
the message as "Already Open", the solution to this problem is, At run time, you have
to Load the common sheet into the local sheet. And you can use it wherever needed.
At this time, every script will have its local copy and hence you can get rid of your
problem.

Application Monitoring:

1. What happens to the table space when database is accessed.
2. What happened when huge number of records are getting inserted, these is usually
applicable for reliability ( soak ) testing when the application is tested for 80 hours +.
3. how are the records getting accessed.
4. Are bind variables used and etc...
5. Security with regard to accessing records, whether correct records are available for that
user ( this is highly applicable for banking application ).

Q: Database Performance Testing

Server Monitoring:

1. This helps to understand how the server is behaving for the database installed on
platforms ( windows, UNIX different flavors ).
2. Memory leak when huge number of records are getting accessed and when huge
number of users are accessing the database.
3. The I/O behavior is very important when considering db performance testing

Q: Kindly solve Winrunner prob. (Ambiguity is coming in objects)

GUI MAP COFIGURATION

there is option to distinguish 2 objects with the same label.U can distinguish it based on the x,y co-ordinates, label name & other measures.Provisions are there in the winrunner gui map configuration for that.

As far as testing is concerned we need to have test plan primarily ,then we need to have functional spec to understand the functionality , if the application is enhanced version of some other application we need to have the gap analysis document

Q. Mixed Usage of Tools for Functional Testing
I have a problem with the interpretation of these numbers. How does 26% of the respondents not using tools translate into a majority? My math says 74% use the tools provided by their company. Then, of course, you have to ask what the 36% is a percentage of. Is that of the 147 total respondents or is that of the 74% of the total that use tools?
While I agree with the premise that managers may not account for the training needed for their people to learn the tools provided, polls can be interpreted or designed to mean anything you want them to.
Regression Test : Your correct the Regression Test Scripts are differentfrom System Test Scripts. After the System Testing is done with all the defects are closed, the Regression would begin. The System Testing would ensure that theRequirements are met in the applications. But the Regression Testing would ensure whether all the Business functionalities are maintained. The followingpoints should be taken care while preparing the Regression Test Scripts1. Preconditions: System Testing should have been done successfully prior to the
Regression Testing2. Write the test case document right from the scratch of the application flow3. check all the functionality in one single Process rather than testing individually.4. Include all the System Test Scenarios in the Regression Test Script in the form of
Business flow5. Don’t write a Regression Test case where you can break the application (It Means the Negative / Destruction Scenarios). RTC is a
document whether application process is smooth.6. Get an Input from the clients on how the application is used. Based on that, create a
flow chart of the
Business flow and then create the Test Script.
I believe you cannot refer the new test cases to regression testing.
Lets say when you have executed test previously for a function, you will run regression test for previously tested cases and verify the results. Regression test will only include those test cases that need to be verified after fixes or new version. So the new test cases may be written for the testing of that function as new test cases which will be verified in next version by regression test.
And as regression test is said to be verification for fixes and functionalities previous version/build had
First two lines of yours is the definition of Regression testing, where in i feel that we will be executing the same test cases again (by looking at the definition itself). We are retesting the same functionality again after bug fixes, to check whether the same functionality has no additional bugs or issues, and then there should be no separate test cases for regression testing.
Incase if the functionality has changed in the phase of regression testing then, for those changes in the functionality, we need to write additional test cases and not a completely new document for the regression test. We need to Change the existing test cases document if any changes in functionality has been taken into consideration or we need to update the same test case document or in the change requirement document we can mention the added functionality.

Pre-shipping Anti-virus Scanning Policies
before shipping the product to customer , we will test the product withvarious antivirus by following ways.1. Install the software in a system, which has antivirus already installed.2. Install the software without antivirus.3. Before installing the product, install the anti virus and then install the product.4. Run the product with anti-virus software5. Run the product without antivirus software.the first 3 cases are make sure with/without anti virus the product getinstalled correctly or not and the last 2 cases make sure product works finewith or without antivirus software.AJAX testing:
You can use HTTPwatch like utility to know the followings
Headers, Cookies and URLs
HTTP method (GET, POST, etc...)
Time taken to complete a request
Size of downloaded page, image or file
HTTP status codes or error codes if the request failed
Parameters sent in a query strings and POSTs
Network operations required, such as DNS lookup or socket connects
Whether the content was read from the browser cache or downloaded from the server
Ø QA project size
Generally it is a rough estimate of the number of man ours necessary to
perform the QA tasks for the project. The team size will then be determined by
seeing how many people you will need to fit that many man hours into the schedule.

The size if the application has little bearing to the project size as there are many cases where a project is only a small addition to an existing product but requires a
full regression of that existing product so something which is only a few hundred K
of code could require 5000 - 10,000 man hours to fully test and then on the flip side
you may have an application that is several GB in size that is actually fairly easy to
test (maybe a Data migration or something with a lot of large graphic/video files
imbedded within it) requiring only a few hundred man hours.

One thing to make sure you remind whoever is in charge of building
the schedule is a job which is slotted at 1000 man hours can be done by 1 person in
143 days (assuming 7 hours a day of productive work) but it cannot be done by 10
people in 14.3 days. This is because each additional person you add into the project
causes more inefficiency into the system, more replication of work, and more time
spent in coordination meetings, etc. By the time you are up to 10 people you're
probably looking at only about 60 - 70% efficiency and so that 1000 man hour project
would stretch from 14.2 days to somewhere between 20 and 25 days.

Q. Difference between Test Strategy and Test Plan

Testing strategy comes before the test plan always. In Test strategy we will give overview about our project/product. And after this we will also mentioned that what are the risk involved with the project/product. Like if the Project/Product is web based so security is one of the biggest risks involved with the project/product. So to cope out such risk what type of testing approaches is needed is to be mentioned in the strategy document. And this document also tells how this method copes out with such risk. And in this we can also write the testing organization name. Like if we are saying in strategy we will do Unit level testing so we will also write Developer will do the unit testing and for functional testing, Testing team will responsible. This strategy document should be signed by PM and higher authority

Now in Plan - If we have define in strategy document that we will do functional testing, system Testing and unit testing so we will prepare separate plan for each type of testing define in strategy. Plan Contain scope, objective, distribution of task, resource allocation, deliverable, review etc..

Q.Difference between Test Strategy and Test Plan

A Test Strategy is not the same thing as an Test plan. The former should be visionary, conceptual and directional in contrast to an Test plan which is likely to be shorter term, tactical, focused, implementable and measurable.

As an example, compare the process of planning a vacation (where, when, duration, budget, who goes, how travel are all strategic issues) with the final preparations (tasks, deadlines, funding, weather, packing, transport and so on are all plan matters).

The test strategy is shaped by your overall business goals. It includes a definition of your business, a description of your application, products or services, a profile of your target users or clients. The test strategy is essentially a document that you use to judge the appropriateness and effectiveness of your specific test plans.
The test plan, can be thought of as the practical application of your test strategy.
How to test an application used to generate reports?
If you don’t have any predefined report format provided by client,
Here are some tips for REPORT part alone.
All report should have Header and Footer.
Header part should contain logo/report name and code.
Being MIS report, the header part should show the department name, for which the report is generated.
Page number / total no of pages, Date should be there either in the header or at the Footer.
Printed by [username] and with timestamp should be there in the footer. Eg. Printed by : Abc On dd/mm/yyyy hh:mm AM/PM
End of report should be there in the Last page of the report
Font should be the same. Font size for header and column heading can be more or it can be bold.
Amount should be displayed right aligned, and should display with decimals.
Currency name should be mentioned in the header level or should be mentioned in the Column header.
Totals/Grand totals shown should be the sum of all the values that is shown in the report.
Follow equal spacing between each column.

Apart from report, ensure for the following while testing,

None of the report should display default date 31/12/1899
Try for all possible criteria of report generation from the interface.
Check for Paper orientation - Portrait or Landscape. The one thing seen in preview should get printed as it is.
Print report in different printer to check for the default page size. Even if all the settings for the printer is correct, while printing margin may gets cutoff.
Check for direct print and print from preview.
If you are using 3rd party report generation tools, then deploy the application in different machine which don’t have the tool installed, this will help you to ensure that the entire required component is getting bundled while building the application setup. Or else, you may have to create a setup for installing the report component as a prerequisite while deploying.
If you are providing multi format report [.pdf, .doc,.rpt] check for the report alignment in all format.
Since yours is an MIS report, data will be huge, and hence will take time to generate the report.
If you want to go for more extensive testing, you can test the Views, as most of the reports data will be fetched through views.




Q. Exporting Test Cases in Excel
Here are the Steps to Access Microsoft Excel Add-in
1. Access Test Director from your Browser
2. Click on Add-ins Page( Which will be in the Left side)
3. Click on More Test Director Add-Ins
4. You will find a Page Showing Different Add-ins. From Microsoft Add-ins: Secion, Click on
Microsoft Excel Add-in
5 .This Add- In Is basically for “Enables you to export your existing test documents, requirements, or defects in Microsoft Excel directly to TestDirector”
With me also the same case here in my organization. We have the High level document.
Documents to be done by the Team Lead is the Test Plan.
For testing Test case document is the major one. I have created Test case document only by analyzing the High level design document and with my past experience about the applications I have tested. Here we only have a high level design doc, nothing else to refer. and I cant analyze the detailed design. Its good that you at least have Demos and process flows about the functionality that u are expected to test , in this way you can write effective test cases and will not need to change them in future...but it's very difficult to write effective test cases by looking only into the high level design document.

Documents By team lead: Test Plan.
Testers: Test cases

Has anyone any information about writing testcases, with only a high level design doc to refer. If so, please get back to me with your knowledge, as i am in urgent need of it.

Also, if anyone has any pointers for me on how to proceed in my given situation

Q. Difference between Test Efficiency and Test Effectiveness Test effectiveness = how much the customer's requirements are satisfied by the system how well the customer specifications are achieved by the system how much effort is put in developing the systemTest efficiency= internal in the organization how much resources were consumed how much of these resources were utilized if you have any other answers, please reply it here.[moderator's note: I'm no expert, but this does not appear to be a definition of test effectiveness or efficiency. I'm not sure what they define actually, but I'll let the rest of the group comment. Bottom of Form


Regarding Invalid Bug Status

Defect can be invalid, until unless u check the specifications given by the client, and check the functionality is according to client, and in what conditions functionality is correct according to the client will there be a problem in long run or with large databases or any known problems will arise r not with the existing defect, with all these analysis u can analyze the things whether it is defect r not. All these are my personal assumptions.

Q. a useful and interesting Query in QTP(how to add a object to object repository by codeing)

Set objDescription = Description.Create() ' -- Creating Object for its description.
objDescription("Class Name").Value = "WebElement"
objDescription("html tag").Value = "TD"
objDescription("innertext").Value = "Passwords are not consistent. Details"
if Browser("New User - Specify").Page("New User - Specify").WebElement(objDescription).Exist then
Reporter.ReportEvent micFail, "CheckPoint : New User - Specify User Information","Passwords are not consistent."
FailCount = 1
Browser("New User - Specify").Page("New User - Specify").Image("grafx_gnet_cancel_bu").Click
call WriteResultToNotepad(FailCount, "Add a New User")
Window("RegExpWndClass:=IEFrame","index:=0").Close
qtApp.Test.Close
else
Reporter.ReportEvent micPass, "CheckPoint : New User - Specify User Information","Passwords are consistent."
End if

Please give me some inputs :

Presently i am working on the keyword driven testing.
In keyword driven automation framework , we use the actual test cases written.
In the data file we can write the the different keywords & the data related to that
keyword.

When the script identify any keyword it call the particular function. Same time we pass the parameters required to that user defined functions.
Like this way we have to identify the different keyword.
Here as we pass all the required information, we can design our automation scripts application independent.

Just for example,
in the Our Project we have a one keyword like Login,and we have to pass the username & the name of the textbox.
So using the Case statement in vb script, we call the login Function whenever we require the login functionality & pass the required data i to it. Once we create all the scripts , then if any non technical person want to use this scripts, he has just to enter the data in the file & run the script.

Exception Handling

u were asking about exception handling.if u got the answer it is ok other wise in rational robot u can do with SQASuspendLogOutput #This is for not wtitting the result into log files Result = WindowVP (Exists, "Caption= (The window caption)", "VP='The VP name' " SQAResumeLogOutput if Result = RBFalse then (just record the action on the window ) End if

1-Test CompetencyCompetencty means the skill level of the testing team rather the organization i.e. how much domain knowledge does the org possess and how much "mature" the processes are (TMM, CMM etc)2-Test Effectiveness Effectiveness is the how many bugs does the testing process uncover. There is some
formula for this based on the bugs expected to be discovered, the actual bugs
discovered and the ones found in post-testing (QA) process i.e. in UAT or production.3-Test EfficiencyEfficiency refers to as how fast (and also effective) the test process is. (Somebody please answer this one).








Black Box Testing Techniques
Equivalence Partitioning
Boundary Value Analysis
State Transitions
Exploratory Testing

1) Equivalence Partitioning
Partition the input domain into a finite number of equivalence classes
Create test cases to invoke as many different conditions as possible
It is based on the premise that if a test case in an equivalence class detects an error, all other test cases in the same class detect the same error
Step 1
Identify the input parameters
Identify the allowable classes of input
Select a representative value for each class
Create test cases to cover as many classes as possible
Step 2
Select invalid values for each class
Create additional test cases to cover invalid classes
Step 3
Identify the output parameters
Identify the possible classes of output
Create test cases to generate each possible output
External Condition
Valid
Invalid
Boundary Value
1. Input Hours
a. Regular
b. Over Time
2. Input Rate
3.5 to 13.5
3. Gross pay
10 to 2000

25
43

12

450

0
-1

2.1, -2.5
15.0, ax2
9, 2010


Example:
Strategy:
•Identify input equivalence classes
–Based on conditions on inputs / outputs in specification / description
–Both valid and invalid input equivalence classes
–Based on heuristics and experience
•“Input x in [1..10]” ® classes: x <> 10
•“Enumeration A, B, C ® classes: A, B, C, not {A, B, C,}
• Define one / couple of test cases for each class
–Test cases that cover valid eq. classes
–Test cases that cover at most one invalid eq. class
•Test a function for calculation of absolute value of an integer
•Equivalence classes :
Condition Valid eq. classes Invalid eq. Classes
------------------------------------------------------------------------------------------
Nr of inputs 2 <> 2
Type of input int int int no-int, no-int int
Abs(value) value <> maxint
•Test Cases : maxint value result
Valid 100 10 55 100 -10 55 10 10 error Invalid 10 - error 10 20 30 error “XYZ” 10 error 100 9.1E4 error


2) Boundary Value Analysis
Boundary Value Analysis technique tests conditions on, above and beneath the edges of input and output Equivalence Classes
Test cases are created to test the edge of each Equivalence Class
Test cases are created to test edges of both input and output classes
For each equivalence class identified:
Select a value on the class boundary
Pick a value just under the boundary
Pick a value just over the boundary

External Condition
Valid
Invalid
Boundary Value
1. Input Hours
a. Regular
b. Over Time
2. Input Rate
3.5 to 13.5
3. Gross pay
10 to 2000

25
43

12

450

0
-1

2.1, -2.5
15.0, ax2
9, 2010

40, 39.9, 40.1
59.9, 60, 60.1

3.5, 3.49, 3.51
13.5, 13.51, 13.49
10.0, 10.01, 9.99
2000, 2000.1, 1999

3) Finite State Testing
Process:
Create test cases to:
Force each transition
Force each action
4) Exploratory Testing
Some people can design test cases that will discover failures based on their experience
Allow these people to write test cases
Address complex areas
Address changes
Report failures, faults and errors so that experience level may grow

White-Box Testing Techniques
1) Control Flow
Statement Coverage: To write test cases such that every statement is executed at least once, it is a weak criteria, it will not test the validity of logical operators
Decision (Branch) Coverage: Decision Coverage (also called Branch Coverage) states that test cases must be written such that each decision has a True and False outcome at least once, Decision Coverage emphasizes that each branch direction must be executed at least once, It usually satisfies Statement Coverage
Condition Coverage: Condition Coverage technique states that test cases must be written such that every condition in a decision takes all possible outcomes at least once, Condition Coverage technique may not cover all decision outcomes
Decision/Condition Coverage: Decision/Condition coverage technique states that each condition should take on all possible outcomes at least once and each decision must take on all possible outcomes at least once
Multiple Condition Coverage: Multiple Condition coverage technique states that test cases must be written such that all possible combinations of conditions in each decision are taken at least once
Loop Coverage: Loop coverage technique states that test cases must be written to test the loop counters
2) Data Flow
All Definitions
All Predicates Uses
All Computation Uses
All P-uses/some C-uses
All Uses



Walkthrough - Main purpose: understanding
Author guides the group through a document, so all understand the same thing, concensus on changes to make
Review - Main purpose: decision-making
Group discusses document and makes a decision about the content, e.g. how something should be done, go or no-go decision
Inspection - Main purpose: find defects
Formal individual and group checking, using sources and standards, according to detailed and specific rules
Inspection is a well-defined process



Integration Testing
Testing needed as the elements of a system are being combined.
Types: No incremental (Big-Bang) testing
Incremental testing
No incremental testing
All the elements are combined at once and tested.
It is difficult because errors cannot be easily attributed to particular elements.
Incremental testing
Elements are added and tested incrementally.
In What orders should the elements be integrated.
• Top-down
• Bottom-up
• Threads
Top-Down Strategy
The root module is tested first.
Stubs take the place of other modules called by the root module.
A new module called by one of the already integrated modules is added and tested with others.
The process continues in this manner until all modules have been integrated and tested.
Advantages:
Advantageous if major flaws occur toward the top of the program.
Early skeletal program allows partial demonstration.
Disadvantages:
Before the I/O modules are added, the representation of test cases in stubs can be difficult.
Test cases are possibly in a different form for each level and must be continuously altered.
Bottom-Up Strategy
Lower level modules are tested first using drivers.
Higher-level modules are added after all the modules they call have been added.
The process continues in this manner until all modules have been integrated and tested.
Advantages:
Advantageous if major flaws occur toward the bottom of the program.
Test conditions are easier to create.
Observation of test results is easier.
Disadvantages:
The program as an entity does not exist until the last module is added.
As system sub trees are integrated at higher levels, several modules may be brought together for the first time in one step.
Thread Strategy
A variation of top-down strategy.
Input and output modules are added as early as possible.
Choose a set of modules (the thread) that represents a normal, important case, or a critical path through the system.

Advantages:
Other threads can be integrated in parallel.
Early skeleton versions are available early.
It also improves programmers’ morale.
Reviews
Code Walk-Through
Select some test cases.
Simulate execution of the code by hand.
Guidelines:
The number of people involved should be small (3-5).
The participants should receive written documentation from the designer a few days before the meeting.
The meeting should last a predefined amount of time.
Discussion should be focused on the discovery of errors, not fixing them, nor on proposing alternative design decisions.
Key people should be
• designer, presenting the rationale of the work.
• moderator for the discussion.
• secretary for writing a report.
Managers should not participate in the meeting.

Code Inspections
Similar to the code walk-through.
The analysis is aimed at the discovery of commonly made errors.
A list of some classical programming errors:
Use of uninitialized variables.
Jumps into loops.
Incompatible assignments.
Nonterminating loops.
Array indexes out of bound.
Improper storage allocation-deallocation.
Actual-formal parameter mismatches.
Comparisons of equality for floating point values.

36. Is Quality Center connection and VSS is similar.
Ans: In short - VSS is a Microsoft Product, used to maintain and keep track of all thefiles and documents used in your project life cycle and changes madeto it. Documents are checked out and modified by a use and then theupdated copy is checked in. All the users in the group/domain who haveaccess can view/modify the files in VSS. Quality Centre is a Mercury product, which is a web-based system forautomated software quality testing and management, which comprises ofsuites of products like Quicktest Pro, Test Director, Winruner whichare integrated to each other to get application reliability andquality . So a test case in TD, will have a automated script in QTP -which can be viewed in TD as well. It can also have a WR Script or aLoadrunner VUser script associated to it. Using TD you can run theautomated test cases in QTP and result of the test case can be viewedin TD as Pass/Fail.
Hi Vijaya,37: What are SetToProperty, SetRoProperty, GetToProperty scripting

In SetTOProperty, GetTOProperty and GetROProperty, TO means Test Object andRO means Runtime Object.using SetTOProperty and GetTOProperty u can change and retrieve the valuesfrom the TestObejct.using GetROPr... u can retrieve the values from run time object.For example:you have records online like belowOracleForms("Sample").OracleTextField("Text").Set "One" and have propertiesrecorded are visible and enable.In runtime if you want to check wether this object visible on the form ornot you have to use GetROProperty, if u use GetTOObject it actually checksvalue of the Testobject.

Ans2: Regarding "GetToProperty" itz used to get the current value of any object. For example to get the value in list box.Browser("browser1").page("page1").Frame("frame1").Weblist("weblist1").GetRoproperty("value")similerly SetToproperty also, suppose during runtime if u want to change the property value of object then setToproperty is used. For example during run time if browser title is changing dynamically thenBrowser("browser1").SetToproperty "Title", "browser2"Description of the object means properties of the object like class name, title, name,height,width etc.you can invoke the application by using QTP for example explorer like thisInvokeApplication "C:\Program Files\Internet Explorer\IEXPLORE.EXE"


38: parameterization in qtp

Regarding parameterization,the following types of parametrization is possible in qtp 1.Action 2.DataTable 3.Environment parametrization. 39: how to retrive the text from Webpage and put it into datasheet

1 . i have to retrive the text from the list box in the Web page and put it into datasheet . 2 I have to retrive the text placed at some place in the web page and compare it with another text . i tried using outputcheckpoints-- text , but its not working

1)For your first question, use output value and the property which stores all the values of the list box.Dim ABrowser("Desktop One").Page("Desktop One").Frame("searchAreaIFrame").Link("SUNG,ANDREW").Output CheckPoint("SUNG,ANDREW")Total = DataTable("SUNG_ANDREW_href_out",dtLocalSheet) msgbox(A)So A will contain the values of the list box.2) Do u want to capture a text and search whet the same text is present in the other pages or wht do u mean you want to compare?
40: 1 How do you invoke the application through QTP? 2 How do you close the Task Manager through QTP? 3.How will you load the object during run time?
1)I already mentioned to hw to invoke the application, to invoke any application syntax is invokeapplication "xxxxxxxxx"2)Regarding closing of taskbar, if you spy the task bar it will appear as the diallog box, to close the dialog box syntax isDialog("task bar").Close3)During run time to load any object follow these steps, put the cursor on the script right click on the script & select object properties. A window will appear, in that click repository repository window will open & click add objects & add the object & save the repository happy that i got reply for my previous QS what i asked earlier and also i have some questions anyboidy could you please reply for my Questions 41: Can we access the "Run time Data Table"
Can we access the "Run time Data Table"Once we import the Excel sheet, it imports the data to "Run time Data Table". How can we access the Run time table values.Ex: I will configure some order numbers of flight reservation in an Excel sheet.Once i import the sheet, the values are imported to Run Time data table.Here i want to reach each order number and wants to open each order number.
Ans: Access the run-time datatable as you work with a normal datatable.After you imort an excel sheet,parametrise the order number and point to the global or local sheet and to proper column.and also make sure that the column names and other things are same b4 importing,i had written earlier in the mail.