Wednesday, July 30, 2008

How to parametrize from external file

Set xlapp =createobject("excel.application")
set xlbook = xlapp.workbooks.open ("D:\pavan\nanda.xls")
Set xlsheet = xlbook.worksheets("Sheet1")

xlcount = xlsheet.usedrange.rows.count
xlcln_count = xlsheet.usedrange.columns.count
msgbox xlcln_count

For i=2 to xlcount
For j=1 to xlcln_count


Dialog("Login").WinEdit("Agent Name:").set xlsheet.cells(i,j).value
Dialog("Login").WinEdit("Password:").set xlsheet.cells(i,j).value
xlsheet.cells(i,3).value = "pass"

Next
Next
xlbook.save
xlbook.close
xlapp.quit


Regards,

PavanKumar Nandagiri..................

To show the data from a particular row and a particular colum from Data Table in QTP

NumColumns=datatable.GlobalSheet.GetParameterCount
NumRows=datatable.GlobalSheet.getrowcount
For i =
1 to NumRows
Datatable.SetCurrentRow(i)
For j =
1 to NumColumns
tblCellText = Datatable(j,dtGlobalsheet)
If tblCellText <>
"" Then
Msgbox
"The Text in Row: " & i & " and Column: " & j & " is: " & tblCellText
End If
Next
Next


Regards,

Pavankumar Nandagiri...............

Friday, July 25, 2008

Code for how to handle the nested tables

I have nested tables used to format some pages. Trouble is that deep down in there, there is an image on which I need to click. So, how to get there dynamically? search the tables and find the particular thing for which I am looking, be it a string, or an object of some sort.


Set oDesc = Description.Create()
oDesc("html tag").Value = "TABLE"

Set oChild = Browser("Browser").Page("Page").ChildObjects(oDesc)
iTableCount = oChild.Count

Msgbox "We have " & iTableCount &" tables"

For lCount = 0 to iTableCount - 1 'Zero-based
For lRowCount = 1 to oChild(lCount).RowCount
'Msgbox "Table " & CStr(lCount) & " has " & oChild(lCount).RowCount & " rows and " & Cstr(oChild(lCount).ColumnCount(lRowCount + 1)) & " columns."
For lColumnCount = 1 to oChild(lCount).ColumnCount(lRowCount)
Msgbox "Current Cell: " & lRowCount & "," & lColumnCount
Msgbox "CellData: " & oChild(lCount).GetCellData(lRowCount , lColumnCount)

Next

Next
Next
oChild(0).ChildItem(2,2,"Image",0).Click

Set oChild = Nothing

Set oDesc = Nothing


We are using the Descriptive programming to get at our array of tables. Some interesting notes:

1) The tables array is zero-based

2) The rows/columns seem to be collections, and are therefore 1 based

3) The two tables in my example HTML are nested, but both show up in the tables array. I find this interesting, but very useful. Since it works that way, I don't have to loop a table's row/column combination to determine if a particular cell contains a nested table. Allows for a much more dynamic way to get at certain information.


Regards,

Pavankumar Nandagiri...........



Thursday, July 24, 2008

How to select radio button from a radio group

Set Desc1 = Description.Create()

Desc1("micclass").Value = "WebRadioGroup"

Desc1("html tag").value = "INPUT"

Set Radiobuttons = Browser("Index:=0").Page("title:=Create.*").ChildObjects(Desc1)

NumberOfRadioButtons = Radiobuttons.Count()

If NumberOfRadioButtons <> 0 then

Radiobuttons.Item(1).Select "#" & 0

end if


Regards,

Pavan Kumar Nandagiri........................




Wednesday, July 23, 2008

set conn=createobject("adodb.connection")

set rs=createobject("adodb.recordset")

' Oracle client is required to be installed on your box

conn.open= "Provider=OraOLEDB.Oracle.1;Password=***;

PersistSecurity Info=True;

User ID=****;

SERVER=****;

DataSource=****;

DBQ=****;

"sql="your sql query to retrive the records"

rs.open sql,connrs.close

set rs=nothing

conn.close

set conn=nothing

How to connect to the Database from QTP?

