In [ ]:
import requests
def api_gatling_gun(a, b):
try:
requests.post('https://mysite.com/login', params={
'user':a,
'password':b
})
except Exception:
# all exceptions here will be issues form requests.post
# look at your server logs to see what breaks
pass
fuzz(api_gatling_gun)
This has been tremendously helpful in finding issues with api's that I have written in the past. As a word of warning to those who want to try this, keep in mind that battle_tested
can only fuzz what you give it.
This function may be giving the server a really rough time with the 'user' and 'password' fields but any fields you don't specify in the harness function will still need to be tested in the future. (I learned this the hard way)
In [ ]: