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! π