What is it?
Short Version: Requests for WSGI apps with an emphasis on testing
What is it?
Long Version:
Why?
- I mean: why bother with functional testing?
- With WebTest, they're easier to write than unit tests
- I typically get better coverage than with unit tests
- I usually find more bugs than with unit tests
- ... maybe I'm just crap at writing unit tests ...
How?
- Use your web application
- Note what you click on and what you fill in
- Try and break stuff
- Convert your notes to code
... this last step is easier than it sounds ...
Quick Recap
- To get a URL use the .get() method
- To click on a link use the .click() method
- To access the form on the page use the .form attribute
- To follow a redirect use the .follow() method
Yeah ... I don't really need to go on ...
What else?
- Imagine a WSGI app that simply performed the requests passed to it
- Scraping?
- Pen testing?
- Fuzzing?
- Yeah, there's probably other libraries for doing these already - but with
WebTest and a little proxy WSGI app you could whip up the same thing in
minutes!
←
→
/
#