Macros on external program command line
o Select ADD to add a new test
o Select "by External Program" from dropdown
o I specify a little perl script with the command line
perl ..addontestsHM-LOGTEST.pl %HostName%
All of the HM-LOGTEST.pl script does is write a time stamp and the parameters it was initiated with to an external log file.
Here is what it writes
Wed Oct 9 13:13:10 2002 - %HostName%
--------------------------------------------------------------------------------
Wed Oct 9 13:13:55 2002 - %HostName%
--------------------------------------------------------------------------------
Wed Oct 9 13:13:58 2002 - %HostName%
--------------------------------------------------------------------------------
Wed Oct 9 13:14:00 2002 - %HostName%
--------------------------------------------------------------------------------
Wed Oct 9 13:14:02 2002 - %HostName%
o Select "by External Program" from dropdown
o I specify a little perl script with the command line
perl ..addontestsHM-LOGTEST.pl %HostName%
All of the HM-LOGTEST.pl script does is write a time stamp and the parameters it was initiated with to an external log file.
Here is what it writes
Wed Oct 9 13:13:10 2002 - %HostName%
--------------------------------------------------------------------------------
Wed Oct 9 13:13:55 2002 - %HostName%
--------------------------------------------------------------------------------
Wed Oct 9 13:13:58 2002 - %HostName%
--------------------------------------------------------------------------------
Wed Oct 9 13:14:00 2002 - %HostName%
--------------------------------------------------------------------------------
Wed Oct 9 13:14:02 2002 - %HostName%
jricha34,
First my question was: Do you use "Execute external program" action? You said yes. Now you say you use External test. Its complette different modules. HM supports macro variables for actions execution because hundreds different tests can start the same action. HM does not support macros in configuration of the test because you already know test's parameters, you specify these parameters.
Regards
Alex
<font size=-1>[ This Message was edited by: KS-Soft on 2002-10-09 12:00 ]</font>
<font size=-1>[ This Message was edited by: KS-Soft on 2002-10-09 12:01 ]</font>
First my question was: Do you use "Execute external program" action? You said yes. Now you say you use External test. Its complette different modules. HM supports macro variables for actions execution because hundreds different tests can start the same action. HM does not support macros in configuration of the test because you already know test's parameters, you specify these parameters.
Regards
Alex
<font size=-1>[ This Message was edited by: KS-Soft on 2002-10-09 12:00 ]</font>
<font size=-1>[ This Message was edited by: KS-Soft on 2002-10-09 12:01 ]</font>
Actually I didn't say action the first time, I specified external program, then you asked which one and I was specific. Picks in the GUI are labeled the same, you only know the difference when in the different sections. I wasn't in the action section so wasn't aware that the label was identical.
That being said, the reason I was trying to use a macro in the parameter is so I can set this up as generically as possible so when I try to take advantage of the 20 million tests I don't have to customize multiple lines in each test import section. I can have the same line for the command line and then the differences would be in the host name and the comments, etc... Currently I would have to have a import setup of
Method = ExternalPrg
;--- Common properties ---
Title = OOR: server1.testdomain.com
Comment = server1.testdomain.com
RelatedURL =
ScheduleMode= Regular
Schedule =
Interval = 900
Alerts = REDC-EIG-EMAIL
ReverseAlert= No
UnknownIsBad= Yes
UseCommonLog= Yes
PrivLogMode = Default
SyncCounters= Yes
SyncAlerts = No
MasterTest-Alive = server1.testdomain.com
;--- Test specific properties ---
CommandLine = perl ..addontestshm-oor.pl server1.testdomain.com
Condition = DifferentFrom
ErrorLevel = 0
KillAfter = 60
WindowMode = hide
Which could be
Method = ExternalPrg
;--- Common properties ---
Title = OOR: server1.testdomain.com
Comment = server1.testdomain.com
RelatedURL =
ScheduleMode= Regular
Schedule =
Interval = 900
Alerts = REDC-EIG-EMAIL
ReverseAlert= No
UnknownIsBad= Yes
UseCommonLog= Yes
PrivLogMode = Default
SyncCounters= Yes
SyncAlerts = No
MasterTest-Alive = server1.testdomain.com
;--- Test specific properties ---
CommandLine = perl ..addontestshm-oor.pl %commentline1%
Condition = DifferentFrom
ErrorLevel = 0
KillAfter = 60
WindowMode = hide
Or something similar and when I write the documentation for people to make a change I can say, change the comment to this versus make the following changes in the following locations and make sure you get them all so that it works right.
On the automation side it simply makes the script easier to write to automate things as well.
I can go either way, just think it is more consistent to allow macros to be used there.
joe
That being said, the reason I was trying to use a macro in the parameter is so I can set this up as generically as possible so when I try to take advantage of the 20 million tests I don't have to customize multiple lines in each test import section. I can have the same line for the command line and then the differences would be in the host name and the comments, etc... Currently I would have to have a import setup of
Method = ExternalPrg
;--- Common properties ---
Title = OOR: server1.testdomain.com
Comment = server1.testdomain.com
RelatedURL =
ScheduleMode= Regular
Schedule =
Interval = 900
Alerts = REDC-EIG-EMAIL
ReverseAlert= No
UnknownIsBad= Yes
UseCommonLog= Yes
PrivLogMode = Default
SyncCounters= Yes
SyncAlerts = No
MasterTest-Alive = server1.testdomain.com
;--- Test specific properties ---
CommandLine = perl ..addontestshm-oor.pl server1.testdomain.com
Condition = DifferentFrom
ErrorLevel = 0
KillAfter = 60
WindowMode = hide
Which could be
Method = ExternalPrg
;--- Common properties ---
Title = OOR: server1.testdomain.com
Comment = server1.testdomain.com
RelatedURL =
ScheduleMode= Regular
Schedule =
Interval = 900
Alerts = REDC-EIG-EMAIL
ReverseAlert= No
UnknownIsBad= Yes
UseCommonLog= Yes
PrivLogMode = Default
SyncCounters= Yes
SyncAlerts = No
MasterTest-Alive = server1.testdomain.com
;--- Test specific properties ---
CommandLine = perl ..addontestshm-oor.pl %commentline1%
Condition = DifferentFrom
ErrorLevel = 0
KillAfter = 60
WindowMode = hide
Or something similar and when I write the documentation for people to make a change I can say, change the comment to this versus make the following changes in the following locations and make sure you get them all so that it works right.
On the automation side it simply makes the script easier to write to automate things as well.
I can go either way, just think it is more consistent to allow macros to be used there.
joe
Hahaha. But I said
>"Yes, I am using by external program."
Not - External Program Action
Which prompted you to clarify
>"External program action? Or External program test?"
to which I clarified with
"o Select ADD to add a new test
o Select "by External Program" from dropdown "
So once you asked it in a clear way that showed there were two valid possible answers I gave step by step...
)
Thanks for adding to the to do. I was thinking how I would want to implement and possibly you may consider doing %%macro%% so you could also do %environment variable%?
Just thinking out loud.
>"Yes, I am using by external program."
Not - External Program Action
Which prompted you to clarify
>"External program action? Or External program test?"
to which I clarified with
"o Select ADD to add a new test
o Select "by External Program" from dropdown "
So once you asked it in a clear way that showed there were two valid possible answers I gave step by step...
)
Thanks for adding to the to do. I was thinking how I would want to implement and possibly you may consider doing %%macro%% so you could also do %environment variable%?
Just thinking out loud.