Modifications

Need new test, action, option? Post request here.
Post Reply
Arun V
Posts: 18
Joined: Sat Dec 14, 2002 6:00 pm

Post by Arun V »

1. In my test properties, Commentline1 contains email addresses for sending alerts, Commentline2 contains Mobile Numbers of respective support staff who receive SMS alerts via an email2sms gateway. These staff keep changing regularly. Can you suggest/provide an automatic way of updating/modifying each value (comma separated )in commentlines ? ( Other than export/import )

2. While modifying action profiles like schedule, email etc., can you also display the various tests currently using that profile before editing ? This will help to aviod mistakes when a particular schedule is applied to several tests.
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

1. You can use HM Script, "SetTestParam" command.
- format 1: SetTestParam <test name>|<group name> Comment line1[^Mline2[^Mline3]].
- format 2: SetTestParam <test name>|<group name> CommentLineN line.
- example: SetTestParam _AllPing CommentLine2 1-800-722-1234

2. Task added into "to do" list.

Regards
Alex
Arun V
Posts: 18
Joined: Sat Dec 14, 2002 6:00 pm

Post by Arun V »

Alex,

Suppose my commentline2 contains 1122,3344 in several tests spread accross different folders. I need to change 1122 in commentline2 to 5566 from ALL TESTS. Can you suggest a commandline in HM script to do the same ?

Thanks for adding second wish to 'to do' list.

Arun.
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

I am afraid HM Script cannot find some value and change it to another.
Probably Global Macro Variables (not implemented yet) will be able to solve this problem.

Regards
Alex
Arun V
Posts: 18
Joined: Sat Dec 14, 2002 6:00 pm

Post by Arun V »

Alex,

Will wait for that feature. My situation is like this. I have defined only ONE email profile. "To" is %commentline1% and "Sub" is %commentline2%. In each test I mention mobile numbers of respective support staff in commentline2. I have defined myself in a lot of tests. I have a big problem when the staff changes OR when I have to be away. Right now, I am going to each test and modifying commentlines.

Will really appreciate a good solution to this, if possible, ASAP.

Thanks for the great support you give.

Regards,
Arun.
User avatar
Marcus
Posts: 367
Joined: Mon Nov 18, 2002 6:00 pm

Post by Marcus »

;------------------------------------------------------------------------------
; Set comment line 5 to the correct value.
;------------------------------------------------------------------------------

;------------------------------------------------------------------------------
; On which folder should this script run?
;------------------------------------------------------------------------------
SetCurrentFolder Root
IncludeSubfolders yes

;------------------------------------------------------------------------------
; Set correct value
;------------------------------------------------------------------------------
SetTestParam _AllURL CommentLine05 NewValue
Arun V
Posts: 18
Joined: Sat Dec 14, 2002 6:00 pm

Post by Arun V »

Marcus,

I see that your example goes through ALL URL tests only and replaces the full commenline.

My situation is, a particular commentline contains several numbers each separated by a
Comma. I want to replace one particular number with another and rest of the contents should be unchanged within the commentline. Basically search a particular value in a commentline from ALL tests in ALL folders and replace it with another value.

Thanks,
Arun.
User avatar
Marcus
Posts: 367
Joined: Mon Nov 18, 2002 6:00 pm

Post by Marcus »

I don't know how intelligent your editor is, but with notepad it is one search and replace action.

I made a 'default' hms script for the settings and I change them in my editor for changes before I run the script.

It is only the first setup which requires a lot of work. In your case you have to make a line for every test you have specified, instead of using a _ALLUrl parameter.

<font size=-1>[ This Message was edited by: Marcus on 2003-04-17 07:44 ]</font>
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

>My situation is like this. I have defined only ONE email profile. "To" is %commentline1% and "Sub" is %commentline2%. In each test I mention mobile numbers of respective support staff in commentline2. I have defined myself in a lot of tests. I have a big problem when the staff changes OR when I have to be away. Right now, I am going to each test and modifying commentlines. Will really appreciate a good solution to this, if possible, ASAP.

Probably the best solution is to add new command in the HM Script, like "ReplaceTestParam CommentLine2 old_value new_value". But its hard to create new release or even update now. We in middle of developing, everything is non-assembled...

Regards
Alex
Arun V
Posts: 18
Joined: Sat Dec 14, 2002 6:00 pm

Post by Arun V »

Alex,

I appreciate your situation. For the moment, I will try Marcus's suggestion.

Thanks,

Marcus, Thanks for the tip.

Arun.
Post Reply