c# - Getting started with automated integration/unit testing in an existing code base -


Background: We have been assigned a very large codebase (1.4 million lines), which is primarily in C #. AP 2.0 2.0 ASMX web services are mainly included in access to data in the SQL Server 2008 database and also in various XML files. There are no existing automatic tests in place. We have an automatic night (CC .net).

We want to present some level of automated testing, but it is not possible to restart the granular level unit tests for this amount of code. Our first idea is to find a way to prepare automated tests, which We have to provide some level of code coverage to call each web service with a set set of parameters. A quick way to get the highest amount coverage is with some automated tests. Is this called unit testing or will it be considered anything else?

How do I go about separating the data store to get the results of the test continuously? Will any testing tool work better for this approach than others? XUnit? MS test? NUnit?

Any suggestions for starting us in the right direction will be highly appreciated. Thanks

My company is doing something similar to our code base (C instead of C) which is the total Yoga has gone one million lines steps like this:

1) Write some automated tests such as you describe the system level test.
2) Apply the rule that the new code will be a unit test.
3) When there are some bugs against it in any area, the process of correcting those bugs should include writing the original unit test.

The issue is that 3 should not be required to have a full unit test (if it is easy for people to do). If you go 40% coverage of a particular module with more than 0% coverage coverage, then you have made great progress.

However, you can have up to 5% of total 6 months, which is the total code base 5% is the code that is changing the most and where you can start the most worms. The code I now work in is approximately 60% covered by integration tests and 15% (by line) is covered by unit test. It does not seem like much, but it provides significant value and has benefited from our development efforts.

EDIT: In response to another comment, we currently take about 14 hours to set one-third of the tests. Now we are running something in parallel to sharpen them.


Comments

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -