[Chicago] Web test tools

Daniel Griffin dgriff1 at gmail.com
Wed Nov 7 18:41:14 CET 2012


I do something similar for one of my side projects.

conn = httplib.HTTPConnection("localhost", 5000)
conn.request("PUT", "/users/", json_data, headers )
response = conn.getresponse()
assert response.status == 400, response




On Wed, Nov 7, 2012 at 10:35 AM, Steve Schwarz <steve at agilitynerd.com>wrote:

> On Wed, Nov 7, 2012 at 11:27 AM, Garrett Smith <g at rre.tt> wrote:
>
>> I need to put together a simple test regime for a series of web apps.
>> I figure there'd be no shortage of excellent insight here!
>>
>> Honestly, the best way to describe the requirements would be curl +
>> regex validation :)
>>
>> I want to hit a URL, probably a simple GET. Then validate that it's
>> 200. Then apply pattern matching to the response body. Fail if
>> anything isn't as expected.
>>
>> Performance isn't an issue, but the ability to run the tests in
>> parallel might be a nice to have.
>>
>> This is all command line based. I'm not running it through a browser
>> and there's no need to execute JavaScript anywhere for any reason.
>>
>> I've pretty much just talked myself into curl + grep, but any other
>> thoughts/suggestions?
>>
>> Garrett
>
>
> Python with urllib2 and re modules in a script should do the trick if you
> want serial tests or use them to create a script taking url(s) as arguments
> and run the script in batches in parallel.
>
> Handy reference; http://www.voidspace.org.uk/python/articles/urllib2.shtml
>
> Best Regards,
> Steve
> Blogs: http://agilitynerd.com/  http://tech.agilitynerd.com/
> Dog Agility Search: http://googility.com/
> Dog Agility Courses: http://agilitycourses.com/
> http://www.facebook.com/AgilityNerd
>
>
> _______________________________________________
> Chicago mailing list
> Chicago at python.org
> http://mail.python.org/mailman/listinfo/chicago
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/chicago/attachments/20121107/6f3b8086/attachment.html>


More information about the Chicago mailing list