Script Assertion
In this case it is Script.
Select Script Assertion and there no sub-types associated with it.
Click 'Add'.
The Scripting Dialog opens where user will be able to write user defined script to validate the response XML.
Now let us write a groovy script to validate the Conversion Rate. The Script is attached below with the comments embedded. It is recommended to have knowledge on JavaScript or Groovy Script before attempting to write your own script.
Click 'Execute' Button to trigger the execution.
The output of the Script is shown in the Output pane. It has printed both, Conversion Value as well as the end result (Pass or Fail)
The Information is displayed that 'Script Assertion Passed'. Click OK.
Note:The final Information pop up will always display with the message 'Script Assertion Passed' as long as the script is syntactically correct. It has got no correlation with your assertion within the script.
If you want to call a particular groovy script in other test cases. Below is the format to call it
Last updated
Was this helpful?