Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Whats a great way to perfom integration testing?

Tags:

We have written our own integration test harness where we can write a number of "operations" or tests, such as "GenerateOrders". We have a number of parameters we can use to configure the tests (such as the number of orders). We then write a second operation to confirm the test has passed/Failed (i.e. there are(nt) orders).

The tool is used for

  • Integration Testing
  • Data generation
  • End-to-end testing (By mixing and matching a number of tests)

It seems to work well, however requires development experience to maintain and write new tests. Our test team would like to get involved, who have little C# development experience.

We are just about to start a new Greenfield project and I am doing some research into the optimum way to write and maintain integration tests.

The questions are as follows:

  • How do you perform integration testing?
  • What tool do you use for it (FitNess?, Custom?, NUnit)?

I am looking forward to peoples suggestions/comments.

Thanks in advance,

David

like image 399
David Kiff Avatar asked May 11 '09 18:05

David Kiff


People also ask

What is the best integration testing strategies?

Common approaches to integration testing. Four key strategies to execute integration testing are big-bang, top-down, bottom-up and sandwich/hybrid testing. Each approach has benefits and drawbacks.

Which is the most popular integration testing approach?

Big Bang Method. In this approach, testing is done via integration of all modules at once. It is convenient for small software systems, if used for large software systems identification of defects is difficult.

What is the best key objective of integration testing?

The primary goal of integration testing is to test the interface between modules, along with the flow of data and information.


1 Answers

Integration testing may be done at a user interface level (via automated functional tests - AFT) or service/api interface level.

There are several tools in both cases:

I have worked on projects that successfully used Sahi or Selenium for AFT of web apps, white for AFT for .NET WPF or winforms apps, swtBot for AFT of Eclipse Rich client apps and frankenstein for AFT of Java swing apps.

Fitnesse is useful for service/api level tests or for tests that run just below the UI. When done right, it has the advantage of having business-readable tests i.e. non-developers can read and understand the tests. Tools like NUnit are less useful for this purpose. SOAPUI is particularly suited for testing SOAP web services.

Factors to consider:

  • Duration: Can you tolerate 8 hour test runs?
  • Brittleness: AFTs can be quite brittle against an evolving application (e.g. ids and positions of widgets may change). Adequate skill and effort is needed to not hard code the changing parts.
  • Fidelity: How close to real world do you want it to be? e.g. You may have to mock out interactions with a payment gateway unless the provider provides you a test environment that you can pummel with your tests.

Some nuances are captured here.

Full disclosure: The author is associated with the organization behind most (not all) of the above free and open source tools.

like image 97
ottodidakt Avatar answered Dec 31 '22 16:12

ottodidakt