SilkTest Question 39: How to use verify statement?

How to use verify statement to check that actual value doesn't match what was expected, the error is logged, but SilkTest doesn't stop the 4test script execution and keeps running.

The following 4test code can be used by smart SQA Engineer for verification. As we see after exception was logged, the automated tool printed next line.

[-] testcase StringVerification() appstate none
[-] do
[ ] verify("silktest","interview")
[-] except
[ ] ExceptLog()
[ ] print ("the test case still works")

And the following is the result of test script execution

Script question39.t - 1 error
Machine: (local)
Started: 02:22:22PM on 26-Sep-2006
Elapsed: 0:00:05
Passed: 0 tests (0%)
Failed: 1 test (100%)
Totals: 1 test, 1 error, 0 warnings

[-] Testcase StringVerification - 1 error
*** Error: Verify value failed - got "silktest", expected "interview"
Occurred in Verify
Called from StringVerification at question39.t(3)
the test case still works

No comments:

SilkTest interview questions for QA Testers