5

I learned nothing about testing during my 3 years of computer engineering. We were mostly just told that it was very important.

Anyways, I managed to get started with Unit Testing on my own to a talk by Roy Osherove and his book The Art of Unit Testing. Very helpful, clear and to the point.

Problem now is that there of course are a lot of code that requires for example databases or web services. I can mock these take them out of the equation which is good for unit tests, but it does leave quite a bit of my code untested. Are there any good books or resources that are up to date, with very little fluff, which can help me get started with integration tests? Preferably with focus on C#.

4
  • Not related to the question, but would you mind sharing the link (if there is) to the talk by Roy Osherove on unit testing? Thanks!! Commented Mar 15, 2011 at 11:44
  • 1
    @shahkalpesh: Osherove has many videos at osherove.com/videos and the referenced one is likely among them. Commented Mar 15, 2011 at 11:52
  • It was at a developer conference (NDC 2009). The meetings was recorded and made available through BitTorrent, but don't think the torrent is live anymore. Commented Mar 15, 2011 at 11:53
  • Ah, thanks Don! You can find the ones I talked about here: osherove.com/videos/category/ndc-2009 Commented Mar 15, 2011 at 11:55

4 Answers 4

1

I am reading this Manning book Continuous Integration in .NET

Sign up to request clarification or add additional context in comments.

2 Comments

Interesting. Actually have that as a PDF, but not gotten to it yet, hehe. Didn't know it was about integration testing though? Thought continuous integration was something else? Or is the testing part of it?
Yes testing (including system, integration and acceptance) is very much a part of continuous integration. Have a look at the contents manning.com/kawalerowicz/excerpt_contents.html
1

One book that I read that helped me out on the path of integration testing was Continuous Integration: Improving Software Quality and Reducing Risk

This book did not have a primary focus on .NET but did offer a valuable resource in the whole process of continuous integration.

In respect to integration testing (which is a part of continuous integration) the book covers some aspects of the process of building up a database, going over frameworks to help you seed data, and wrapping that up nicely in a build script (the book uses Nant)

Comments

1

Here is an interesting analogy: http://osherove.com/blog/2008/5/31/unit-testing-vs-integration-testing-the-restaurant-analogy.html

Comments

0

If you design your tests the way it should be designed, the service and the caller both will be tested. You don't need Integration Testing for Client/Webservice test. You should create a test for the caller, and another one for the service. This ensures that both will be tested. However, sometime you need to test directly with the database, (for example, to test your repository classes), in this case, you should do an integration testing, on a real database.

1 Comment

Whilst what you say is reasonable, it completely fails to answer the question. Which books/resources are you recommending exactly?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.