set conn=Createobject("ADODB.Connection")
Srvname="Driver={Microsoft ODBC for Oracle}:Server=DBserver,UID=Sa,Password=sa" conn.open Srvname
Set Rec = CreateObject("ADODB.Recordset")
SQL="select * from Users"
Rec.open SQL ,conn
Username=Rec.fields("employee name")
Msgbox Username



Microsoft ADO (ActiveX Data Objects) is a Component object model object for accessing data sources.The ADO Recordset object is used to hold a set of records from a database table. A Recordset object consist of records and columns (fields).In ADO, this object is the most important and the one used most often to manipulate data from a database.Srvname is a connection string.if u already installed oracle in your system..using that path u can connect oracle database...if u dont have oracle give the conncetion string path..whatever connection string created used in database checkpoint by default...
Example:
DSN=QT_Flight32;DBQ=C:\Program Files\Mercury Interactive\QuickTest Professional\samples\flight\app\flight32.mdb;Driver=C:\WINDOWS\system32\odbcjt32.dll;DriverId=281;FIL=MS Access;MaxBufferSize=2048;PageTimeout=5;

Tuesday, July 22, 2008

How to Change All the Lowercase Letters in an Excel Worksheet to Uppercase Letters?

Set objExcel = CreateObject("Excel.Application")
objExcel.Visible = True
Set objWorkbook = objExcel.Workbooks.Add()
Set objWorksheet = objWorkbook.Worksheets(1)
objWorksheet.Cells(1,1) = "abcdef" 'enter data in the cells
objWorksheet.Cells(1,2) = "ghijkl"
objWorksheet.Cells(1,3) = "mnopqr"
objWorksheet.Cells(1,4) = "stuvwx"
Wait (10)
Set objRange = objWorksheet.UsedRange
For Each objCell in objRange
objCell.Value = UCase(objCell.Value)
Next

Sunday, July 20, 2008

Sample Descriptive programing

This summary is not available. Please click here to view the post.

Wednesday, July 16, 2008

List of H1B Questions Asked me in Visa Interview

1. Wht's the purpose of ur trip to united States?

2. Why do u wnt to Work in US?

3. Will you come back to INDIA & whn?

4. Whts ur overall IT experience?

5. Whts ur roles & responsibilites in US Company?

6. Who's ur client?

7. Wht's ur current project ur gng to wrk in US?

8. Wht's ur highest educational qualification?

9. Ur stream is non IT, hw u hav been in IT field?

10. Wht r the technologies ur wrkng on?

11. Can i c ur client letter, company's tax details ?

12. Can i c DS-156, DS-157, I-797B, I-129, Certificates, Last six months bank transactions etc....


Regards,

PavanKumar Nandagiri......................

Tuesday, July 1, 2008

Software Testing Interview Questions

