Translate Macros in URL Test Properties

All questions related to installations, configurations and maintenance of Advanced Host Monitor (including additional tools such as RMA for Windows, RMA Manager, Web Servie, RCC).
Post Reply
sneader
Posts: 90
Joined: Thu Dec 22, 2005 3:32 pm

Translate Macros in URL Test Properties

Post by sneader »

Setting up a URL test, to check if "v12345" is on certain web pages. This is the version number of software, for example. Over time, this version number changes. Rather than edit every test to check for the new version number, I would like to set up a Global Macro Variable called udv_sw_version, and check it like this:

X Check Contents
Should Contain
X Translate Macros
%udv_sw_version%

So, each time the software version changes, I just have to edit the Global Macro Variable to be the new software version.

Doesn't seem to work.

The documentation calls it "Translate Date & Time Macros", but the screen says "Translate Macros" -- perhaps I cannot use a normal Global Macro Variable, but only a Date/Time variable?

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

Post by KS-Soft »

1) Yes, that option is for date&time variables only
2) HostMonitor never ever could support global macro variables as parameters of the test. And probably never will support.
3) However HostMonitor version 7.70+ supports templates, you can use folder-related user-defined variables as parameters of tests
http://www.ks-soft.net/hostmon.eng/mfra ... #templates

Regards
Alex
sneader
Posts: 90
Joined: Thu Dec 22, 2005 3:32 pm

Post by sneader »

Thanks Alex. The folder-related user-defined variables is exactly what I was looking for.

I created one, and it is successfully using this new variable in the "Comment" field. However, when I enter it into the "Check Contents" field of a URL Test, it does not work. I have tried with and without "Translate Macros". I am using v8.0.6

I am probably doing something wrong, but not sure what?

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

Post by KS-Soft »

Please check the manual, there is pretty useful table that shows where exactly macros can be used
http://www.ks-soft.net/hostmon.eng/mfra ... #templates
(sorry, you may use variable as part of the URL only)

Regards
Alex
sneader
Posts: 90
Joined: Thu Dec 22, 2005 3:32 pm

Post by sneader »

Thanks Alex. I had used the manual, but could not figure it out.

Now I see why... what I want, cannot be done.

Again, what we want to do is to make sure that certain websites are using the best version of our software, which is displayed at the bottom of the page.

Maybe there is a better way? Otherwise, we will continue to edit every test, every time our software version changes.

Thanks!

- Scott
User avatar
Stoltze
Posts: 174
Joined: Tue Feb 03, 2004 1:58 am
Location: Denmark

Post by Stoltze »

sneader wrote:Maybe there is a better way? Otherwise, we will continue to edit every test, every time our software version changes.
Maybe you could use HM script to change tests..? That should make it easier for you.. :)
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

H'm, I don't think script can help. It allows you to change timeout, passwords, comments.. but it cannot change "Check contents" parameter of the test.

Regards
Alex
User avatar
Stoltze
Posts: 174
Joined: Tue Feb 03, 2004 1:58 am
Location: Denmark

Post by Stoltze »

Aahh... Sorry about that answer then.. Didn't know that... :-?
Paul_NHS
Posts: 59
Joined: Wed Feb 25, 2009 6:17 am

Post by Paul_NHS »

Can you use user defined variables in the test?

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

Post by KS-Soft »

I think I have answered this question in my first post
===================
2) HostMonitor never ever could support global macro variables as parameters of the test. And probably never will support.
3) However HostMonitor version 7.70+ supports templates, you can use folder-related user-defined variables as parameters of tests
http://www.ks-soft.net/hostmon.eng/mfra ... #templates
===================

Do I misunderstand your question?

Regards
Alex
User avatar
Stoltze
Posts: 174
Joined: Tue Feb 03, 2004 1:58 am
Location: Denmark

Post by Stoltze »

Use a folder variable like
%fvar_version% = %udv_version%

Set udv_version = "the text you want to search for"
and use %fvar_version% as the text you're searching for in the text..
Post Reply