We have a CMS web application that we’d like to ensure is up and accessible. I was using the URI module to check the login page for a proper response code, but I’d like to go a step further and test that a set of credentials can actually log into the site. I’ve tried messing around with some of the examples on the URI module documentation to no avail. Has anyone done something like this before?
We’ve been experimenting using Selenium for things like this. It’s not simple and will probably make your head hurt (it makes mine hurt), but it is very flexible for things like this.
We've been experimenting using Selenium for things like this. It's not simple and will probably make your head hurt (it
makes mine hurt), but it is very flexible for things like this.
There are numerous crawlers around that can be used for that task if you can't stomach Selenium.
Regards
Racke
Circling back around to this. What do you mean by crawlers? Any you’d recommend.
I did notice the URI module can pass credentials to a site, but when I try that it works with any credentials, even non-existent or incorrect credentials, so I’m not totally sure what that is actually doing because it can’t be correctly authenticating.
I think you should be able to do this with uri module, but you might need to check the http response code as well. An unsuccessful http request with basic authentication will return a response from the server, but it will typically not have a 200 (OK) response code, but instead have something like a 401 Unauthorised or 403 Forbidden response.
Hope this helps,
Jon
I’ve tried it with the URI module and I don’t believe it’s doing what I’d like. It will return a successful authentication even when I use incorrect credentials, so I’m not sure what it’s really doing.