New Action: run script

Need new test, action, option? Post request here.
Post Reply
Wabiloo
Posts: 26
Joined: Thu Jun 05, 2008 12:15 am

New Action: run script

Post by Wabiloo »

I'd like to request the ability to have a Active Script and/or Shell Script action.
I really like the power of that in the tests and would like to get the same ability for actions.

One case for example I'd use it for: if a test fails, first action runs a script that write a text file, then second action would be the standard SMTP one that would pick that file and email it to me.
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Well, we developed special Active Script and Shell Script test methods because test should return some valid results to HostMonitor.
"Action that runs a script that write a text file" does not need to return some status back to test item. This means you may easily start your scripts using "Execute external program" action. Microsoft Windows Script Host (cscript.exe) allows you execute Java and VB scripts. E.g. command like "cscript.exe /B /E:VBScript c:\tests\myscript.vbs" will execute myscript.vbs

If you need to wait for result and then start another action, I would recommend to use HM Script action instead of "Execute external program" action. HMScript offers "ExecuteProgram" command that tells HostMonitor to executes external program, wait until external program is terminated(!) and continue to execute the script.

Regards
Alex
Post Reply