View previous topic :: View next topic |
Author |
Message |
sneader
Joined: 22 Dec 2005 Posts: 90
|
Posted: Mon Aug 03, 2009 9:44 pm Post subject: Translate Macros in URL Test Properties |
|
|
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 |
|
Back to top |
|
|
KS-Soft
Joined: 03 Apr 2002 Posts: 12795 Location: USA
|
Posted: Tue Aug 04, 2009 11:30 am Post subject: |
|
|
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/mframe.htm#tests.htm#templates
Regards
Alex |
|
Back to top |
|
|
sneader
Joined: 22 Dec 2005 Posts: 90
|
Posted: Tue Aug 04, 2009 12:09 pm Post subject: |
|
|
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 |
|
Back to top |
|
|
KS-Soft
Joined: 03 Apr 2002 Posts: 12795 Location: USA
|
|
Back to top |
|
|
sneader
Joined: 22 Dec 2005 Posts: 90
|
Posted: Tue Aug 04, 2009 12:17 pm Post subject: |
|
|
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 |
|
Back to top |
|
|
Stoltze
Joined: 03 Feb 2004 Posts: 174 Location: Denmark
|
Posted: Wed Aug 05, 2009 9:20 am Post subject: |
|
|
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.. |
|
Back to top |
|
|
KS-Soft
Joined: 03 Apr 2002 Posts: 12795 Location: USA
|
Posted: Wed Aug 05, 2009 10:21 am Post subject: |
|
|
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 |
|
Back to top |
|
|
Stoltze
Joined: 03 Feb 2004 Posts: 174 Location: Denmark
|
Posted: Wed Aug 05, 2009 2:03 pm Post subject: |
|
|
Aahh... Sorry about that answer then.. Didn't know that... |
|
Back to top |
|
|
Paul_NHS
Joined: 25 Feb 2009 Posts: 59
|
Posted: Thu Aug 13, 2009 5:38 am Post subject: |
|
|
Can you use user defined variables in the test?
cheers, Paul |
|
Back to top |
|
|
KS-Soft
Joined: 03 Apr 2002 Posts: 12795 Location: USA
|
Posted: Thu Aug 13, 2009 10:31 am Post subject: |
|
|
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/mframe.htm#tests.htm#templates
===================
Do I misunderstand your question?
Regards
Alex |
|
Back to top |
|
|
Stoltze
Joined: 03 Feb 2004 Posts: 174 Location: Denmark
|
Posted: Thu Aug 13, 2009 2:07 pm Post subject: |
|
|
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.. |
|
Back to top |
|
|
|