Forum Discussion

stuart_honey's avatar
7 years ago

Internal Scripted Service Check "test script" button and debug

Although a TEST step button is available in service checks (external and internal) this only shows the request made and the response output windows. Neither type gives you any kind of output from the post-processing of the response i.e. JSONPATH results.

For the Internal service check that has the scripted option (rather than settings) this is even more noticeable as there is no obvious way to put any println or debug in your response script to make sure it is doing the write thing or work out why it is not doing the right thing.

The addition of a stdout/output window that shows response (or request) script output would be really helpful.  Also possibly the addition of a Test Script button for the response script that would run the script and show output as per datasources would also be great.

I ran these ideas past support and they suggested raising a feature request so I have.  They did also suggest I could test my scripts (request or response) in the console debug window which is possible but not obvious ways to mock LMRequest/LMResponse  objects so that the script can run the same way as it would normally as a service check.  If there are examples or ways to do this then this may be a good subject to create a support page explaining how to do it.