{"repo":"Rick-van-Dam/TestExamplesDotnet","free":true,"listed":false,"github":"https://github.com/Rick-van-Dam/TestExamplesDotnet","clone":"git clone https://github.com/Rick-van-Dam/TestExamplesDotnet.git","description":"Showing how you can easily setup fast and easy to run more complex tests such as api tests or browser tests in .NET","language":"C#","stars":74,"topics":["apitesting","asp-net","asp-net-core","csharp","netcore","nunit","testcontainers","testing","xunit","integration-testing"],"license":"MIT","category":"dev-tools","readme_excerpt":"TestExamplesDotnet What is this? Whenever I start or join a new project one of the first things I want are good tests. These tests should be easy to setup, fast to run and give good confidence that the application is actually working. This is important to have a productive developer feedback loop. The example tests in this repo have been setup with that in mind. Currently the example tests in this repo are aimed at ASP .NET core with entityframework for persistence. What this is not This is not an example repository showing you how to run end to end tests against a real environment. Every example you see here will run completely locally. This is both an advantage (higher reliability, much faster) as a disadvantage (less real than the real thing). Things like network latency will play out differently in a real environment so keep this in mind. Prerequisites - .NET - Docker Notable features: - No manual setup required, dotnet test is all you need to run. This not only makes it easy for developers to run the tests but also simplifies the CI as you can see in the github workflow file. This is made possible with the magic of TestContainers and some custom code. - Uses a real database so you can be quite confident that your app is actually working. You won't run into differences between an in memory database and a real database here. - Databases are pooled and cleaned between runs with Respawn. This way migrations only have to be run once which saves alot of time. Furthermore tests","default_branch":null,"files":null,"tree":[],"storefront":"/r/Rick-van-Dam","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/Rick-van-Dam/TestExamplesDotnet/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}