Monday, 2 June 2014

Sample QTP Interview Question

QTP Question asked in the interview:

1. What mean by object repository ?
2.  What is the difference between Local and share object repository ?
3. What are the column present in the keyword view of QTP? 
4. Write the code for to create the excel object, add new sheet and save with the time stamp.
Ans:
Dim AppExcel
ss="C:\test" & Year(Now) & "_" & Month(Now) & "_" & Day(Now) & "_" & Hour(Now) & "_" & Minute(Now) & "_" & Second(Now) & ".xlsx"

Set AppExcel=createobject("Excel.Application")
  AppExcel.Application.Visible = True
  AppExcel.Workbooks.Add
  AppExcel.Cells(2,1).Value="Test Marks"

  AppExcel.Cells(2,2).Select

'Apply the font to Cell
  AppExcel.Range("B2").Font.Bold=True
  AppExcel.Range("B2").Font.Italic=True
  AppExcel.Range("B2").font.Underline=True

 'Apply the border to the cell
  AppExcel.Range("B2").Borders.linestyle=xlContinuous

  'Apply the border to the Cell with Color
  AppExcel.Range("B2").Borders.Color=vbRed
  AppExcel.Range("D2").Borders.Color=vbGreen

 'Fill the Cell with the Color
  AppExcel.Range("G2").Interior.ColorIndex=1

  'Toget the Color Index
   AppExcel.Range("H2").Value=AppExcel.Range("G2").Interior.colorIndex

   AppExcel.ActiveWorkbook.Saveas ss
   AppExcel.quit
   Set AppExcel=Nothing


5. What are the different types of framework in QTP?
6. Explain the different frameworks with the advantages and disadvantages.
7. Why framework is required and what are the parameters you consider for selecting the framework?
8. Explain Major difference between Modular and Keyword driven framework.
9. How object repository is used to find the object?
10. What is the object model in QTP?
11. What are the types of environment variable and how to use them?
12. How to import the Excel sheet into data table.
13. QTP Regular exp:

Below are the various regular expressions used in QTP.

Matching Any Single Character (.)  eg abc. Will match abc followed by any character.
Matching Any Single Character in a List ( [xy] ) e.g [ab] will match either a or b
Matching Any Single Character Not in a List ( [^xy] ) e.g 1[^23] will match all values between 11 to 19 except 12 and 13.
Matching Any Single Character within a Range ( [x-y] ) e.g : 1[1-3] will match 11,12, and 13.
Matching Any AlphaNumeric Character Including the Underscore ( \w )
Matching Any Non-AlphaNumeric Character (\W) will match any special character other than underscore. Please note case of W in this case.
Matching Zero or More Specific Characters ( * ) This matches zero or more occurrences of the preceding character. e.g ca* will match caa,caaaa,c and so on. Similarly c.* will match c, cs,caaa, and so on, since preceding character here is “.”.
Matching One or More Specific Characters ( + ) Only difference from * is it will match for minimum one character. e.g ta+r will match taar,tar but not tr as in above case.
Matching Zero or One Specific Character ( ? ) A question mark (?) instructs QTP to match zero or one occurrences of the preceding character. For example: te?r matches ter and tr, but nothing else
Matching One of Several Regular Expressions ( | )  e.g new|day will match either of new or day. If we write ne(w|d)ay, it will match neway or neday.
Matching the Beginning of a Line ( ^ ) This will match only if match is found at beginning of line.
Matching the End of a Line ( $ )  This will match only if match is found at end of line.
Matching a word at boundary(\b) e.g new\b will match testnew but not in knewit.
Matches a digit character(\d)  Matches a digit value.

Matching a non-digit character(\D) Matches a non digit value


Common Question asked in the interview:

1. What mean by Statement coverage and solve the given example.
2. What are the parameters considered during Test estimation?
3. What mean by load testing, Volume Testing, Stress testing?
4. What mean by configuration management?
5. What mean by verification and validation?


Verification
Validation
 (not the actual final product) In development phase to determine whether they meet the specified requirements for that phase.
At the end of the development process to determine whether it satisfies specified business requirements.
Ensure that work products meet their specified requirements.
The product fulfills its intended use when placed in its intended environment.
Building the product right?
Building the right product?
Plans, Requirement Specs, Design Specs, Code, Test Cases
The actual product/software.
Review, Walkthroughs, Inspections, Execution is not required
Testing, Execution is required
6. Explain the SDLC and STLC cycle.
7. What are the parameters that we consider while doing Load testing?
8. Explain Equivalence and boundary value testing with example.
9. What mean by User Acceptance testing and what it involve?
10. Explain test plan and what it involve?
11. What are the advantages of Agile Methodology? 

QTP Certification Index

10%
Automated test   planning
1.       Plan for general testing and automation.
2.       Plan for QTP testing.
3.       Identify and describe   features and settings.
4.       Explain QTP licensing   and packaging.
19%
Basic test creation and how QTP works with objects
1.       Create the basic test.
2.       Explain how QTP works   with objects.
3.       Add steps without   recording.
4.       Explain the purpose   and operation of Smart Identification feature.
24%
Basic test verification and enhancement
1.       Add standard and custom verification points.
2.       Enhance tests with   parameters.
3.       Add custom   checkpoints.
4.       Add database checkpoints.
5.       Add bitmap   checkpoints.
6.       View test results.
11%
Modular automated test builds
1.       Explain how to build   modular QTP tests with Actions.
2.       Use a Shared Object   Repository.
7%
QTP and ALM integration Explain the QTP/ALM connection.
1.       Define ALM management   of QTP resources.
2.       Explain versioning   features in QTP
10%
Automated test troubleshooting Troubleshoot Object Recognition problems.
1.       Use Recovery   scenarios.
2.       Use the Debugging   Tool.
3.       Measure System   Performance.
4.       Configure log tracking.
4%
Advanced QTP Scripting   Import and export Excel sheets.
1.       Get and set object   properties.
2.       Identify descriptive   programming to bypass repository.
7%
Expert View
1.       Describe Expert View   features.
2.       Describe dynamic   object programming.
3.       Identify and describe   VBScript elements.
8%
Web applications
1.       Recognize Web Add-in   Extensibility.
2.       Describe Web event   recording use and configuration.
3.       Identify new web   testing capabilities.