I use a Shell Script test that tests a TFTP service by downloading a file. The server name is passed as a parameter using the "Params" field. This test runs on about 30 servers throughout the region. I want to add an action the restarts the service, but the "params" field in the test (where the server name is passed) does not seem to be available as a macro variable. Am I missing something?
As a work-around, we are also putting the server name in the "Related URL" field as well and setting the action to use this field, but this increases the chances of restarting the wrong service in the future.
Thanks.
-Tim
Restaring a service after a Shell Script test
-
- Posts: 2832
- Joined: Tue May 16, 2006 4:41 am
- Contact:
Re: Restaring a service after a Shell Script test
You are right. There is no such a variable that represents the passed parameters.burnettt wrote:I use a Shell Script test that tests a TFTP service by downloading a file. The server name is passed as a parameter using the "Params" field. This test runs on about 30 servers throughout the region. I want to add an action the restarts the service, but the "params" field in the test (where the server name is passed) does not seem to be available as a macro variable. Am I missing something?
The only solution I see is to use "Related URL" or "Comment" line to store the service name. Beside using the %RelatedURL% or %CommentLine1% variables in he action profile, you also may specify the same variable as a parameter for the "Shell script" test (e.g. Params: %CommentLine1%). In this case you should enable "Translate macros" option in "Test Properties" window for the "Shell script" tests.burnettt wrote:As a work-around, we are also putting the server name in the "Related URL" field as well and setting the action to use this field, but this increases the chances of restarting the wrong service in the future.
If each test is located in a separate folder, you may use folder comment field and "%FCommentLine1%" variable in the same way.
Regards,
Max