Web Page Check
list James Wade
Does anyone know how I can integrate hobbit with a test that would check web page logins? For example, We have a Web Server which connects to an App. Server which connects to a Database Server. To test functionality, we login to the Web Server, then enter data into a form, which stores the information into the database. This is just a test user account. I'd like to setup a test that does the same thing and have hobbit alert us. For example, you can an error logging in, or an error submitting your data in the form. Any assistance would be appreciated. Thanks..James
list Ralph Mitchell
▸
On 1/10/07, James Wade <user-659655b2ea05@xymon.invalid> wrote:
Does anyone know how I can integrate hobbit with a test that would check web page logins? For example, We have a Web Server which connects to an App. Server which connects to a Database Server. To test functionality, we login to the Web Server, then enter data into a form, which stores the information into the database. This is just a test user account. I'd like to setup a test that does the same thing and have hobbit alert us. For example, you can an error logging in, or an error submitting your data in the form.
I'm doing exactly that with a bunch of scripts I wrote for Big Bother,
before switching to Hobbit. I'm using curl to fetch web pages, then
grep, awk, or whatever to pick out interesting stuff to make sure the
page is correct. Lather, rinse, repeat. Curl handles cookies
properly, proxies, authenticating via Basic Auth, etc.
I'm about to go to bed right now, but if you're interested I'll try to
get some sample stuff written up when I get to work tonight.
Ralph Mitchell
list James Wade
Sure, I'd be very interested. Thanks...James
▸
-----Original Message-----
From: Ralph Mitchell [mailto:user-00a5e44c48c0@xymon.invalid]
Sent: Wednesday, January 10, 2007 3:08 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: Re: [hobbit] Web Page Check
On 1/10/07, James Wade <user-659655b2ea05@xymon.invalid> wrote:Does anyone know how I can integrate hobbit with a test that would check web page logins? For example, We have a Web Server which connects to an App. Server which connects to a Database Server. To test functionality, we login to the Web Server, then enter data into a form, which stores the information into the database. This is just a test user account. I'd like to setup a test that does the same thing and have hobbit alert us. For example, you can an error logging in, or an error submitting your data in the form.
I'm doing exactly that with a bunch of scripts I wrote for Big Bother, before switching to Hobbit. I'm using curl to fetch web pages, then grep, awk, or whatever to pick out interesting stuff to make sure the page is correct. Lather, rinse, repeat. Curl handles cookies properly, proxies, authenticating via Basic Auth, etc. I'm about to go to bed right now, but if you're interested I'll try to get some sample stuff written up when I get to work tonight. Ralph Mitchell
list Gary Baluha
Hobbit also supports some basic (though fairly complete) options of doing this itself. Look at the Hobbit man page for the bb-hosts file, and look for a section titled "HTTP Tests". I believe the "post" test will work. If the options Hobbit has doesn't do enough, then you'll probably need to use a script as below (which should also be easy enough to do).
▸
On 1/10/07, Ralph Mitchell <user-00a5e44c48c0@xymon.invalid> wrote:On 1/10/07, James Wade <user-659655b2ea05@xymon.invalid> wrote:Does anyone know how I can integrate hobbit with a test that would check web page logins? For example, We have a Web Server which connects to an App. Server which connects to a Database Server. To test functionality, we login to the Web Server, then enter data into a form, which stores the information into the database. This is just a test user account. I'd like to setup a test that does the same thing and have hobbit alert us. For example, you can an error logging in, or an error submitting your data in the form.I'm doing exactly that with a bunch of scripts I wrote for Big Bother, before switching to Hobbit. I'm using curl to fetch web pages, then grep, awk, or whatever to pick out interesting stuff to make sure the page is correct. Lather, rinse, repeat. Curl handles cookies properly, proxies, authenticating via Basic Auth, etc. I'm about to go to bed right now, but if you're interested I'll try to get some sample stuff written up when I get to work tonight. Ralph Mitchell
list Henrik Størner
▸
On Wed, Jan 10, 2007 at 01:59:10PM -0600, James Wade wrote:
Does anyone know how I can integrate hobbit with a test that would check web page logins? For example, We have a Web Server which connects to an App. Server which connects to a Database Server. To test functionality, we login to the Web Server, then enter data into a form, which stores the information into the database. This is just a test user account.
Generally, Hobbit's built-in web checking can only request one URL. However, that one request can include authentication data (if you're using "basic" HTTP authentication, or X.509 certificate authentication) as well as posting form data. If your website is different - e.g. you don't use basic authentication because it's insufficient, then you'll need to build a custom test script for yourself. Regards, Henrik
list James Wade
Hi Henrik, Yes, I want to do more than authentication, I want to basically act like a user using a test account to test basic functionality of the website. James
▸
-----Original Message-----
From: Henrik Stoerner [mailto:user-ce4a2c883f75@xymon.invalid]
Sent: Wednesday, January 10, 2007 4:16 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: Re: [hobbit] Web Page Check
On Wed, Jan 10, 2007 at 01:59:10PM -0600, James Wade wrote:Does anyone know how I can integrate hobbit with a test that would check web page logins? For example, We have a Web Server which connects to an App. Server which connects to a Database Server. To test functionality, we login to the Web Server, then enter data into a form, which stores the information into the database. This is just a test user account.
Generally, Hobbit's built-in web checking can only request one URL. However, that one request can include authentication data (if you're using "basic" HTTP authentication, or X.509 certificate authentication) as well as posting form data. If your website is different - e.g. you don't use basic authentication because it's insufficient, then you'll need to build a custom test script for yourself. Regards, Henrik