Copied tests maintain old dependancies

When you post information about some problem, please include the following details: - OS version (e.g. Windows 2000 Professional SP3); HostMonitor version; problem description.
Post Reply
pspencer008
Posts: 34
Joined: Wed Jul 30, 2014 1:00 am

Copied tests maintain old dependancies

Post by pspencer008 »

Hi,

We are running Version 9.90 and have found a bug when copying tests.

Here is an example of our setups:

root
Server1
Test1
Test2 (This test is dependent on test1 being alive)
Test3 (This test is dependent on test2 being alive)

So I want to copy test1, 2 and 3 from server 1 and perform those tests on server 2.
So I click on server1 and say copy and give it a name of Server 2 with the 3 tests but they end up looking like this:

root
Server1
Test1
Test2 (This test is dependent on test1 being alive)
Test3 (This test is dependent on test2 being alive)
Server2
Test1
Test2 (This test is dependent on server1>test1 being alive)
Test3 (This test is dependent on server1>test2 being alive)

but what I was expecting was:

root
Server1
Test1
Test2 (This test is dependent on test1 being alive)
Test3 (This test is dependent on test2 being alive)
Server2
Test1
Test2 (This test is dependent on server2>test1 being alive)
Test3 (This test is dependent on server2>test2 being alive)
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

So I want to copy test1, 2 and 3 from server 1 and perform those tests on server 2.
Do you mean you make copy and change target host name (test property)?
So I click on server1 and say copy and give it a name of Server 2 with the 3 tests
Not sure I understand what exactly means "give it a name of Server 2".
Are you changing "host" test property? changing folder variable? May be you are copying test from one folder to another and you are using some folder-level variables?
but they end up looking like this:
Yes, copy means just a copy, it does not mean HostMonitor will change test properties.
Not a bug.

If you want to change some test properties automatically (e.g. when you copy or move test from one folder to another), you may use special variables in some fields (like target host)
http://ks-soft.net/hostmon.eng/mframe.h ... #templates

Regards
Alex
pspencer008
Posts: 34
Joined: Wed Jul 30, 2014 1:00 am

Post by pspencer008 »

Alex,

Thanks for the response, Would you be able to provide me with an example based on the following?

We have a test with a name of "%FolderFullPath% - CPU %host%" and I would like it to be dependent on a job called "%FolderFullPath% - Ping: %host%" being alive.

(It doesn't matter which way the dependency is in the example it's just to get an idea what to put in the "This test depends on Expression" field)

Thanks

Paul
KS-Soft Europe
Posts: 2832
Joined: Tue May 16, 2006 4:41 am
Contact:

Post by KS-Soft Europe »

For CPU Usage test set the following options:
CommentLine5:
%FolderFullPath% - Ping %hostaddrb%
This test depends on Expression:
'%::%CommentLine5%::SimpleStatus%' == 'UP'

Note1: it is recommended to use %hostaddrb% instead of %host%, because %hostaddrb% never contains UNC backslashes.
Note2: %CommentLine5% - can be any comment line, available. Should be the same in "This test depends on Expression"
pspencer008
Posts: 34
Joined: Wed Jul 30, 2014 1:00 am

Post by pspencer008 »

Thanks very much for that
KS-Soft Europe
Posts: 2832
Joined: Tue May 16, 2006 4:41 am
Contact:

Post by KS-Soft Europe »

You are welcome.
Post Reply