1. What is Software Testing?
2. What is the Purpose of Testing?
3. What types of testing do testers perform?
4. What is the Outcome of Testing?
5. What kind of testing have you done?
6. What is the need for testing?
7. What are the entry criteria for Functionality and Performance testing?
8. What is test metrics?
9. Why do you go for White box testing, when Black box testing is available?
10. What are the entry criteria for Automation testing?
11. When to start and Stop Testing?
12. What is Quality?
13. What is Baseline document, Can you say any two?
14. What is verification?
15. What is validation?
16. What is quality assurance?
17. What is quality control?
18. What is SDLC and TDLC?
19. What are the Qualities of a Tester?
20. When to start and Stop Testing?
21. What are the various levels of testing?
22. What are the types of testing you know and you experienced?
23. What exactly is Heuristic checklist approach for unit testing?
24. After completing testing, what would you deliver to the client?
25. What is a Test Bed?
26. What is a Data Guidelines?
27. Why do you go for Test Bed?
28. What is Severity and Priority and who will decide what?
29. Can Automation testing replace manual testing? If it so, how?
30. What is a test case?
31. What is a test condition?
32. What is the test script?
33. What is the test data?
34. What is an Inconsistent bug?
35. What is the difference between Re-testing and Regression testing?
36. What are the different types of testing techniques?
37. What are the different types of test case techniques?
38. What are the risks involved in testing?
39. Differentiate Test bed and Test Environment?
40. What ifs the difference between defect, error, bug, failure, fault?
41. What is the difference between quality and testing?
42. What is the difference between White & Black Box Testing?
43. What is the difference between Quality Assurance and Quality Control?
44. What is the difference between Testing and debugging?
45. What is the difference between bug and defect?
46. What is the difference between verification and validation?
47. What is the difference between functional spec. and Business requirement specification?
48. What is the difference between unit testing and integration testing?
49. What is the diff between Volume & Load?
50. What is diff between Volume & Stress?
51. What is the diff between Stress & Load Testing?
52. What is the Diff between Two Tier & Three tier Architecture?
53. What is the diff between Client Server & Web Based Testing?
54. What is the diff between Integration & System Testing?
55. What is the Diff between Code Walkthrough & Code Review?
56. What is the diff between walkthrough and inspection?
57. What is the Diff between SIT & IST?
58. What is the Diff between static and dynamic?
59. What is the diff between alpha testing and beta testing?
60. What are the Minimum requirements to start testing?
61. What is Smoke Testing & when it will be done?
62. What is Adhoc Testing? When it can be done?
63. What is cookie testing?
64. What is security testing?
65. What is database testing?
66. What is the relation ship between Quality & Testing?
67. How do you determine, what to be tested?
68. How do you go about testing a project?
69. What is the Initial Stage of testing?
70. What is Web Based Application Testing?
71. What is Client Server Application Testing?
72. What is Two Tier & Three tier Architecture?
73. What is the use of Functional Specification?
74. Why do we prepare test condition, test cases, test script (Before Starting Testing)?
75. Is it not waste of time in preparing the test condition, test case & Test Script?
76. How do you go about testing of Web Application?
77. How do you go about testing of Client Server Application?
78. What is meant by Static Testing?
79. Can the static testing be done for both Web & Client Server Application?
80. In the Static Testing, what all can be tested?
81. Can test condition, test case & test script help you in performing the static testing?
82. What is meant by dynamic testing?
83. Is the dynamic testing a functional testing?
84. Is the Static testing a functional testing?
85. What are the functional testing you perform?
86. What is meant by Alpha Testing?
87. What kind of Document you need for going for an Functional testing?
88. What is meant by Beta Testing?
89. At what stage the unit testing has to be done?
90 Who can perform the Unit Testing?
91. When will the Verification & Validation be done?
92. What is meant by Code Walkthrough?
93. What is meant Code Review?
94. What is the testing that a tester performs at the end of Unit Testing?
95. What are the things, you prefer & Prepare before starting Testing?
96. What is Integration Testing?
97. What is Incremental Integration Testing?
98. What is meant by System Testing?
99. What is meant by SIT?
100 .When do you go for Integration Testing?
101 Can the System testing be done at any stage?
102. What are stubs & drivers?
103. What is the Concept of Up-Down & Down-Up in Testing in integration testing?
104. What is the final Stage of Integration Testing?
105. Where in the SDLC, the Testing Starts?
106. What is the Outcome of Integration Testing?
107. What is meant by GUI Testing?
108. What is meant by Back-End Testing?
109. What are the features, you take care in Prototype testing?
110. What is Mutation testing & when can it be done?
111. What is Compatibility Testing?
112. What is Usability Testing?
113 What is the Importance of testing?
114. What is meant by regression Testing?
115. When we prefer Regression & what are the stages where we go for Regression Testing?
116. What is performance testing?
117. What is the Performance testing; those can be done Manually & Automatically?
118 What is Volume, Stress & Load Testing?
119. What is a Bug?
120. What is a Defect?
121. What is the defect Life Cycle?
122. What is the Priority in fixing the Bugs?
123. Explain the Severity you rate for the bugs found?
124. Diff between UAT & IST?
125. What is meant by UAT?
126. What all are the requirements needed for UAT?
127. What are the docs required for Performance Testing?
128. What is risk analysis?
129. How to do risk management?
130. What are test closure documents?
131. What is traceability matrix?
132. What ways you followed for defect management?


Regards,

PavanKumar Nandagiri......................

Google Search

Google