I have a batch file I run as a test and at the end, it types a text file. If the text file contains anything, I want it to alert.
This used to work and now it's not. I don't remember the previous version we were on, but we're running 3.44 now.
I have the test set to "Alert if the errorlevel returned by program is <> from 0". (not my grammar - it's worded that way in the app)
If I run a test file that does nothing but type the text file with a 1 in it, the test still passes.
What am I doing wrong? Please help!
Thanks!
External program not testing properly
As I understand you are using "External" test method?If I run a test file that does nothing but type the text file with a 1 in it, the test still passes.
Of course it passes because ERRORLEVEL in this case = 0.
If you want to start alert when ERRORLEVEL<>0, your script should return different ERRORLEVEL code.
If you want to check contents of the file you should use another test, e.g. "Compare Files" test. "External" test does not check any files, it checks ERRORLEVEL code that returned by an external program.I have a batch file I run as a test and at the end, it types a text file. If the text file contains anything, I want it to alert.
Probably you have changed script?This used to work and now it's not.
If you have license for HostMonitor version 3, you may upgrade to HostMonitor 3.71 at no cost.I don't remember the previous version we were on, but we're running 3.44 now.
Looks like you made upgrade to version 3.44 long time ago. Right? But test stop work now? It means you have changed your script. Right?
Regards
Alex