https://github.com/rafaelrabelodasilva/automacao_catfact_api_robot_framework
This project is designed to perform GET method tests on the endpoint https://catfact.ninja/breeds
https://github.com/rafaelrabelodasilva/automacao_catfact_api_robot_framework
automation python robotframework
Last synced: 5 months ago
JSON representation
This project is designed to perform GET method tests on the endpoint https://catfact.ninja/breeds
- Host: GitHub
- URL: https://github.com/rafaelrabelodasilva/automacao_catfact_api_robot_framework
- Owner: rafaelrabelodasilva
- Created: 2024-07-30T23:18:07.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-07-31T01:10:55.000Z (almost 2 years ago)
- Last Synced: 2025-04-06T16:51:01.403Z (about 1 year ago)
- Topics: automation, python, robotframework
- Language: HTML
- Homepage: https://catfact.ninja/breeds
- Size: 287 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
🧙♂️ Cat Facts API Automation with Robot Framework
## ✨ Technologies
This project was developed using the following technologies:
- [Robot Framework 6.1.1](https://robotframework.org/)
- [Python 3.7.4](https://www.python.org/)
## 💻 Project
This project is designed to perform GET method tests on the endpoint `https://catfact.ninja/breeds`. The following test cases have been automated:
- **CT01**: Valid request to GET `/breeds` returns status code 200 and a list of breeds.
- **CT02**: Request with invalid limit parameter returns status code 400 and an error message.
- **CT03**: Validate that specifying the limit parameter `1` returns only the first object in the list.
### 📚 Libs
- RequestsLibrary:
- What it does: Imports the RequestsLibrary, enabling HTTP requests (such as GET, POST, etc.) and handling responses within Robot Framework tests.
- Why it's important: Without this library, it wasn't be able to make HTTP requests to test APIs.
- Collections:
- What it does: Imports the Collections library, providing useful functions for manipulating lists and dictionaries within Robot Framework.
- Why it's important: It helps manipulate and verify structured data like lists and dictionaries, which are commonly used when testing APIs.
## 🚀 How to run
1. Clone this repository.
2. Install [Python 3.7.4](https://www.python.org/downloads/release/python-374/).
3. Install Robot Framework by running the following command in your terminal:
`pip install robotframework==6.1.1`
4. Install the lib RequestsLibrary:
This library is used in the tests. You can install it via pip by running the following command in your terminal:
`pip install robotframework-requests`
*Tip*: Collections Library: This is a standard library in Robot Framework, so no additional installation is required.
5. Navigate to the project directory and then to the /tests folder. Run the tests using the following command in your terminal:
`robot --outputdir test_results get_breeds.robot`
*Tip*: The `--outputdir test_results` option will place the generated files by Robot Framework into the tests/test_results directory.
## 📄 Test results
After running the tests, you will find the following files in the test_results directory:
- log.html: Detailed log of the test execution.
- report.html: Summary report of the test results.
- output.xml: Machine-readable test results.
Feel free to review these files to analyze the test outcomes.
## 📱 Contact
For more information, please contact me via my [LinkedIn](https://www.linkedin.com/in/rafaelrabelodasilva/)