Script Testing Documentation

The other useful feature we have within Cyclr is script testing. So within this, you can run testing with our JavaScript script engine on any sort of data that you have available that comes back from an external platform. So the first thing you want to do is set up the function name. 

So for this, call it after action, then you want to set the global so because it’s happening after the action itself and method response that your type can be Json. Let’s just put it in a.

Right. So that’s my object that I will then be manipulating. So if I use the function.

More information on how I’m scripting this and what I’m doing with the script can be found in our documentation or in our scripting series.

So if I return true on this, and I run it

Oh, my mistake, wrong thing. And I run it here, what you’ll see is I have hello world appear. So then if I want to manipulate that, I might say response which is our as we have up here, method response, which is the field equals

So now, when I run it, instead of Hello World, I now get hello, goodbye. And so you can use this instead of having to make a call each time you want to see how your script has manipulated data, you can make a single call to pull down the information that you want to manipulate, pass it into the JavaScript script tester, and then build out your job.