About Verify() Function
Can anybody explain me with example:
1)What Verify() function does.
2)How many parameters it has and which are those parameters?
Thanks, in advance.
Re: About Verify() Function
The Verify() function verifies a value with an expected value. If the values do not match it raises an error. The basic syntax is Verify(<actual>,<expected>, "description"). The description is optional. The actual and expected values can be any types, as long as they match. Check out the SilkTest help for more details.
One thing to note is that when Verify() fails it raises an error so your testcase will exit (instead of logging an error). If you don't want this to happen you will have to wrap it in a do/except. To get around that you can write your own Verify() wrapper. eg...
</font><blockquote><font size="1" face="Verdana, Arial, Helvetica">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">[+] VOID SafeVerify(ANYTYPE aActual, ANYTYPE aExpected, STRING sDesc optional)
[+] if(sDesc == null)
[ ] Verify(aActual, aExpected)
[ ] Verify(aActual, aExpected, sDesc)
[ ] ExceptLog()</pre><hr /></blockquote><font size="2" face="Verdana, Arial, Helvetica">Hope that helps.