Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/stefruseva88/test-api-controllers

Testing API Controllers
https://github.com/stefruseva88/test-api-controllers

asp-net-mvc integration-testing nunit-tests rest-api ssms test-automation xunit-tests

Last synced: 27 days ago
JSON representation

Testing API Controllers

Awesome Lists containing this project

README

        

# Integration testing of API Controllers with NUnit and xUnit
[![C#](https://img.shields.io/badge/Made%20with-C%23-239120.svg)](https://learn.microsoft.com/en-us/dotnet/csharp/)
[![.NET](https://img.shields.io/badge/.NET-5C2D91.svg)](https://dotnet.microsoft.com/)
[![MS SQL Server](https://img.shields.io/badge/Database-MS%20SQL%20Server-CC2927.svg)](https://www.microsoft.com/en-us/sql-server)
[![NUnit](https://img.shields.io/badge/tested%20with-NUnit-22B2B0.svg)](https://nunit.org/)
[![xUnit](https://img.shields.io/badge/tested%20with-xUnit-5E1F87.svg)](https://xunit.net/)

### This is a test project for **Back-End Test Automation** March 2024 Course @ SoftUni.
---
## Project Overview
This repository highlights the process of integration testing for API controllers in an ASP.NET MVC application using the NUnit and xUnit testing frameworks.

## Purpose
The objective of this project is to demonstrate the creation of integration tests that verify the functionality of API controllers, ensuring they properly interact with the database (such as SQL Server managed through SSMS).

## Testing Frameworks
- NUnit: A mature and popular .NET testing framework.
- xUnit: A free and open-source testing framework known for its readability and ease of use.

## Prerequisites
- Basic understanding of ASP.NET MVC, C#, and web APIs.
- Familiarity with NUnit or xUnit (choose one or both).
- Familiarity with SSMS(SQL Server Management Studio).

## Project Structure
- Controllers: Contains the code for API controllers, responsible for handling incoming requests, managing responses, and interacting with the data and application layers.
- Models: Includes data model classes that define the structure of entities like Event, User, and others.
- Properties: Stores configuration files, such as connection strings and environment-specific settings.
- Views: Contains UI elements like Razor views for the MVC framework.
- Tests: This section includes integration tests for the application, focusing on the "Eventmi" app.

## 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! 🚀