Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Automated testing .NET (Gallio?)

I am working on a software development project that uses code written primarily in C and C#. Currently, the responsibility of testing falls mostly on developers as they change the code.

I am interested in implementing an automated testing framework to help us improve the quality of our code. In particular, it would be great to have automated testing that ran every time code was submitted to version control.

I do not have much experience with automated testing (or unit testing for that matter). Has anyone done development using a testing framework for C/C#, and if so, what might be some hurdles we would face to implement it company-wide and on a rather large existing code base?

In particular, I have been looking at how Gallio might be used. Any comments on this particular product would be appreciated.

Additional Information:

Adding unit tests to an existing project
Unit Testing Legacy ASP.NET Webforms Applications
Moving existing code to Test Driven Development
Favorite .NET Unit Testing framework

like image 602
Tim Avatar asked Dec 18 '08 20:12

Tim


People also ask

What is .NET testing?

Testing tools. . NET is a multi-language development platform, and you can write various test types for C#, F#, and Visual Basic. For each of these languages, you can choose between several test frameworks.

What is the best test framework for .NET core?

NET framework helps developers build applications for Windows. These applications also need to be tested just like any other software. There are many choices available for testers to test their application. However, the ones that stand out are MSTest, NUnit, and xUnit.Net.

How do I test a .NET project?

The dotnet new sln command creates a new solution in the unit-testing-using-dotnet-test directory. Change directory to the unit-testing-using-dotnet-test folder. The dotnet new classlib command creates a new class library project in the PrimeService folder. The new class library will contain the code to be tested.

Which tools are used for unit testing in .NET solutions?

NCover code coverage analyzer from gnoso. NCrunch automated concurrent testing tool for Visual Studio. NUnit unit testing framework. Rhini Mocks mocking library.


2 Answers

To be blunt, this sounds like you're looking for reasons not to do it. Just get NUnit and get going. Start with the smallest piece to get your feet wet.

like image 79
Steven A. Lowe Avatar answered Sep 18 '22 09:09

Steven A. Lowe


Gallio is actually a framework for the entire testing toolchain. From writing the tests, to running them to post build processes. It provides common facilities and standardized interfaces for each step to allow greater choice and flexibility when putting a build process together.

It comes with a version of the MbUnit framework, which it uses by default. It also comes with a GUI runner named Icarus, and a console runner named Echo. They are all well respected tools in the testing community.

It is an excellent choice for a large company, since it can allow you to take advantage of many of the popular testing and continuous integration tools with a minimum of integration headaches.

Picking a framework and writing tests is only half the battle, Gallio really does help with the other half; gluing up all the other steps in the build process.

The only real downside at the moment is the lack of a central repository of examples and information. For some, the fact that its a relatively new initiative may put them off using it right now.

Check out the docs here. They are a work in progress and very incomplete but will get you started on the basics of writing tests. Keep your eyes on Jeff Browns Blog for other information.

like image 44
Jim Burger Avatar answered Sep 20 '22 09:09

Jim Burger