Software Testing and QTP Automation
Covers software testing techniques (exploratory, static/dynamic, equivalence partition, decision table) and QTP (Quick Test Pro) automation topics including XML handling, database operations with ADODB, debugging tools, and scripting methods.
Questions
Before we redirect keystrokes to any application, using Send Keys, focus can be set using which method?
- AppFocus
- Focus
- AppActivate
- Activate
Breakpoints can be set in the script, to make Quick Test pause script execution, at desirable statements in the script. State true or false
- True
- False
File system object methods can be used to
- perform any OS operations
- perform any script activities
- perform any file system related activities
- No such object supported in Quick Test
Watch tab of debug viewer
- can be used to watch only simple variables
- can be used to watch all simple variables and most of the object properties
- displays all the variables encountered during the script execution runtime
- cannot be used to watch simple variable values
RecordSet object of ADODB library holds
- the query issued
- the result returned from the issued SQL query
- the connection string
- a reference to the connection object
Connection string issued to every data base will remain constant, irrespective of the database. State true or false
- True
- False
) Navigational methods like MoveFirst, MoveLast, MoveNext, MovePrevious are the methods supported by the connection object. State true or false
- True
- False
What is the flag used to mark end of the data you retrieve from a resultset?
- EOD(End of Data)
- EOR(End of RecordSet)
- EOF(End of File)
- No such flag
Identify the issues in the code below
Set con = CreateObject("ADODB.Connection")
con.Open "Provider=Microsoft.ACE.OLEDB.12.0;
Data source=C:\...\Database1.accdb"
rs = con.Execute("select * from Table1")
rs.MoveFirst
Do While rs.EOF
Msgbox rs.Fields(0).Name & " : " &rs.Fields(0).Value & " " & rs.Fields(1).Name & " : " &rs.Fields(1).Value & " " & rs.Fields(2).Name & " : " & rs.Fields(2).Value
Loop
rs.Close
con.Close
Issue1) SQL query is issued as an argument to an incorrect method
Issue2) Condition with the loop is incorrect
Issue3) Code is not designed navigate to the next record in the recordset
Issue4) Connection string is incorrectly formed
Issue5) Msgbox cannot display data from Database
Issue6) Set keyword is missing in a statement
- Issue2, Issue3, Issue6
- Issue1, Issue2, Issue3
- Issue2, Issue4, Issue6
- No issues - The code is perfect
What is the method used to get the root element of an xml document
- RootElement
- GetRootItem
- GetRootNode
- GetRootElement
What does the ChildElements method of XMLUtil returns?
- collection having child nodes/elements
- a node/child
- true if there are children and false if no children
- root node
What is the indexed property used to retrieve child nodes from a collection?
- collection_obj.element(0)
- collection_obj.Item(0)
- collection_obj.node(0)
- No such property
Predict the output of the following script the uses the below xml
<?xml version="1.0" encoding="UTF-8"?>
<Students>
<Student>
<name>Rajesh</name>
<reg_no>111</reg_no>
<dept>CS</dept>
<grade>A</grade>
</Student>
<Student>
<name>Meera</name>
<reg_no>222</reg_no>
<dept>Maths</dept>
<grade>B</grade>
</Student>
<Student>
<name>Aarthi</name>
<reg_no>333</reg_no>
<dept>Commerce</dept>
<grade>C</grade>
</Student>
</Students>
Set xmlDoc = XMLUtil.CreateXMLFromFile("C:\...\students.xml")
Set rt = xmlDoc.GetRootElement
Set rtChildColl = rt.ChildElements
Set node = rtChildColl.Item(rtChildColl.Count)
set nodeAtt = node.ChildElements
Msgbox nodeAtt.Item(1).Value
- 222
- A
- No value. It returns an empty string
- Aarthi
Recovery scenario takes us thru the following wizard steps in the following sequence
- define a trigger, define the recovery operations, define the post recovery operations
- define the recovery operations, define a trigger, define the post recovery operations
- can be created in any order
- no such wizard is available in Quick Test
1.Which typical defects are easier to find using static instead of dynamic testing A. deviation from standards B. requirements defects C. insufficient maintainability D. incorrect interface specifications
- A,B,C and D
- A and C
- A,C and D
- A,B and C
- What technique captures system requirements that contain logical conditions?
- Boundary value
- Equivalence partition
- Decision table
- State transition
- Input and output combinations that will be treated the same way by the system can be tested using which technique?
- Boundary value
- Equivalence partition
- Decision table
- State transition
- Which of the following can be tested as part of operational testing?
- Component interaction
- Probe effect
- State transition
- Disaster recovery
- Which technique is appropriate to test changes on old and undocumented functionalities of a system?
- Specification based technique
- Black box technique
- White box technique
- D. Data driven testing technique
- By creating future tests based on the results of previous tests, a tester is demonstrating at type of informal test design technique?
- Security testing
- Non functional testing
- Exploratory testing
- Interoperability testing