Welcome to the API Automation with Python project! 🎉
This project is an automation framework for testing the JSONPlaceholder API (https://jsonplaceholder.typicode.com) using Python and the requests library. It automates testing for common HTTP methods (GET, POST, DELETE) to ensure the API is working as expected. 🛠️
- 🔍 Automated Testing for JSONPlaceholder API
- ✅ Test common HTTP methods: GET, POST, DELETE
- 📝 Verify API responses for correct status codes and response bodies
- 🚀 Easily extendable for additional endpoints and test scenarios
To run this project, you'll need:
- Python 3.x
requestslibrarypytestfor running the testsTkinterfor running GUI Ptyhon test
After running the command, you'll see a detailed report of the tests in your terminal, showing whether all tests passed or if any failed. 🎯
The project includes the following test cases:
- Test GET all posts 📜: Verifies that the
/postsendpoint returns a list of posts with the expected fields (id,title,body). - Test GET a single post 📑: Verifies that the
/posts/{id}endpoint returns the correct post based on the providedid. - Test POST new post ✍️: Verifies that a new post can be created with the
/postsendpoint and the returned data is accurate. - Test DELETE a post 🗑️: Verifies that a post can be deleted using the
/posts/{id}endpoint.
Follow these steps to get the project up and running:
- Clone the repository:
- git clone https://github.com/Nikenarra0816/API-Automation-with-Python.git - cd API-Automation-with-Python - Install the required dependencies & run the tests:
- pip install -r requirements.txt - python run_tests_gui.py
Contributions are welcome! Feel free to fork this project, submit issues, and make pull requests. Together, we can make this project even better! 🚀