A colleague has written a block of QuickTest Pro code to compare two account values. If the values match, the script should simply use the ReportEvent method to report a PASS status for the step. If the account values do not match, the script should report a FAIL status for the step and increment the error_count variable by one. You review your colleague’s script shown below:expected_account_balance = 5000actual_account_balance = 5500If (actual_account_balance = expected_account_balance) Reporter.ReportEvent micPass, "Account balance verification", "balances match"Else Reporter.ReportEvent micFail "Account balance verification", "balances do not match" error_count = error_count + 1End IfWhich answer best describes the actions that will be performed when the lines of QuickTest Pro code are executed?A A status of PASS is reported for the "Account balance verification" step and the value of the error_count variable is increased by 1. B A status of FAIL is reported for the "Account balance verification" step and the value of the error_count variable is not changed. C A status of FAIL is reported for the "Account balance verification" step and the value of the error_count variable is increased by 1. D The code will produce a syntax error because 'Then' should be on the same line as 'If'. E A status of PASS is reported for the "Account balance verification" step and the value of the error_count variable is not changed.
-
Interview Candidate
- Oct 6th, 2006
- 3
- 2521
Showing Answers 1 - 3 of 3 Answers
A colleague has written a block of QuickTest Pro code to compare two account values. If the values match, the script should simply use the ReportEvent method to report a PASS status for the step. If the account values do not match, the script should report a FAIL status for the step and increment the error_count variable by one. You review your colleague’s script shown below:expected_account_balance = 5000actual_account_balance = 5500If (actual_account_balance = expected_account_balance) Reporter.ReportEvent micPass, "Account balance verification", "balances match"Else Reporter.ReportEvent micFail "Account balance verification", "balances do not match" error_count = error_count + 1End IfWhich answer best describes the actions that will be performed when the lines of QuickTest Pro code are executed?A A status of PASS is reported for the "Account balance verification" step and the value of the error_count variable is increased by 1. B A status of FAIL is reported for the "Account balance verification" step and the value of the error_count variable is not changed. C A status of FAIL is reported for the "Account balance verification" step and the value of the error_count variable is increased by 1. D The code will produce a syntax error because 'Then' should be on the same line as 'If'. E A status of PASS is reported for the "Account balance verification" step and the value of the error_count variable is not changed.