TestProject Forum
Powered by leading experts in the test automation community

Run connected web hook after python sdk test

I have a web hook setup that send alerts to team but I am unsure how I can call the from a coded test.

Hello @zacharyedgell
Since webhooks are basically HTTP POST requests you can use Python requests.
Here an example:

.
import requests
url=“www.google.com
obj = {‘somekey’: ‘somevalue’}
requests.post(url,obj)

You can use this HTTP POST request at the beginning of the test, at the end of the test, or wherever you want.

Let me know if that helps.