Simon icon Simon
Flexible server monitoring

Want to fail if a webpage has not changed

I admit I'm just starting with Simon.

I want to test a web page, say every 10 minutes, and fail if a certain text on that page has NOT changed. I've added a new "Web (HTTP)" kind of a test, Method is GET, and configured the URL (and Preview shows the page I want). I set the SmartChange to identify the text I want to look at in the Source.

I never get a failure in the test, even if I run it two times in quick succession (and I know the target page has NOT changed) or whether I run it, change the target page, and run it again (so I know the target page HAS changed.) What am I doing wrong -- and how is this supposed to work?

Also, I did not configure a cookie into the Test, but I now see that one is configured: Cookie: __utma, Value: 104681986..... What is this all about?



David Sinclair's picture

Re: Want to fail if a webpage has not changed

Hi, welcome to the wonderful world of Simon! :)

The Smart Change Detection feature (in versions prior to the upcoming 2.6) results in a Change if the text within the two text blocks is different, a Failure if either text block can't be found, or no change if the contained text is the same.

So your test is operating correctly. There isn't currently a way to have the test fail if there is no change — no change is always a non-event.

There are some hacky workarounds for that, e.g. writing a Script-based service to get the page and analyze it yourself, or a Script-based notifier to analyze the output. Or have two tests: a Web-based one to do the check, with a Script-based notifier that saves the output to a local file, then a Script-based test to look at that file and fail if it didn't change. But those are hardly ideal solutions.

The ideal is coming in version 2.6: it will include a much more versatile "Filter" feature instead of the Smart Change Detection feature, allowing the same and many more evaluations of the output... yes, including resulting in a Failure if the output didn't change.

So, keep an eye out for version 2.6, due in about a month or so.