The Scripted Assertion assertion lets you write and run scripts. The result must be a Boolean, or false is returned.
Complete the following fields:
Defines the name of the assertion.
Specifies the behavior of the assertion from the drop-down list.
Specifies the step to which to redirect if the assertion fires.
Identifies event text to print if the assertion fires.
Click Run Assertion to execute the assertion.
Designates the scripting language to use.
Values:
Default: Beanshell
To use additional scripting languages, see "Enabling Additional Scripting Languages."
Allows you to specify which properties to download for use in the step.
Values:
Default: Test state properties
Enter your script into the script editor on the left.
All the objects available for use in the script editor are listed in the Available Objects panel on the right. The list includes primitive types of data (strings and numbers) and objects such as EJB response objects that were executed in the test case. Double-click an entry in the Available Objects table to paste that variable name into the editor area.
Click Test to open a window with the result of the script execution or a description of the errors that occurred.
When you save the test case, the assertion is checked for syntax errors.
Some things to remember:
testExec.log("Got here");
Copyright © 2014 CA Technologies.
All rights reserved.
|
|