5
votes

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

4

4 Answers

3
votes

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.

3
votes

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.

1
votes

TestComplete was decent and easy to use when I used it (a couple of years ago). At least then, you'd need to learn some VBScript.

0
votes

We use TestComplete from AutomatedQA, and it's a decent platform for doing gui testing. We do all of our TestComplete code in Jscript, which isn't great, but it gets the job done. I'm not sure i'd recommend Automated GUI testing though, I think you'll get a much better return on unit testing.

Nunit and rhino mock are great tools for unit testing.

CruiseControl looks like the best way to set up automated testing on each build.