Since two weeks we have "DataPower Playground":
The IBM DataPower Playground is an interactive website that lets you write GatewayScript code and execute it on a cloud hosted DataPower Gateway for learning purposes.
If you click on the "Samples" tab you find many prepared code samples you can either just run, or modify and then run.
What I will describe here are the steps allowing you to execute your own sample code from scratch.
- open DataPower Playground
- click on "Code" tab
- copy in your code
- click on "Request" tab
- click on "HTTP Headers" link (to expand)
- add the 4 described HTTP headers with these values
(this is minimal set needed, see samples for different settings):
- just in case your script needs input, add it to the textarea below header section
- click "Test" button
- wait until "Response" and "Log" tabs show that they have been populated
(a number in a circle appears to their right side)
- click "Request" tab to inspect the response
- click "Log" tab to inspect the transaction's log entries
I tried this procedure with q.js sample GatewayScript from "Exemplary comparison of GatewayScript and optimized C performance" blog posting:
In "Code" tab screenshot below, the exclamation mark hover info tells me that I chose comparison operator too sloppy.
It is followed by sceenshots of "Request" and "Response" tab. "q.js" does report its own runtime (7179ms) -- not so long for 1 million problem solutions(!).
Finally screenshot of "Log" tab is not that interesting for this sample.
"DataPower Playground" is a nice GatewayScript playground for YOU, no DataPower is needed to play with, just your browser.
So no excuses, try DataPower Playground now!