Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I have a 3-tiered .NET solution.

  1. Database (SQL SERVER 2008)
  2. Web Service (SOAP Service - *.asmx)
  3. WPF Client

I am comfortably writing Unit Tests within (3) The Client.
I am currently working on writing tests between (1)Database & (2)Service.

My question is, what are some useful ways to run integration tests across all 3 tiers. I would like this to run locally in my Test Runner, as well as part of the integration test.

Primarily, I am stuck on how to have a transient (setup-teardown-able) (2) Web Service & (1) Database that can be tested with (3) Client code as part of a full integration test.

share|improve this question
1  
You might want to consider asking on sqa.stackexchange.com –  Steve Evers Sep 14 '11 at 21:11
add comment

1 Answer

up vote 2 down vote accepted

Depending on your tooling this can be quite easy, but not very 'textbook'.

We use:

  • VS
  • Microsoft Test Manager
  • SCVMM + Lab Management features of MTM

In our case (I'm an SDET in QA), our application takes roughly 30 minutes to install, and we have a similar architecture (DB, App Tier, Presentation Tier - web and applications). Because a whole install/config would be intractable for testing, we have an installation/configuration test suite which is essentially OrderedUnitTests that will spin up a VM, confirm pre-reqs, install the product and configure everything.

From there we have the test suites. Some are targeted at the app tier (services) where it's a normal "unit test" (VS parlance, actual unit tests are part of the build and doesn't even go to QA unless they pass) that creates does whatever setup is necessay, calls the service(s) and asserts results - cleaning the DB changes in teardown as usual.

For the Presentation Tier we have webtests that will run or codedui tests that will start whatever app or site is under test, perform the actions, assert the results and then close everything back down to the desktop.

It's pretty straight-forward and works well.

share|improve this answer
    
+1 for using VMs. They are a god-send for integration testing, especially (and super useful for backwards compatibility and regression tests, too) –  blueberryfields Sep 14 '11 at 23:20
    
@blueberryfields: Absolutely. It's almost criminal, at this point, to not use VMs for integration, acceptance and functional tests. MTM + SCVMM (once some kinks are worked out) is really a home run because of the automation element that it can have as well. There's almost no test that can't be automated with this configuration. –  Steve Evers Sep 14 '11 at 23:37
    
Thank you for your feedback! –  Sheldon Warkentin Sep 19 '11 at 13:16
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.