[Drupal] Integration testing explanation with a simple Drupal-Ubercart payment example

Zyxware default image1

Integration testing is grey box testing method in which combined parts of an application is tested to determine whether all these functions works together. Let us learn this with an example.

Suppose your Drupal site sells online products and the shipment charge is set in such a way that it will be applicable to the product depending on the weight and destination. While doing the unit testing, tester has to test product selection, setting price,setting shipment to the destination etc separately. But in integration testing we test all these different functionality as a whole.

Steps to check integration testing

  1. Open the site.
  2. Go to product page.
  3. Select product.
  4. Selected product and quantity according to your preference.
  5. Select payment options like paypal or credit card.
  6. Select shipping method and shipping details.
  7. Pay your payment.
  8. Then confirm your order by clicking Apply confirmation button.

The above work flow is implemented by configuring the following Ubercart modules.

  • Order
  • Product
  • Store
  • Attributes
  • Cart
  • Shipping
  • Payment
  • Paypal

Here while performing integration testing we will assure that all functionality which are combined by integrating these modules work as a whole. This type of testing is mainly performed on client/server and distributed systems.

Hope this was helpful for you to learn about Integration Testing.