© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•2y ago•
3 replies
Cpt. Reis

Unit/Integration testing - what are good approaches?

hey! i'm working in my first C# / .NET project and i'm excited to learn new stuff (having Java/Spring background), as .NET is a whole new experience for me.
in the former project, we had really good test setup - a ton of integration tests covering everything, working with test containers to build a database instance for the tests. tests were run on each PR via git actions, which guaranteed working tests on the main branches.

in my new project, we're in the "forming" phase, so it's not that consistent yet from a technical perspective. meaning, we're wrapping our heads around a solid setup.

and i wonder about a few points:
- would you prefer unit or integration tests, and why?
- how can the test setup be done effieciently in .NET - so that we spin up a database and run the migrations there for example, to rebuild the correct structure?
- do you have some general tips for testing in .NET for me?

thankful for your thoughts!
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

✅ Testing Guidance (Unit/Integration)
C#CC# / help
4mo ago
Good Unit Testing practices
C#CC# / help
2y ago
What's correct unit testing?
C#CC# / help
3y ago
unit testing
C#CC# / help
2y ago