Scripted Rules
Using a Service Virtualization scripted rule, you can create a script to access request data and set response data.
Using a scripted rule, you can:
-
JavaScript: use any expression from ECMAScript5 strict mode, together with exposed Service Virtualization objects
- C#: code any algorithmic implementation designed to process messages that are received by Service Virtualization
- define the script for different contexts, including for a server, service, operation, session, or service call
-
define logging in the script. Messages are logged to the Service Virtualization log file
- create a custom log file to log request and response data for a specific data element
- edit the rule in an external text editor
For task details, see Create a Scripted Rule.
DotNet Rule API Reference: For C# API details, see the Service Virtualization DotNet Rule API.