I have been writing a lot of UI tests lately using Selenium and I want to do more integration testing from the backend as well.

What is a good approach to start with this, where can I find some more resources in this?

My team does a successful job in writing very good unit tests, but I want to learn and test the whole software from the backend as well. We have xml going out to various other partners as well.


I am working under the assumption that you would be familiar with the language the tools are being written in. If the team you are on already is writing unit tests a good place to start might be with them. Talk to the developers that are writing the unit tests and get an idea for how the underlying code is working. In the process of doing this start talking to them about the different layers of the system that you are working on.

  1. Is there a database? The perhaps you can look at writing some tests that execute the database code directly.

  2. What does the middle tier look like. Does the UI or Applciation layer call any services? If so you could write tests via code that mimic those calls directly to the services.

  3. the XML - There are lots of ways you could do validation on the xml file by doing a static compare or building an oracle that could tell you what structures and attributes to include in the file

  4. is there an API? How would you go about exercising it.

There is a lot of things that you can do to test the different layers of the application. Not all of them have to be automated but many of them can and will lend themselves to it. The biggest thing is to get up and go talk with people and be curious about the systems you are working on.

  • Dan, most of it seems do-able , we are working on a MVC application in C# . What is a good place to start at ? Testing above the model layer or database or something else at all? – user2062360 Nov 8 '13 at 18:03
  • 1
    Since it sounds like your team is doing unit tests I would take a look at performing integration tests that work through the full stack of the application. Since you are have an MVC application you might take a look at something like this: blog.stevensanderson.com/2009/06/11/… – Dan Snell Nov 8 '13 at 23:28

I agree with everything in Dan's answer. There are a few options on how to automate testing of the web service layer. You can use gui tools such as SOAPUI or JMeter, or you can use libraries such as Rest Sharp or a java alternative. I often prefer to start with an API or library for my automation, but recently I've been having success with JMeter and SoapUI as well.

With any of these tools you can create some built in validation of responses, it can be simple (check for 200 response) to complicated (apply json or xml schema validation to the response as well as validate specific values within the response). I really like validating xml and json responses against schemas by creating a validating request function per endpoint.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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