Tag: testing

Questions Related to testing

Send Keys can be used to redirect some keystrokes to any application that has the focus. State true or false

  1. True

  2. False


Correct Option: A

Before we redirect keystrokes to any application, using Send Keys, focus can be set using which method?

  1. AppFocus

  2. Focus

  3. AppActivate

  4. Activate


Correct Option: C

Breakpoints can be set in the script, to make Quick Test pause script execution, at desirable statements in the script. State true or false

  1. True

  2. False


Correct Option: A

File system object methods can be used to

  1. perform any OS operations

  2. perform any script activities

  3. perform any file system related activities

  4. No such object supported in Quick Test


Correct Option: C

Watch tab of debug viewer

  1. can be used to watch only simple variables

  2. can be used to watch all simple variables and most of the object properties

  3. displays all the variables encountered during the script execution runtime

  4. cannot be used to watch simple variable values


Correct Option: B

RecordSet object of ADODB library holds

  1. the query issued

  2. the result returned from the issued SQL query

  3. the connection string

  4. a reference to the connection object


Correct Option: B

Connection string issued to every data base will remain constant, irrespective of the database. State true or false

  1. True

  2. False


Correct Option: B
  1. EOD(End of Data)

  2. EOR(End of RecordSet)

  3. EOF(End of File)

  4. No such flag


Correct Option: C

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

  1. Issue2, Issue3, Issue6

  2. Issue1, Issue2, Issue3

  3. Issue2, Issue4, Issue6

  4. No issues - The code is perfect


Correct Option: A