How to do API Testing using Python - GET and Validate Json Response

Pubblicato il: 15 maggio 2023
sul canale di: Azhar Techno Coder
1,124
36

How to do API Testing using Python - GET and Validate Json Response

Code:
import requests
import json
import jsonpath

requestURL = "https://reqres.in/api/users/2"

response = requests.get(requestURL)
jsonRes = json.loads(response.text)
val = jsonpath.jsonpath(jsonRes,'data.id')
print(val[0])

headers = response.headers
print(headers)


Chapters:
0:00 - Introduction to the video
0:13 - Import json and jsonpath
0:39 - Program to get json response
4:11 - Validate json response
4:50 - Executing different response methods

Next Steps :

---------------------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------------------
Must Watch Playlists

► 1. Javascript -    • Javascript Factory  
► 2. Puppetter -    • Puppeteer  
► 3. Cypress -    • Cypress  
► 4. Tech works -    • Video  
► 5. Vbscript Basics To Advanced -    • VBScript Part 1 -  Features Advantage...  
► 6. Jmeter -    • Jmeter Tutorials  
► 7. Excel -    • Videos On Excel  
► 8. Appium -    • Appium  
► 9. Shares -    • Shares  
► 10. Javascript Interview Questions -   • Javascript Interview Questions  
► 11. C# Tutorials -    • C# Factory  
► 12. HTML & CSS -    • HTML & CSS  
► 13. Browser Console -    • Browser Console  
► 14. JSON -    • Videos on Json  
► 15. Specflow -    • Specflow Tutorials  
► 16. MongoDB -    • MongoDB Tutorials  
► 17. Postman -    • Postman  
► 18. Python -    • Python  
► 19. Typescript -    • Typescript & Node Imp Questions  
► 20. Node -    • Node  
► 21. Java Selenium Interview Questions:    • Java and Selenium Imp  
► 22. Real Time Interview Q & A:    • Real Time Interview Questions  
► 23.SOAP UI Tutorials :   • SOAP UI  
---------------------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------------------

#python
#json
#getrequest


In questa pagina del sito puoi guardare il video online How to do API Testing using Python - GET and Validate Json Response della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Azhar Techno Coder 15 maggio 2023, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 1,124 volte e gli è piaciuto 36 spettatori. Buona visione!