TruClient 12.53 script to be executed by AppPulse
I have a situation where need a script to read the last updated time stamp from a web page and throw an error if that time stamp is more than 20 minutes old. I am using TruClient 12.53 and have a script that can read the time stamp, compare it to the current time and determine if it is too old. What I can't get it to do is make the transaction fail so I get an alert. I have tried using the LR.log and LR.endTransaction functions, but I can't get the script to fail. Do you have any suggestions? An example would be great.
Here is an exerpt from the mdrv.log after I run the script in VuGen. You can see it logs an error, then says that the transaction ended with a Fail status and then says it has no error messages!:
t=00007744ms: Error -205177: Error: Outage map not updated within past 20 minutes Snapshot Info [MSH 1 0] [MsgId: MERR-205177]
Notify: Transaction "Map Refresh" ended with a "Fail" status (Duration: 0.7320 Think Time: 0.0130 Wasted Time: 0.2100).
Notify: Transaction "Map Refresh" has 0 error message(s).
t=00007988ms: ** 3.1: Evaluate JavaScript code LR.log("Error: Outage ma...fresh", "Fail"); ** successfully completed with end event 'Action completed' [MsgId: MMSG-205180]
t=00008028ms: ** 3: If (true) ** successfully completed with end event 'Action completed' [MsgId: MMSG-205180]
Thanks in advance!
Joe