About
You can generate values for data sources or store values to data sinks by executing Groovy scripts.
Script objects
Below is a list of the default objects that are available in the data source and data sink script editors:
Object | Description |
---|---|
testRunner |
Provides scripting interface to the test runner object that is executing the current test case and test step. |
log |
Includes methods and properties for posting messages to the Script log (to view this log, click Logs in the bottom left corner of the ReadyAPI window and switch to the Script log tab). You use this for debugging and logging purposes: to post and view data in the log. |
context |
Provides a scripting interface to properties specific to the current test run context. |
result |
An associative array, keys of which match the data source properties. |
properties |
An associative array, keys of which match the data sink properties. |
You can see methods and properties of these objects on the Code Completion list. To invoke it, type the object name and press Ctrl+Space.
Examples
You can find examples of data source scripts in the Groovy Data Source and Data Sink topics.