https://github.com/stefruseva88/restsharp-api-tests
RESTful API Tests
https://github.com/stefruseva88/restsharp-api-tests
csharp dotnet integration-testing nunit rest-api restsharp
Last synced: 19 days ago
JSON representation
RESTful API Tests
- Host: GitHub
- URL: https://github.com/stefruseva88/restsharp-api-tests
- Owner: StefRuseva88
- License: mit
- Created: 2024-04-06T09:28:42.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-24T10:45:16.000Z (over 1 year ago)
- Last Synced: 2024-10-25T09:16:10.565Z (over 1 year ago)
- Topics: csharp, dotnet, integration-testing, nunit, rest-api, restsharp
- Language: C#
- Homepage:
- Size: 85.9 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SoftUni Exam Projects - RestSharp API Tests
[](https://learn.microsoft.com/en-us/dotnet/csharp/)
[](https://dotnet.microsoft.com/)
[](https://jwt.io/)
[](https://nunit.org/)
### This is a test project for **Back-End Test Automation** March 2024 Course @ SoftUni
---
## 📜 Project Description
This repository contains a series of test projects designed to practice and demonstrate skills in back-end test automation. The tests are written using RestSharp for API interactions and NUnit for testing framework.
## 📂 Projects Included
- **Idea Center App**: This project focuses on automating tests for the "Idea Center" system, a platform where users can submit and discuss innovative ideas.
- **Foody App**: The "Foody" app project involves automating tests for a food review service API.
- **Story Spoil App**: The project automates tests for the "Story Spoiler" system, an application that provides users with spoilers for their favorite stories.
## ✅ Test Case Coverage
- User authentication and authorization
- User data submission and retrieval
- User data edition and deletion
- Error handling and validation
## 💻 Technologies Used
- **RestSharp**: A simple REST and HTTP API client for .NET.
- **NUnit**: A unit-testing framework for all .NET languages.
## 🏗️ Project Structure
- **Tests**: Contains the test cases for each system.
- **Models**: Contains the models representing the API responses and requests.
## 🛠️ RestClient Initialization and Configuration
1. **Initialize a RestClient with the base URL of the API.**
2. **Authenticate with your credentials, and store the received JWT token.**
- Authenticate by sending a request with your credentials.
- Capture the JWT token from the response and store it securely for subsequent requests.
3. **Configure the RestClient with an Authenticator using the stored JWT token.**
- Use the stored JWT token to configure the RestClient's Authenticator.
- This setup ensures that all subsequent requests made by the RestClient are authenticated.
## 📄 License
This project is licensed under the [MIT License](LICENSE). See the [LICENSE](LICENSE) file for details.
### 🤝 Contact
For any questions or suggestions, please open an issue in the repository.
---
### Happy Testing! 🚀