Django Test Client Like Tool?
I've got to know and love the Django Test client. I'd really like to use it to test external sites and URLs outside of the current project.
- Is this possible?
- If not, is there something similar I could use? (ideally in Pytho开发者_StackOverflow中文版n)
I don't need to do anything dramatic, just, say, grab a URL and check the status code, check that it took less than x seconds, and that it contains some text.
Ideally I'd like it so that I could run/trigger these tests from some sort of hosted web app, and also have them run at certain intervals.
I realise it wouldn't take too much to roll something myself, but I'd prefer to jump onboard something which already exists so wanted to check what the options were before I do so.
Thanks loads.
Rolo.
No, it doesn't work like that. It's not a real web client, it's just a piece of internal Django code that catches the request and returns the relevant response.
The best tool for the sort of testing you're talking about is something like Selenium.
精彩评论